General Overview of My Current Process
Hello! I've finally got a workflow down that seems to work, but I'd like to know how it looks and if I'm missing anything significant before I start going all out with it.
My main goal is getting VHS to a final streamable format while keeping necessary intermediate files along the way. 1) Capture to lossless compressed HuffYUV avi using VirtualDub. 2a) Restoration/Editing work (if any) in VirtualDub using Avisynth and VirtualDub filters. 2b) Deinterlace with QTGMC using Avisynth and VirtualDub. 3) Encode for streaming using ffmpeg. Currently encoding video to H.264 using x264 in ffmpeg, audio to 128kbps AAC, and muxing (correct terminology?) to mp4 container. Noteworthy at this step is that I need to change the chroma subsampling from 4:2:2 to 4:2:0 in order for quicktime to play it (which is a necessary requirement for my friends and family). So, this process gives me three files per tape I capture, which I am OK with. I separated the restoration and deinterlace steps out because I often will just deinteralce and not spend the time on restoration work unless it SERIOUSLY needs it (although I am learning lots about Avisynth still, thank you sanlyn!!) Therefore every file I work with will go through 2b) but not necessarily 2a). Does this process miss anything significant? I am still a little unsure about step 3 if using ffmpeg command line is the best way to do it. It works well for me so far. The ffmpeg command I generally use is below: Code:
ffmpeg -i input.avi -c:v libx264 -preset slow -crf 17 -vf format=yuv420p -c:a aac output.mp4 |
You've definitely been reading the forum. :congrats:
I haven't done H264 encoding. The two most mentioned on this forum, I recall, are Avidemux (not sure if it's version 2.5 or 2.6) for the freeware route, or MainConcept for the payware route. But if ffmpeg looks good to you and your audience, there may not be a need to change. Again, haven't done H264 yet to have any experienced opinion of my own. One nit is that when you use QTGMC, you are forced to convert the AVI to 4:2:0 when you call ConvertToYV12 in avisynth prior to calling QTGMC. So the AVI is already in the 4:2:0 color space. I suppose if you are saving the avi in Virtualdub with HuffYuv 4:2:2 settings, that is what's causing the output to change back to that domain. But from what I've gathered from this forum, once you've gone to YV12 and called QTGMC, you might as well just save the AVI to Lagarith with 4:2:0 settings in Virtual dub, since 4:2:0 is now the colorspace you are in. The files will be smaller when saved with Lagarith. Although, maybe ffmpeg doesn't recognize Lagarith codec? If it doesn't, I see why you save it back to HuffYuv. Perhaps Avidemux would recognize Lagarith encoded avi if ffmpeg doesn't. I've used MainConcept for MPEG2, and so I can say it recognizes Lagarith AVI input. Best of luck to you! |
Avidemux uses ffmpeg under the hood, so the results should be equivialent with the same settings. (Though the ffmpeg version in avidemux may be a bit older).
If you have a recent version of avisynth (2.6 or avisynth+) QTGMC supports YV16 and YUY2 (though it may be a little slower, especially when denoising) so you don't have to drop down to YV12 if you don't want to. That said there may not be much gain in quality over converting to YV12 first (particularly for PAL color) on a VHS source, due to camera resolution, internal VCR comb filtering etc. Also, it's possible to run ffmpeg on an avisynth script directly if you don't need to do extra filtering in virtualdub. Last thing, if you are publishing to youtube, I would recommend resizing up to 720p (can be 4:3 aspect still) otherwise youtube will convert to 640x480 29.97p or 25p (unless they've changed it recently). With 720p (or higher) the full 59.96/50 fps framerate and resolution is kept. You can use e.g nnedi3_rpow2 in avisynth (already installed if you have QTGMC up and running) for high-quality resizing, use it on the final output after all other filters. |
Wow, I never made the connection that the YV12 conversion was a 4:2:0 sampling. I'm going to have to go back and reread that section of the AviSynth wiki.
Erich |
Quote:
|
Quote:
Quote:
Quote:
Anyone have any ideas about running/processing Avisynth headlessly? If I could just write my Avisynth script in a CLI text editor, then use some command from the command line to process it that would BE GREAT. I understand this approach is not a good idea for doing actually restoration work because you really should see what you're doing, but if I'm just gonna be doing QTGMC and then encoding to H.264 for the bulk of my captures then doing it headlessly would be incredibly helpful. I can always go back to the lossless compressed file and do more in depth Avisynth restoration work. |
Quote:
Quote:
Hybrid is my tool of choice for x264 encoding. Very powerful GUI, makes not only x264 easy, but even basic/intermediate Avisynth and Vapoursynth. Quote:
Quote:
Quote:
Quote:
Quote:
Even some mild restore. (You can actually do semi-advanced restore with Hybrid, but the preview is lacking, likes to crash. For hardcore restore, AvsPmod suggested, manual Avisynth.) Quote:
Quote:
2.7 = x264 (2.6 works also, but now dated) Quote:
Quote:
Quote:
Quote:
Quote:
There are time when I'll read Avisynth discussions, and my eyes start to glaze over, mouth open, can feel a little drool forming. Seriously. It's essentially computer programming for video needs. It's not easy, even for more advanced users. Quote:
Quote:
|
Quote:
E.g: Code:
ffmpeg -i input.avs -c:v libx264 -preset slow -crf 17 -vf format=yuv420p -c:a aac output.mp4 Quote:
|
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.