-
-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for deinterlacing #465
Comments
Sounds good! |
Hello @orryverducci |
Hi both, @svenerbeck I have a few suggestions, which I can either post here as feature suggestions or email to you. Let me know what you'd prefer. The big features that would be very useful but currently missing are this one and support for SDI input hardware, such as Decklink cards (already requested in #332). @jstabenow Here's the FFmpeg commands you requested for CPU encoding and VAAPI. I'll double check the CUVID commands on Monday when I'm on my desktop and come back to you with them. CPU (x264)This uses the bwdif filter, which is a hybrid of yadif and the BBC's w3fdif algorithm. I chosen this filter as I think it provides the best video quality while still being fast to run. Half Motion: ffmpeg -i input -vf 'bwdif=mode=0' -c:v libx264 output Full Motion: ffmpeg -i input -vf 'bwdif=mode=1' -c:v libx264 output VAAPIHalf Motion: ffmpeg -vaapi_device /dev/dri/renderD128 -i input -vf 'format=nv12,hwupload,deinterlace_vaapi=rate=frame:auto=1' -c:v h264_vaapi output Full Motion: ffmpeg -vaapi_device /dev/dri/renderD128 -i input -vf 'format=nv12,hwupload,deinterlace_vaapi=rate=field:auto=1' -c:v h264_vaapi output |
Hey @orryverducci However, Feel free to test this and let me know if you have problems. |
Bwdif works well enough for me. Going to test in a few, thank you. |
Just given it a quick test run, and it looks good to me. I'm back in work on Friday so I'll give it a proper test then with the interlaced streams I intend to use it on and come back to you. Looking at the commit I didn't realise it was that simple to implement. I did try to do it myself but couldn't figure out what was in core or the UI. I've checked the Nvidia commands. They use input/decoder settings instead of filters. Not sure if they currently supported so I don't know if it will also have to wait like VAAPI, but just in case they are here are the commands: Half Motion: ffmpeg -hwaccel cuda -c:v h264_cuvid -deint adaptive -drop_second_field 1 -i input -c:v h264_nvenc output Full Motion: ffmpeg -hwaccel cuda -c:v h264_cuvid -deint adaptive -drop_second_field 0 -i input -c:v h264_nvenc -r 50 output Note for full motion you have to manually specify the output framerate at double the input. I suspect that isn't an issue though given that the UI lets you set it anyways. |
@orryverducci And Nvidia is cool. Neither a filter nor a codec setting. |
I just tested today my new compiled ffmpeg with cuda and cuvid deinterlace adaptive is working perfect. I wondered if cuda:latest has it, but i found you guys talking about it, so great! And another suggestion, if you can add output protocol 'rtp_mpegts' wich also uses rtp://ip.address:port url |
@mihaipopoiag |
Got the dev version running at work now on our channel output, and the bwdif deinterlacer itself is working really well! The only small issue I've found though is that if you both enable the deinterlacer and set the video to be rotated (e.g. from 16:9 to portrait), the bwdif filter is applied after the rotate filter, which in effect breaks it (interlaced lines are visible). Ideally the deinterlacer should be applied first. |
Perfect. And the error is fixed in |
Thanks for fixing it. Now working perfectly! |
Hello @orryverducci ⭐ If you were satisfied with the support, and we could help you, please rate us on Google. We are closing your ticket #366. This may be due to the following reasons:
You can reopen this ticket at any time! Please only open related tickets once! Always answer/ask in the original ticket with the same issue! |
It would be great if Restreamer had the ability to deinterlace input video sources. This would make it easier to use Restreamer in a broadcast facility, which usually operates with interlaced video formats (e.g. 1080i50).
Ideally this should have the option to deinterlace to half motion at the same framerate as the source, or full motion at double the source frame rate (i.e. 25fps interlaced to 50fps progressive).
FFmpeg has built in support for deinterlacing, either through a video filter (I recommend bwdif) or by using the GPU hardware deinterlacer where available (deinterlace_vaapi filter for Intel, deint option for NVidia). Based on this I expect it'll be fairly easy to implement this in Restreamer.
The text was updated successfully, but these errors were encountered: