07.08.2023, 14:48
Looked at the debug output:
the Avisynth script:
looks fine.
1st pass Encoding call:
looks fine too and finshed without reporting any issues:
2nd pass encoding call:
seems correct and also finished without a problem:
Muxing call seems fine too:
I strongly advice NOT to use .avi for H.264 as container, better use .mkv or .mp4, multiple b-frames, open-gop and similar are 'tricky' in .avi and some players will not support it.
from the looks of it, ffmpeg does not like the audio.
Can you share the source file with me, so I can try to reproduce the issue?
Cu Selur
Ps.: As a side note, you might want to switch to Vapoursynth or Avisynth 64bit, instead of using 32bit Avisynth.
the Avisynth script:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\LSMASHSource.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\RgTools.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\masktools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\mvtools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\neo-fft3d.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\nnedi3.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\svpflow1.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\svpflow2.dll")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\mtmodes.avsi")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\QTGMC.avsi")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\InterFrame2.avsi")
# loading source: C:\Users\Johan\Videos\capture-lagarith.avi
# color sampling YUY2@8, matrix: bt601, scantyp: top field first, luminance scale: limited
LWLibavVideoSource("C:\Users\Johan\Videos\CAPTUR~1.AVI",cache=false,dr=true,format="YUV422P8", prefer_hw=0)
# current resolution: 640x480
# deinterlacing
AssumeTFF()
QTGMC(Preset="Placebo", ediThreads=2)
ConvertToYV12(interlaced=false)
InterFrame(NewNum=50,NewDen=1,Cores=16)
# filtering
# setting output fps to 50.000fps
AssumeFPS(50,1)
PreFetch(4)
# output: color sampling YV12@8, matrix: bt601, scantyp: progressive, luminance scale: limited
return last
1st pass Encoding call:
"C:\Program Files\Hybrid\32bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "C:\Users\Johan\AppData\Local\Temp\encodingTempSynthSkript_2023-08-07@14_10_50_6310_0.avs" -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0 -f rawvideo - | "C:\Program Files\Hybrid\64bit\x264.exe" --preset veryfast --pass 1 --bitrate 15000 --profile high --level 4.1 --direct auto --b-adapt 0 --sync-lookahead 12 --qcomp 0.50 --rc-lookahead 40 --qpmax 51 --aq-mode 0 --sar 1:1 --non-deterministic --range tv --stats "C:\Users\Johan\AppData\Local\Temp\capture-lagarith_new_1_2023-08-07@14_10_50_6310_03.stats" --demuxer raw --input-res 640x480 --input-csp i420 --input-range tv --input-depth 8 --fps 50/1 --output-depth 8 --output NUL -
raw [info]: 640x480p 1:1 @ 50/1 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
x264 [info]: profile Main, level 4.1, 4:2:0, 8-bit
1 frames: 0.10 fps, 34667.60 kb/s
....
x264 [info]: frame I:2 Avg QP: 8.33 size:100846
x264 [info]: frame P:75 Avg QP: 9.44 size: 73977
x264 [info]: frame B:219 Avg QP:13.04 size: 23932
x264 [info]: consecutive B-frames: 1.4% 0.0% 0.0% 98.6%
x264 [info]: mb I I16..4: 2.2% 0.0% 97.8%
x264 [info]: mb P I16..4: 18.7% 0.0% 0.0% P16..4: 81.3% 0.0% 0.0% 0.0% 0.0% skip: 0.0%
x264 [info]: mb B I16..4: 0.5% 0.0% 0.0% B16..8: 59.6% 0.0% 0.0% direct:39.8% skip: 0.1% L0:12.6% L1:17.5% BI:69.9%
x264 [info]: final ratefactor: 3.73
x264 [info]: direct mvs spatial:96.8% temporal:3.2%
x264 [info]: coded y,uvDC,uvAC intra: 100.0% 100.0% 99.9% inter: 82.7% 99.3% 83.5%
x264 [info]: i16 v,h,dc,p: 13% 5% 49% 33%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 11% 12% 8% 10% 11% 9% 11% 8%
x264 [info]: i8c dc,h,v,p: 62% 13% 15% 10%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: kb/s:14852.81
encoded 296 frames, 7.02 fps, 14852.81 kb/s
"C:\Program Files\Hybrid\32bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "C:\Users\Johan\AppData\Local\Temp\encodingTempSynthSkript_2023-08-07@14_10_50_6310_0.avs" -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0 -f rawvideo - | "C:\Program Files\Hybrid\64bit\x264.exe" --preset veryfast --pass 2 --bitrate 15000 --profile high --level 4.1 --ref 3 --direct auto --b-adapt 0 --sync-lookahead 12 --qcomp 0.50 --rc-lookahead 40 --qpmax 51 --partitions i4x4,p8x8,b8x8 --no-fast-pskip --subme 5 --aq-mode 0 --vbv-maxrate 62500 --vbv-bufsize 78125 --sar 1:1 --non-deterministic --range tv --colormatrix bt470bg --stats "C:\Users\Johan\AppData\Local\Temp\capture-lagarith_new_1_2023-08-07@14_10_50_6310_03.stats" --demuxer raw --input-res 640x480 --input-csp i420 --input-range tv --input-depth 8 --fps 50/1 --output-depth 8 --output "C:\Users\Johan\AppData\Local\Temp\2023-08-07@14_10_50_6310_04.264" -
x264 output: raw [info]: 640x480p 1:1 @ 50/1 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
x264 [info]: profile High, level 4.1, 4:2:0, 8-bit
1 frames: 0.25 fps, 46090.80 kb/s
...
x264 [info]: frame I:2 Avg QP: 7.10 size:111554
x264 [info]: frame P:75 Avg QP: 9.29 size: 75582
x264 [info]: frame B:219 Avg QP:12.89 size: 23932
x264 [info]: consecutive B-frames: 1.4% 0.0% 0.0% 98.6%
x264 [info]: mb I I16..4: 0.9% 10.9% 88.2%
x264 [info]: mb P I16..4: 2.5% 0.0% 52.5% P16..4: 7.9% 15.5% 21.6% 0.0% 0.0% skip: 0.0%
x264 [info]: mb B I16..4: 0.2% 0.0% 1.3% B16..8: 29.6% 28.1% 10.6% direct:30.2% skip: 0.0% L0:21.4% L1:22.8% BI:55.8%
x264 [info]: 8x8 transform intra:0.5% inter:24.0%
x264 [info]: direct mvs spatial:97.7% temporal:2.3%
x264 [info]: coded y,uvDC,uvAC intra: 100.0% 100.0% 100.0% inter: 77.0% 99.3% 84.1%
x264 [info]: i16 v,h,dc,p: 5% 3% 57% 35%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 7% 27% 8% 5% 8% 7% 10% 8%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 10% 17% 9% 10% 11% 7% 10% 7%
x264 [info]: i8c dc,h,v,p: 59% 14% 16% 11%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 81.5% 14.1% 4.4%
x264 [info]: ref B L0: 97.4% 2.4% 0.2%
x264 [info]: ref B L1: 98.7% 1.3%
x264 [info]: kb/s:15044.38
encoded 296 frames, 6.67 fps, 15044.38 kb/s
...
created C:\Users\Johan\AppData\Local\Temp\2023-08-07@14_10_50_6310_04.264 (10.6171 MB)
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -r 50/1 -i "C:\Users\Johan\AppData\Local\Temp\2023-08-07@14_10_50_6310__07.mkv" -i "C:\Users\Johan\AppData\Local\Temp\iId_9_aid_1_2023-08-07@14_10_50_6310_01.mov" -vcodec copy -acodec copy -metadata encoding_tool="Hybrid 2023.03.17.1" -map 0:0 -map 1:0 -bsf:v h264_mp4toannexb -aspect 640:480 -r 50/1 -f avi "C:\Users\Johan\Videos\capture-lagarith_new.avi"
Input #0, matroska,webm, from 'C:\Users\Johan\AppData\Local\Temp\2023-08-07@14_10_50_6310__07.mkv':
Metadata:
encoder : libebml v1.4.4 + libmatroska v1.7.1
creation_time : 2023-08-07T12:12:18.000000Z
Duration: 00:00:05.92, start: 0.000000, bitrate: 15055 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt470bg/unknown/unknown, progressive), 640x480 [SAR 1:1 DAR 4:3], 50 fps, 50 tbr, 1k tbn (default) (forced)
Metadata:
BPS : 15044386
DURATION : 00:00:05.920000000
NUMBER_OF_FRAMES: 296
NUMBER_OF_BYTES : 11132846
_STATISTICS_WRITING_APP: mkvmerge v74.0.0 ('You Oughta Know') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2023-08-07 12:12:18
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Johan\AppData\Local\Temp\iId_9_aid_1_2023-08-07@14_10_50_6310_01.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf60.4.100
Duration: 00:00:06.69, start: 0.000000, bitrate: 64 kb/s
Stream #1:0[0x1]: Audio: pcm_s8 (sowt / 0x74776F73), 8000 Hz, mono, u8, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
[vost#0:0/copy @ 000001c3882855c0] Overriding aspect ratio with stream copy may produce invalid files
[out#0/avi @ 000001c38828a780] Could not write header (incorrect codec parameters ?): Operation not permitted
[aost#0:1/copy @ 000001c388286280] Error initializing output stream:
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (copy)
Last message repeated 1 times
process finished with exitcode: 1 and exitStatus: 0
process finished with exitcode: 1 and exitStatus: 0
from the looks of it, ffmpeg does not like the audio.
Can you share the source file with me, so I can try to reproduce the issue?
Cu Selur
Ps.: As a side note, you might want to switch to Vapoursynth or Avisynth 64bit, instead of using 32bit Avisynth.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.