digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   General Discussion (https://www.digitalfaq.com/forum/news/)
-   -   Apply filters in ffmpeg instead of VirtualDub? (https://www.digitalfaq.com/forum/news/12070-apply-filters-ffmpeg.html)

trevorc4113 08-02-2021 08:19 PM

Apply filters in ffmpeg instead of VirtualDub?
 
2 Attachment(s)
Hi all,

I've been following this forum for months now (thanks for all the knowledge you share here) and decided it was time to become a member - this is my first post:

I'm hoping to get some help with ffmpeg coding. I'd like to skip my Vdub filter process (step 2) below and instead apply those basic filters in ffmpeg, since I'm opening all my Vdub-filtered .avi files in ffmpeg to convert them to ProRes .mov files anyway (step 3); it'd be great to only do one video conversion instead of two!

My current workflow is:

1.) Capture:

VCR S-video output and RCA audio output ->
Roxio USB dongle ->
Startech USB 3.0 ExpressCard on Dell Latitude e5520 (Intel Core i5-2520M CPU @ 2.50GHz, 3GB RAM) running Windows XP SP3 ->
Virtual VCR with HuffYUV v1.3.1 compression, YUY2, 720x480px, 29.97fps, interlaced, NTSC. PCM 16-bit 48 kHz Stereo audio ->
Save as .AVI file.
*No filters or AV Sync settings turned on in Virtual VCR.

2.) Open .AVI file in VirtualDub 1.9.11 for basic filtering:

- Video in Full Processing Mode
- Audio set to Direct Stream Copy
- Compression set to Huffyuv v2.1.1 - CCESP Patch v0.2.2
- Filters:
----De-Interlace: Yadif 2x, Upper Field First
----Resize: Set to 720x480px. Adjust Cropping setting on filter to crop left/right black bars off (16 pixels total. Usually 11px on left side, 5px on right).
----Resize: Set to 640x480px

- Save as .AVI
*Please see attached screenshot for exact Vdub filter settings

3.) Convert to ProRes .MOV in Terminal on Mac OSx using following code:

ffmpeg -i VIDEOFILENAME.avi \
-c:v prores_ks \
-profile:v 2 \
-vendor apl0 \
-bits_per_mb 8000 \
-pix_fmt yuv422p10le \
-acodec copy \
VIDEOFILENAME_proRes422.mov

4.) Import .MOV files into Adobe Premiere to create final edit

From what I’ve read, it seems possible to apply the three filters in ffmpeg, but the coding process is very foreign to me and I’m struggling to set it up correctly.

Thank you for your help!
Trevor

P.S. I switched to Virtual VCR for capturing after trying countless methods in Vdub 1.9.11 to get video/audio to sync up and never could. Virtual VCR worked perfectly on the first capture with zero headaches.

I'm sure someone will mention my Roxio USB dongle but since I’m not having any capture issues, I will work with this dongle for now. I plan to upgrade the less desirable components in my capture rig once finances allow it.

lordsmurf 08-02-2021 11:45 PM

You may think you're "not having issues" with that Roxio (Easycap) card, but consider this: you may not have to filter, if the capture was better. So you're somewhat wasting your time. Worse yet, you cannot filter out errors from Easycap captures. You're essentially starting out with low quality captures.

Yadif is a not-great deinterlacer. QTGMC is ideal.

I think the entire process needs to be thrown out.

Instead, use Avisynth x64+ to both (1) QTGMC, (2) crop/pad aka mask.
This can be done in Hybrid, but cropping and padding can act screwy in Hybrid, so an actual simple script is suggested.

Note that if you're just cropping out pixels, you are likely (1) causing upsize quality degradation, (2) messing with aspect ratio. Mask (cover with black), don't crop. A few-pixel border is far better than the alternative butchery of video, especially when combined with low quality deinterlaces like Yadif that alias and jaggy.

After Avisynth, use VirtualDub2 to both encode out to ProRes422, and batch the entire encode operation.

You'll remove an extra encode to a lossless, go straight from the capture to the ProRes422 file.

Note: Yes, yes, it's not the "official" ProRes codec, but the reverse-engineered version. Some people get all silly about it, without realizing most H.264 and MPEG encoders are the same, unofficial. "Mac people" are all uppity about "official" at times, and it's just cluelessness talking. I've yet to see any difference in practice. I enjoy my Macs (and Linux and Windows and Android and others), but some of the "Macphiles" just irritate me with their stupidity. Please don't be one of them.

I've done this many times.

hodgey 08-03-2021 10:30 AM

Yadif deinterlacing and scaling perfectly doable with ffmpeg yeah. QTGMC with Hybrid/Avisynth will give a nicer result though as mentioned if you feel like putting in the effort.

Yadif was originally designed to be a compromise between acceptable quality and being able to be used during real-time playback so it's not all that sofisticated. Ffmpeg does also has some other deinterlacing options, nnedi3 may be the nicest one available of those though the implementation ffmpeg implementation is very slow as far as I know. The same algorithm is used under the hood by QTGMC but QTGMC combines it with a bunch of other things like motion compensation to improve the result.

Roxio have changed the makeup of their capture dongles a bunch of times, the early ones were similar to the original easycap (i.e empia bridge/audio + SAA7113 video chip), but no idea what the current one are. I presume you are capturing from either a SVHS deck or a DVD-recorder combo since you mention using S-Video?

hajes29a 12-12-2023 12:11 PM

I wonder about
Code:

ffmpeg
processing as well because it is all native Linux, many filters are written for CUDA/OpenCL. I really like VirtualDub/AVIsynth combo since I first found it on Doom9 back in 2001. It has just one major issue WINDOWS :-P The whole carpware that never was fixed since MS DOS 6.22 ;-)

Any kind of high computing is 2-10x faster in Linux (especially on highly computing optimized Clear Linux) thanks to optimized kernel. My old BlackMagic Infinity Pro suppose to work in Linux. Last capture I did with crap consumer player was on Dell T5500 workstation with Win8.1

I just purchased refurbished JVC 9600, and getting ready for new round. I am not sure how Win 10 will work.


All times are GMT -5. The time now is 09:04 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.