Before starting to use the filters, I wanted to know if I'm doing the basic editing correctly.
I've joined two videos together, which I have also trimmed down, hopefully I have done both tasks correctly and not missed anything. I have also cropped it and added borders, I know the border is slightly bigger on the right-hand side. Hopefully I've kept it 704x576.
I wasn't sure if I should have added ConvertToYV12 but I didn't think it was required? I then encoded it. Any advice would be appreciated. Thanks.
+ Reply to Thread
Results 1 to 30 of 88
-
-
You can use ++ (AlignedSplice) instead of + (UnalignedSplice) for better audio handling
When YV12 is not needed as final format, if a planar format is required by a filter during processing you can use ConvertToYV16() instead of ConvertToYV12(interlaced=true) to avoid a lossy conversion -
The OP encoded as interlaced AVC with 4:2:0 chroma subsampling. The conversion from 4:2:2 to 4:2:0 was handled as progressive, not interlaced. So the chroma of the two fields blurred together.
-
Thanks jagabo & lollo. If I ConvertToYV12 will that correct the two blurred fields? or did I do something wrong with the encode. Thanks.
-
Thanks jagabo. I have redone the video with the ConvertToYV12 line added.
-
Your crop/addborders reversed the field order of the chroma. 4:2:0 video should be cropped by mod 4, not mod2. You can avoid that problem by converting to YV12 after cropp/addborders.
-
Maybe as a general rule it is safe to put ConvertToYV12(interlaced=true) always at the end of the script, when encoding with x264 interlaced.
-
Thanks jagabo. I will do that and post it. I read about mod 4 mod 2 but didn't fully grasp it.
If instead I did crop (8,8,24,8) AddBorders(8,8,8,8) would that be mod4 as everything can be divided by 4? If that was the correct would I still put the ConvertToYV12 after the crop or after Assume TFF() Thanks. -
-
I've put ConvertToYV12 at the end of the script and also changed the crop/AddBorders to hopefully mod4 which looks better.
-
Thanks jagabo. Hopefully that looks better. Was the script correct for the joining two videos together and the trimming as I've never done either before. Thanks.
-
I think you script is fine now. The only thing I'd change is the "+" between the two AviSource() imports. Use "++" instead. That will insure audio sync in case a file has audio and video of different lengths. This was mentioned by lollo earlier.
But there's still something not quite right with the chroma of your encoded video. View your video frame by frame with a script like:
Code:LWLibavVideoSource("crop borders trim join yv12.mp4", cache=false) Bob(0.0, 1.0) StackHorizontal(last, StackVertical(UtoY(),VToY()))
Compare that with what I get using your script and the x264 command line encoder (same encoder, same "slow" preset, same crf, minor changes). The motion of the chroma is much smoother, the same as the luma.
What program are you using to encode the video? Could it be messing up the chroma? Try adding the Bob and Stacking lines to your conversion script. Is the chroma messed up even before encoding? -
Thanks jagabo. When I used your Bob StackHorizontal script lines on "opening presents 1 avi. without any crop/borders/trim I get the same chroma jerky motion. I used Virtualdub2 as the encoder. I think the chroma is a problem before it is encoded. How did you get the chroma smoother on your version? Thanks.
-
Hmmm..., the OP's capture seems to be ok, as I see it.
Code:AVISource("opening presents 2.avi") assumeTFF() Bob(0.0, 1.0) StackHorizontal(last, StackHorizontal(UtoY(),VToY()))
Added:
Shouldn't we actually inspect the chroma advancements for even and odd fields sequences, for 4:2:0 YV12 interlaced?Last edited by Sharc; 10th Mar 2023 at 05:13.
-
Thanks Sharc. Sorry I'm not following. What does that mean? Thanks.
-
I was just wondering whether we watch/analyze the encoded version correctly. Forget it for now. I have to think it over ... Never mind.
Figure below: White = luma samples, blue=chroma samples
[Attachment 69672 - Click to enlarge] -
@SkyBlues
I tried with VirtualDub2, and the chroma is encoded correctly, advancing with every field
Did you really have as the last line in your script:
ConvertToYV12(interlaced=true)
I can reproduce the chroma issue when I don't specify interlaced=true.Last edited by Sharc; 10th Mar 2023 at 07:33.
-
Using this script:
Code:LWLibavVideoSource("opening presents 2.avi", cache=false, format="YUY2") AssumeTFF() ConvertToYV12(interlaced=true) Bob(0.0, 1.0) StackHorizontal(last, StackVertical(UtoY(),VToY()))
The difference may be in LWLibavVideoSource vs. AviSource. AviSource uses the VFW system installed HuffYUV decoder. I don't have one installed so I used LWlibavVideoSource -- which is using its built in HuffYUV decoder.
Also, I'm using 64 bit AviSynth+. -
Thanks Sharc & jagabo. I will do the encode now and post it. Also I will check I did the ConvertToYV12(interlaced=true). Thanks.
-
Btw. I tested with AviSource and the Chroma plays smooth. I am using Avisynth+ 32bit. I encoded with the x264 encoder in AvsPmod and with the x264 encoder in VirtualDub2. No problem here as long as ConvertToYV12(interlaced=true) is in the script (as last line).
-
I've redone the encode. I did have ConvertToYV12 at the end of the previous script, but I'm obviously doing something else wrong. I added another ++ between the joined videos and have also made the top and bottom borders bigger. I then went into virtualdub and did save as AVI. I then encoded with virtualdub2 thanks.
-
Just drag and drop your script.avs onto the window of VirtualDub2, which will load it into Vdub's Script Editor. Or copy the script manually into VirtualDub2's Script Editor (Menu Tools -> Script Editor).
No need to save an intermediate avi. -
I've installed Avisynth+ 32bit but I'm getting this error message when I start up AvsPmod. It made me think could the problem I'm having with my chroma be related to a compatibility issue? I captured my videos with Virtualdub 1.9.11 (x86) I attached it's properties. Thanks.
-
I've never seen errors like that in AviSynth or VirtualDub. What happens if you just start VirtualDub? No errors? Try opening an AviSynth script with just
Code:version()
-
Thanks jagabo. The AvsPmod still opens and works but the error message comes up first. It doesn't affect virtualdub. I copied my plugins to Avisynth+ plugin folder and thought maybe this had caused problems. Thanks.
-
Here's a video that more clearly shows the motion of the chroma:
Code:AviSource("huffyuv.avi") # LWlibavVideoSource("huffyuv.avi", cache=false, format="YUY2") AssumeTFF() Bob(0.0, 1.0) ConvertToYV12(interlaced=true) StackHorizontal(last, StackVertical(UtoY(),VToY()))
Last edited by jagabo; 11th Mar 2023 at 10:12.
-
Thanks jagabo. What does that mean. Sorry to sound ignorant. What can I do to put it right? I've attached the video encoded with Avidemux but I'm guesssing it's no better than the Virtualdub2 version. Thanks.
Similar Threads
-
AVStoDVD AddBorders issue
By defbiz in forum Authoring (DVD)Replies: 4Last Post: 15th Sep 2022, 18:40 -
Need help with automated trimming and cropping
By burattino in forum Video ConversionReplies: 0Last Post: 28th Apr 2022, 22:36 -
multiAVCHD AviSynth error .AddBorders()
By pises in forum Authoring (Blu-ray)Replies: 3Last Post: 30th Jun 2021, 21:40 -
best software for trimming videos without rendering?
By deama in forum EditingReplies: 7Last Post: 20th Oct 2019, 03:08 -
Cropping multiple videos
By Kracov in forum EditingReplies: 6Last Post: 20th Mar 2019, 18:18