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).
Also,Advice welcomed.
- 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).
Thanks
PS I thought this thread looked interesting, suggesting using ffmpeg with nvidia-GPU-hardware for simultaneous CUDA resizing and NVENC encoding.
https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/nvidia-linux/46654-...h-ffmpeg/page5
+ Reply to Thread
Results 1 to 4 of 4
-
-
Please elaborate on this - what means "shimmery"? Adding unsharp usually worsening quality (artificially adding high frequency force quantizer to be higher - instead unshapr you may consider to add small amount of noise to luma plane - it should stabilise quantizer and improve perceived sharpnes).
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... -
Well, from time to time small "stable" areas look as if they flicker at you moreso if it has horizontal lines although it's hard to tell.
OK. How in ffmpeg ?
Yes I intend to use for small TV captures for timeshifted viewing where great quality isn't the main objective ... "good enough" mp4 for casting is.
Thanks.Last edited by hydra3333; 7th Sep 2016 at 09:11.
-
Based on description it looks like typical quantizer pumping (codec is overloaded and significant change in quantizer value is required (when compared to previous). You may try to tweak GOP size and quantizer settings, increasing VBV buffer may help too.
For example:
Code:-vf noise=c0s=10:c1s=0:c2s=0:c0f=a+t
Similar Threads
-
NVEncC by rigaya - NVIDIA GPU encoding
By Selur in forum Video ConversionReplies: 91Last Post: 5th Dec 2024, 12:55 -
seeking commandline front-end for using NVEnc
By hydra3333 in forum Video ConversionReplies: 28Last Post: 6th Mar 2019, 14:13 -
Video convertor that uses Nvidia Nvenc
By amirzubair in forum Video ConversionReplies: 7Last Post: 19th Jul 2015, 08:20 -
Nvidia NVENC HEVC is better than x264
By sophisticles in forum Video ConversionReplies: 10Last Post: 25th Mar 2015, 13:27 -
Which GPU for GPU accelerated rendering?
By vid83 in forum Newbie / General discussionsReplies: 1Last Post: 28th Jan 2013, 08:09