Hello, for ffmpeg NVENC x264 encodes (Nvidia GPU hardware accelerated) what is the correct "best" ffmpeg commandline to convert a PAL 576i interlaced TV capture file to progressive mp4 ? A lot of web pages mentioning ffmpeg say to use "-c:v nvenc_h264" however ffmpeg spits and says use "-c:v h264_nvenc" instead.
That encodes at about 565 fps, which i'm happy with, and when watching as it encodes the "q" seems to fluctuate up and down as if it's deciding what the right quality/bitrate value to use is as it goes along.Code:ffmpeg.exe" -i ".\test.ts" -map_metadata -1 -filter:v yadif=0:0:0,setdar=dar=16/9 -r 25 -c:v h264_nvenc -preset hq -profile:v high -level 4.1 -pixel_format yuv420p -movflags +faststart -c:a libmp3lame -ab 256k -y ".\test.ts.nvenc.mp4"
This one below uses what seems to be a useable fixed "-q" but sometimes the encode commandline above displays a "-q" lower than the fixed 20 value below and more often higher.
In both, it can appear to be a tad soft from time to time and also a bit shimmery from time to time, so adding unsharp like -filter:v yadif=0:0:0,setdar=dar=16/9,unsharp seems to sharpen it a bit even it it still leaves it a tad shimmery. Adding unsharp makes it encode at about 207 fps.Code:ffmpeg.exe" -i ".\test.ts" -map_metadata -1 -filter:v yadif=0:0:0,setdar=dar=16/9 -r 25 -c:v h264_nvenc -rc:v constqp -global_quality 20 -preset hq -profile:v high -level 4.1 -pixel_format yuv420p -movflags +faststart -c:a libmp3lame -ab 256k -y ".\test.ts.nvenc.mp4"
I suppose there's no way to make nvenc accept interlaced input and encode interlaced output ? (interlaced retains better "motion fluidity" for fast moving sports action where the incoming native file is interlaced and the only options are 25fps progressive or 25fps interlaced).
- I suppose setdar=dar=16/9 is still the right thing for PAL 1080i input and 720p input (no yadif on 720p, yes) ?
- Has ffmpeg's aac encoding quality progressed enough that should I be using something like "-c:a aac" instead of "-c:a libmp3lame" and if so what equivalent ffmpeg commandline settings should I use ? (mp3 was the next best for cross compatibility with both an old WDTV media player and a Chromecast).
PS I thought this thread looked interesting, suggesting using ffmpeg with nvidia-GPU-hardware for simultaneous CUDA resizing and NVENC encoding.
+ Reply to Thread
Results 1 to 4 of 4
All described problems looking like poor bitrate control in encoder - i would consider 2 pass if possible to avoid quantizer pumping.
Not sure about your quality expectations but i assume that libx264 may be substantially better and perhaps 2 - 4 times slower - i use nvenc for real time encoding as encoded stream is feed trough multiplexer directly to QAM modulator...
AAC is quite OK in ffmpeg currently - go for sane bitrates (56 - 64kbps per channel) - MP3 is more compatible with old HW but any HD capable decoder should accept AAC (better than MP3 - multichannel, higher sampling rates etc).
Interlace encoding - honestly have no clue how to use nvenc in interlace mode - maybe in similar way as in H.265 but HW decoders may be not able to understand this...
Last edited by hydra3333; 7th Sep 2016 at 10:11.