This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Trying to deinterlace with Bob NVEnc; job crashes
#61
(24.08.2021, 15:28)Selur Wrote: About the frame rate adjustment: That would only be needed in case the encoder is also ffmpeg based when piping the output to an encoder, the frame rate ist written by the encoder.

Yes, that's what it seems.

(24.08.2021, 15:28)Selur Wrote: Okay, I probalby will change teh cuvid support to only offer:
a. bob (this will do -deint 2)
a. same-rate (this will do -deint 2 -drop_second_frame)

Why not just redact it as "CUVID (FFmpeg)" and let the user choose whether, which and how to use the options CUVID provides? Similar to what you did with YadifMod.
Basically provide the options for "-gpu <string>", "-surfaces <int>", "-crop <string>" and "-resize <string>". And let the user enable and customize the options they want to use.

(24.08.2021, 15:28)Selur Wrote:
Quote:Sorry, forgot to mention that after the h264 input was loaded and the defaults were set, I restored the defaults. This is why I think defaults should not retain the decoder, but only the deinterlacer. Hybrid should always decide the decoder based on the input and never the user.
Okay, loading the defaults after loading the source will always cause problems, since most of the setting collected will be lost,...
-> probably not going to changing that.

I'll send you a video on Drive, so you can understand better. But that will be later.
Reply
#62
Quote:Basically provide the options for "-gpu <string>", "-surfaces <int>", "-crop <string>" and "-resize <string>". And let the user enable and customize the options they want to use.
May be at another time. At some time I need to actually relax some time.
Main problem is with that, that users complain when their settings are not properly predicted by Hybrid and Hybrid crashes or created junk output because the user doesn't know what he is doing.

Especially not planning to add these features without knowing more about them, i.e. what war valid strings for '-gpu' also in what order will ffmpeg apply crop&resize? The order they are specified, always crop first, always resize first.
-> without proper documentation I'm not going to even try to implement these changes.

Cu Selur
Reply
#63
(24.08.2021, 15:46)Selur Wrote:
Quote:Basically provide the options for "-gpu <string>", "-surfaces <int>", "-crop <string>" and "-resize <string>". And let the user enable and customize the options they want to use.
May be at another time. At some time I need to actually relax some time.

Understood. No problem.

(24.08.2021, 15:46)Selur Wrote: Especially not planning to add these features without knowing more about them, i.e. what war valid strings for '-gpu' also in what order will ffmpeg apply crop&resize? The order they are specified, always crop first, always resize first.
-> without proper documentation I'm not going to even try to implement these changes.

Of course. Understandable.
  • For "-gpu", no idea.
  • For "-crop", it's as specified: "(top)x(bottom)x(left)x(right)".
    • for example: 6x6x0x0. Meaning 6 pixels cropped from top, 6 from bottom and none for left and right.
  • For "-surfaces", I don't know what that means.
  • For "-resize", as specified in the help again. You need to enter the desired output resolution.

You implement what you can, when you can, if you can.
I can help with testing for these particular features, because I see most of them useful, but not today. I'll let you know when, if you think it's helpful.
Reply
#64
Send you a link to a dev version for testing.

You could test:
1. Will the output differ if I use:
-c:v h264_cuvid -crop 16,16,16,16 -resize 1280x720
or
-c:v h264_cuvid -resize 1280x720 -crop 16,16,16,16
and what resolution does the output have for these.
2. Does crop properly work on interlaced content that isn't deinterlaced but again encoded to interlaced output?
3. Does crop need mod4 bottom and top crop values on YUV420 content if the input is interlaced and not deinterlacing is used?
4. Does crop need mod4 bottom and top crop values on YUV420 content if the input is interlaced and deinterlacing is used?
5. Does crop need mod2 crop values if the input is yuv420?
6. Will I get different output if '-resize', '-crop' ´, '-deint' are all used but their order differs? (related to the first question)
7. Does cuvid properly work when used with nvenc based encoders?

Cu Selur
Reply
#65
(24.08.2021, 16:58)Selur Wrote: You could test:
1. Will the output differ if I use:
-c:v h264_cuvid -crop 16,16,16,16 -resize 1280x720
or
-c:v h264_cuvid -resize 1280x720 -crop 16,16,16,16
and what resolution does the output have for these.
2. Does crop properly work on interlaced content that isn't deinterlaced but again encoded to interlaced output?
3. Does crop need mod4 bottom and top crop values on YUV420 content if the input is interlaced and not deinterlacing is used?
4. Does crop need mod4 bottom and top crop values on YUV420 content if the input is interlaced and deinterlacing is used?
5. Does crop need mod2 crop values if the input is yuv420?
6. Will I get different output if  '-resize', '-crop' ´, '-deint'  are all used but their order differs? (related to the first question)
7. Does cuvid properly work when used with nvenc based encoders?

Can be done, but will take time.



The video of how the bug is triggered: https://drive.google.com/file/d/1tWwvd7m...J__sF/view
  1. Import an mpeg2 video, select CUVID as deinterlacer, save the configuration.
  2. Import an avc video, restore saved configuration.
  3. Decoder should be mpeg2_cuvid.
Reply
#66
Quote:The video of how the bug is triggered ..
try with the dev version I send you a link to,... it should refresh the decoder when starting the job creation.

That said, loading a Model after loading a source file will overwrite tons of settings and probably break other stuff.
-> I'll adjust Hybrid to throw out the current source if someone does this in the furture.

Cu Selur
Reply
#67
(24.08.2021, 19:36)Selur Wrote: try with the dev version I send you a link to,... it should refresh the decoder when starting the job creation.

You're right, this version does that. Didn't check for that in the video.

EDIT: Also, if you have any bugs you're expecting to see from the "None" deinterlacer, please let me know.
Reply
#68
After a little testing, I have reason to believe Hybrid does -deint 1 instead of -deint 2 for CUVID Bob.

FFmpeg deint 2
Hybrid deint 2

Also, I see a bit of an inexplicable drop in performance in Hybrid compared to FFmpeg. If I have an input file long enough, the FPS count will drop to around 50, while in FFmpeg it only drops to 86.

Here is the command I used for FFmpeg:
ffmpeg -r 50 -c:v h264_cuvid -deint 2 -i <input> -c:v libx264 -profile:v high -preset veryfast -crf 18 -x264opts "keyint=500" -c:a copy <output.mkv>

EDIT: As for the "none" deinterlacing option, I don't see how one could bug it, since the checks are done when the job is created. I think it should be kept for a couple of releases and then removed as well, because, at this point, all it does is tell the user they have to choose either to encode the video interlaced or to deinterlace it.


Attached Files Thumbnail(s)
       
Reply
#69
You are right, overlooked the deint code there. -> will fix.
About the 'Auto deinterlace handling', I'll keep it as it is now.

Cu Selur
Reply
#70
compiled and send you a link to a dev version which should properly use deint 2 in both cases.

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)