On Sun, Nov 5, 2017 at 6:16 PM, Baek Seung Hoon <seung51h...@gmail.com> wrote:
> (Its mail continuous previous my one.. sorry) > > I wonder know what is different ffmpeg internal sequence following 2 > commands.. > > 1. > > ffmpeg -y -i ./input.mp4 -filter_complex > "[0:v]hwupload_cuda=device=0,scale_npp=w=960:h=540[map0]" -map "[map0]" > -c:v h264_nvenc -c:a copy ./output.mp4 > > 2. > > ffmpeg -y -hwaccel cuvid -i ./input.mp4 -filter_complex > "[0:v]hwupload_cuda=device=0,scale_npp=w=960:h=540[map0]" -map "[map0]" > -c:v h264_nvenc -c:a copy ./output.mp4 > > In fact, the performance is similar as 861 fps for encoding. > Could I ask you what role "hwaccel cuvid" is in the above command? > TLDR: No affect. Maybe a tiny bit of overhead at start. The answer is probably long and I'll probably be (a little) wrong. From the wiki page cited earlier; -hwaccel cuvid will attempt to use hw-decoding and fall-back to sw-decoding if not possible automatically. Without options '-hwaccel' tries internal hw-decoders before falling-back, because the cuvid decoders are external you have to specify "cuvid" option and to use the decoder: -c:v h264_cuvid. Or ffmpeg will fall-back to sw-decoding. So only specifying '-hwaccel cuvid' without a decoder should fall-back to sw-decoding automatically. The whole hwaccel thing is more complex than that because if you use hw-decoder and hw-encoder, but do not specify '-hwaccel cuvid', then your frames get passed through system memory. So there must be more happening with '-hwaccel cuvid' than just setting up a decoder. I tried looking at the code, but I'm a little lost on this one. > > Thanks again :) > I'm glad I was able to help. As always, I gained knowledge from helping you. So, thanks for helping me! _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".