(22.08.2021, 17:00)Selur Wrote: Then I don't get what is missing, since using '--vpp-deinterlace adaptive' with '--interlace auto' should be the same as the cuvid deinterlacer with "-deint 2".
Cu Selur
You're right, it should work. I just read the NVEncC doc.
I'll check again later today, when I'll have time.
As for the dev version, I'll test it then too.
Actually, change of thoughts. It most likely won't work.
Here, taken from --vpp-deinterlace:
Quote:- normal ... standard 60i → 30p interleave cancellation.
- adaptive ... same as normal
Yes, --vpp-deinterlace adaptive does mean adaptive. But the NVEnc adaptive is not the same thing as CUVID adaptive, as you can see above.
Another piece of information regarding a connection between --vpp-deinterlace and -interlace is this:
Quote:--vpp-deinterlace <string>
Activate hw deinterlacer. Available only when used with --avhw(hw decode) and --interlace tff or --interlace bff is specified.
This is all the info I know about. Please let me know if I'm missing something, but NVEnc does not feature the default nVidia driver adaptive deinterlacer, from what I can tell.
Hybrid is currently rendering the video - fingers crossed adaptive will be used, somehow. Will also send you the Hybrid Output when it's done and the MediaInfo of the file.
But even if it did, the file would still be immense and the NVEnc quality is generally not very predictable.
Also, one question. Can't CUVID be implemented by basing the code in Hybrid on FFmpeg? I mean, while the decoder is supported by nVidia, FFmpeg will have it. Once it's not, FFmpeg will remove it. I see no issue from this point of view, but I might very well be missing something.
Another thing: please reintroduce the ability to disable the deinterlacer.
Did not work as you said it would. It deinterlaced with the normal NVEnc deinterlacer (25i to 25p). Please also note the huge bitrate for a CRF 25 FPS 1080p video, in the context where the original was only 10.5 Mb/s in constant bitrate.
MediaInfo:
General
Unique ID : 253241376796471933291362345177919666833 (0xBE8483DBD345BE3604C76D3D3AC63A91)
Complete name : C:\Users\Alexa\Desktop\DIGI Sport 2 HD - F1 Antrenamente 2 Ungaria 2021.07.30 15.45.mkv
Format : Matroska
Format version : Version 4
File size : 9.27 GiB
Duration : 1 h 9 min
Overall bit rate : 19.1 Mb/s
Encoded date : UTC 2021-08-22 21:07:50
Writing application : mkvmerge v59.0.0 ('Shining Star') 64-bit
Writing library : libebml v1.4.2 + libmatroska v1.6.4
Encoding Gui : Hybrid 2021.08.22.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 9 min
Bit rate : 18.8 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.363
Stream size : 9.14 GiB (99%)
Default : Yes
Forced : Yes
Color range : Limited
Matrix coefficients : BT.709
Audio
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Codec ID : A_MPEG/L2
Codec ID/Hint : MP2
Duration : 1 h 9 min
Bit rate mode : Constant
Bit rate : 256 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 41.667 FPS (1152 SPF)
Compression mode : Lossy
Delay relative to video : 14 ms
Stream size : 127 MiB (1%)
Language : Romanian
Default : Yes
Forced : No
If needed, I can provide MediaInfo for the original file as well.
EDIT: Also, you said you tested this using the Bob deinterlacer from NVEnc. Bob also outputs 50 FPS, but at lower quality than adaptive, so you must have gotten the usual Bob and not adaptive.
Posts: 10.819
Threads: 56
Joined: May 2017
Quote:but NVEnc does not feature the default nVidia driver adaptive deinterlacer, from what I can tell.
you skipped the '--interlace auto' documentation.
The debug output uses 'bwdif=mode=1' and x264 not NVEnc and '--vpp-deinterlace XX --interlace auto".
It seems like we are speaking of different things.
I looked into using the same deinterlacer as ffmpeg with cuvid '-deint 2' uses while using NVEncC.
While it seems like you want to use ffmpeg as decoder with h264_cuvid and '-deint 2' which are two totally different things.
Cu Selur
(23.08.2021, 05:20)Selur Wrote: Quote:but NVEnc does not feature the default nVidia driver adaptive deinterlacer, from what I can tell.
you skipped the '--interlace auto' documentation.
The debug output uses 'bwdif=mode=1' and x264 not NVEnc and '--vpp-deinterlace XX --interlace auto".
It seems like we are speaking of different things.
There were at least 3 jobs in the debug output. Only one was created then: the NVEnc with --interlaced auto and --vpp-deinterlace adaptive.
At first, since I forgot about the other jobs, I executed a wrong one. After about an hour, I realised that. So I stopped the job, deleted all of them and re-created the NVEnc job and executed it.
Please read the debug output again, having this in mind.
(23.08.2021, 05:20)Selur Wrote: I looked into using the same deinterlacer as ffmpeg with cuvid '-deint 2' uses while using NVEncC.
While it seems like you want to use ffmpeg as decoder with h264_cuvid and '-deint 2' which are two totally different things.
Of course I would want to use h264_cuvid, since that is the best way for me to deinterlace thise videos, as I previously argued, not to mention it gives me the most flexibility in terms of encoders. I don't think any of the aforementioned problems I have with using other solutions are new to you.
But anyway, I'm going forward with testing your solutions because maybe, in the end, I'm going to be able to use NVEnc in a similar way to h264_cuvid, while being in Hybrid. Meaning passing through whatever NVEnc does to x264 or other encoders to re-encode.
If this is not your target, please let me know, so we waste less time.
Third time asking: please reintroduce the ability to disable the deinterlacer.
Posts: 10.819
Threads: 56
Joined: May 2017
Quote:Third time asking: please reintroduce the ability to disable the deinterlacer.
Not happening.
a. I see no scenario where either adjusting the scan type or the encoder settings doesn't help and this option is necessary.
b. Disabling it was broken and could cause Hybrid sometime interpreting the source as progressive when it wasn't.
Cu Selur
Posts: 10.819
Threads: 56
Joined: May 2017
Back to cuvid:
Sadly using:
instead of
doesn't work.
So sadly, in case I would add "FFMPEG (cuvid)" as deinterlacer, it could only be used for specific formats.
So the user would need to specify: - the deinterlace mode
- bob 1 .D.V....... Bob deinterlacing
- adaptive 2 .D.V....... Adaptive deinterlacing
- which field to drop first or second
- the decoder to use
- av1_cuvid
- h264_cuvid
- hevc_cuvid
- mjpeg_cuvid
- mpeg1_cuvid
- mpeg2_cuvid
- mpeg4_cuvid
- vc1_cuvid
- vp8_cuvid
- vp9_cuvid
Hybrid would then upon job creationg need to check whether the input format matches the selected decoder and decline the job creation in case format and decoder type are not compatible.
Cu Selur
Posts: 10.819
Threads: 56
Joined: May 2017
Any idea why:
ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "G:\TestClips&Co\files\test.avi" -map 0:0 -an -sn -c:v mpeg4_cuvid -deint 1 -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | ...
would abort with: Quote:Unknown encoder 'mpeg4_cuvid'
mpeg4_cuvid is listed when using "ffmpeg -decoders".
Same with h264_cuvid:
ffmpeg -y -noautorotate -nostdin -threads 8 -r 30000/1001 -analyzeduration 24M -probesize 24M -i "G:\TestClips&Co\files\MPEG-4 H.264\00001.MTS" -map 0:0 -an -sn -c:v h264_cuvid -deint 1 -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | ...
gives:
Quote:Unknown encoder 'h264_cuvid'
Are the cuvid decoders not usable with yuv4mpegpipe-pipe output?
Cu Selur
(23.08.2021, 15:45)Selur Wrote: Sadly using:
instead of
doesn't work.
So sadly, in case I would add "FFMPEG (cuvid)" as deinterlacer, it could only be used for specific formats.
- av1_cuvid
- h264_cuvid
- hevc_cuvid
- mjpeg_cuvid
- mpeg1_cuvid
- mpeg2_cuvid
- mpeg4_cuvid
- vc1_cuvid
- vp8_cuvid
- vp9_cuvid
Yes, I agree. So then
or something similar, should be used.
In case the input format is not supported by CUVID, then CUVID should simply be grayed out or not available in Hybrid.
(23.08.2021, 15:45)Selur Wrote: So the user would need to specify:- the deinterlace mode
- bob 1 .D.V....... Bob deinterlacing
- adaptive 2 .D.V....... Adaptive deinterlacing
- which field to drop first or second
- the decoder to use
Hybrid would then upon job creationg need to check whether the input format matches the selected decoder and decline the job creation in case format and decoder type are not compatible.
Yes, the user should be able to specify the deinterlace mode. The deinterlacer doesn't need to drop fields, but that option can be implemented, for a more complete support.
Now, to the part where it seems overcomplicated, in my book. Why should the user specify the decoder from the long list, since there is only one that will work - that being the one made for the specific format used by the input file. So, the way I was thinking was for Hybrid to identify the input format, something it can seemingly already do, and decide which CUVID to use automatically, based on the identified format. Can't such thing be implemented?
(23.08.2021, 17:49)Selur Wrote: Any idea why:
ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "G:\TestClips&Co\files\test.avi" -map 0:0 -an -sn -c:v mpeg4_cuvid -deint 1 -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | ...
would abort with:
Quote:Unknown encoder 'mpeg4_cuvid'
mpeg4_cuvid is listed when using "ffmpeg -decoders".
Same with h264_cuvid:
ffmpeg -y -noautorotate -nostdin -threads 8 -r 30000/1001 -analyzeduration 24M -probesize 24M -i "G:\TestClips&Co\files\MPEG-4 H.264\00001.MTS" -map 0:0 -an -sn -c:v h264_cuvid -deint 1 -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | ...
gives:
Quote:Unknown encoder 'h264_cuvid'
Are the cuvid decoders not usable with yuv4mpegpipe-pipe output?
They should be usable just fine with anything.
But the error says "encoder". CUVID is not an encoder, but a decoder. FFmpeg interprets your command as a request for an encoder named h264_cuvid, respectively mpeg4_cuvid. Those are not encoders, but rather decoders.
Posts: 10.819
Threads: 56
Joined: May 2017
Quote:Now, to the part where it seems overcomplicated, in my book. Why should the user specify the decoder from the long list, since there is only one that will work - that being the one made for the specific format used by the input file. So, the way I was thinking was for Hybrid to identify the input format, something it can seemingly already do, and decide which CUVID to use automatically, based on the identified format. Can't such thing be implemented?
So if no CUVID decoder can be used, what then?
Quote:But the error says "encoder". CUVID is not an encoder, but a decoder. FFmpeg interprets your command as a request for an encoder named h264_cuvid, respectively mpeg4_cuvid. Those are not encoders, but rather decoders.
I know, question is why doesn't ffmpeg get that it's a decoder?
Cu Selur
|