I have some problems converting an avi file YUV/4:2:2/8/tv to YV12. I want to deinterlace the file in QTGMC
Is it even possible?
How can I deinterlace such file?
When I try to deinterlace and compress in Hybrid to mp4 it crashes when starting the first pass.
I also tried to write a script which would recognize the color type, but with no success.
The script goes like:
if /i "%pix_fmt%"=="yuv422p" (
echo The video is in YUV 4:2:2 8-bit planar format.
Link to clip
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 13 of 13
Thread
-
Last edited by Jokris; 26th Nov 2024 at 02:41.
-
QTGMC handles 4:2:2 as well as 4:2:0.
If you however want to convert 4:2:2 to 4:2:0 insert in your script ConvertToYV12(interlaced=true) before QTGMC
or insert ConvertToYV12() after QTGMC(), for example at the end of your script.
If it doesn't work upload a short snippet of your interlaced source. -
I have tried ConvertToYV12(interlaced=true) before QTGMC but without success.
I edited my post and put a clip at the bottom. -
Here you go. What's the problem?
Code:AVISource("yuv422-8.avi") AssumeTFF() QTGMC() ConvertToYV12() #if you want YV12
Last edited by Sharc; 26th Nov 2024 at 02:58.
-
I haven't been able to test after yet (my computer not nearby right now)
But if it works then thanks, I really appreciate it.
Which also makes me wonder if it always is ok to ConvertToYV12() after QTGMC? Because when I did it with my miniDV bands I did it before QTGMC and it worked as expected. But then my script also recognized 4:2:0 format then on the other hand. -
Either
ConvertToYV12(interlaced=true) before QTGMC()
or
ConvertToYV12() after QTGMC()
If you had ConvertToYV12() before QTGMC() the chroma is not processed correctly. It needs to be ConvertToYV12(interlaced=true)
You can always leave convertToYV12() after QTGMC. It does nothing if it has already been converted to YV12 before. -
I also have the same deinterlacing settings (except the speed), but still something is not right.
[Attachment 83758 - Click to enlarge]
should I convert somewhere in Hybrid to YV12? I see your output is yuv 4:2:0 8
When I write in cmd and try to convert with:
ffmpeg -i yuv422-8.avi -pix_fmt yuv420p output.avi
I get this:
[Attachment 83759 - Click to enlarge]Last edited by Jokris; 26th Nov 2024 at 07:37.
-
No idea what's wrong. You don't need ffmpeg.
I would select .mp4 or .mkv as container for x264, rather than .avi. But that's not your issue.....
Edit:
If nothing helps save the script of post#4 as jokris.avs and encode it with ffmpeg, like
Code:ffmpeg -i "jokris.avs" -c:a aac -c:v libx264 -preset medium -crf 18 -vf setsar=12/11,format=yuv420p "out.mp4"
Last edited by Sharc; 26th Nov 2024 at 10:31.
-
No conversion before feeding the file to Hybrid is necessary, Hybrid will:
a. convert to color space XY if some filter does not support the current color space
b. Hybrid will convert to the output color space set in the encoder
The error indicates that something if wrong with either the script or the ffmpeg call.
a. try whether the problem also happens with latest dev (recreate jobs, don't use old jobs)
b. if it does not: Read https://www.selur.de/support and share a debug output, also create a debug output of trying the Avisynth preview. (no clue why you switched to Avisynth)
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
Hello Selur
Hybrid seems to work after uninstalling and reinstalling.
Strange because I have no clue what in my settings were wrong
Thanks both of you for helping me out!
But why would I use VapourSynth instead of AviSynth?
Does it matter for deinterlacing? I use AviSynth because I try to write scripts in AviSynth, and I don't know if I can do something similar in VapourSynth (due to inexperience). -
In my honest opinion:
Vapoursynth:- pro:
- often scales better with multithreading
- more gpu and machine learning based stuff
- uses Python as a base
- more intuitive if you know some programming language
- quite active group of folks when it comes to anime/cartoon filtering with machine learning
- better cross-plattform support
- (better support in Hybrid, since I prefer it)
- con:
- requires Python
- No 'ClearAutoloadDirs'
- less filters and scripts
Avisynth:- pro:
- may be a bit easier (so folks that know no programming language)
- lots of (older) folks using it, so you often get more suggestions
- more filters and documentation
- implicit 'last' variable, can make starting out easier
- con:
- ugly GScript addition trying to add some basic programming language stuff (as soon as you use GScript yourself, you really should think about using Vapoursynth instead)
- sometimes finding up-to-date or just the right documentation and filter dependencies is a pain
- implicit 'last' variable, can lead to confusion and some scripts to really be unnecessarily complicated to understand
Side note:
Avisynth does get more of the color handling/tagging and machine learning stuff and (backport) of Vapoursynth filters.
Newer filters are often available for both.
Sadly, both are quite similar, both have a community which doesn't really care about (properly) documenting scripts.
=> it's up to your preferences
(I prefer Vapoursynth, but if you prefer Avisynth that is fine too.)
Strange because I have no clue what in my settings were wrong
Cu Selur
Ps.: About Hybrid: It is meant for advanced users, it can make some stuff easier, but you can also easily mess things up without really knowing it.users currently on my ignore list: deadrats, Stears555 - pro:
Similar Threads
-
Workflow to fully preserve color quality in YV12?
By rebus_x in forum EditingReplies: 2Last Post: 14th Sep 2022, 11:51 -
Can't get the right colors when doing RGB -> YV12 on Rec709 source
By rebus_x in forum Video ConversionReplies: 13Last Post: 3rd Apr 2022, 09:20 -
Colorspace Conversions - YUY2 and YV12
By Christina in forum RestorationReplies: 4Last Post: 5th Oct 2020, 19:46 -
Any 1080p60 YV12 capture cards available?
By Wam7 in forum Capturing and VCRReplies: 0Last Post: 17th Jun 2020, 10:43 -
Converting Blu-Ray YUV to RGB and back to YUV?
By killerteengohan in forum RestorationReplies: 17Last Post: 17th Mar 2020, 21:42