It doesn't hurt to always bob it or separate the fields, but I usually just open the unfiltered video to check it. If there's anything peculiar about it, I'll put on a Yadif(Mode=1) to have a further look.
My guess is a 64ms delay - the closest multiple of 32ms. Just a guess, though. I always work on audio so I convert first to WAV audio with any delay taken into account.I wonder what will happen if delay is 69ms. Will AviSynth create 64ms delay, or It has to be a rounded number for it to actually do anything.
+ Reply to Thread
Results 61 to 89 of 89
-
-
I do both. I look at the video as it comes out of the decoder (woven fields) and also with a Bob().
I think the 32ms audio delay granularity restriction is only with VOB. -
I do both. I look at the video as it comes out of the decoder (woven fields) and also with a Bob().It doesn't hurt to always bob it or separate the fields, but I usually just open the unfiltered video to check it. If there's anything peculiar about it, I'll put on a Yadif(Mode=1) to have a further look.
And is it because it's progressive the frames looks unfocused? because someone already did a bad conversion? this video looks way worse compare to the other.
Thank you again -
They don't differ. I said "a duplicate frame every 5th frame" , ie, without bobbing I see ABCDD, the 5th frame is a duplicate of the 4th, and all progressive (no combing). After bobbing you're seeing AABBCCDDDD, a 2:2:2:4 repeat pattern. Exactly the same thing.
Look at the frames without bobbing. There is no combing during motion.
In this case you only need to decimate, eliminate the duplicates, restore the original 24p film.
Someone resized this video vertically with SeparateFields().WhateverResize().Weave(). That creates the artifacts you're seeing on horizontal edges/lines. -
Exactly the same thing.
Someone resized this video vertically with SeparateFields().WhateverResize().Weave()
So I'm done with the NTSC DVDs, and has PAL now. Black bars at the video I shared, suggest this is NTSC converting to PAL. Also, quick google showed is an Anime from Japan, which is NTSC-J. Because it's NTSC the end-results should be 23.976? What about "Real" PAL cartoon (that wasn't converted). It should be 25?
I assumed NTSC converted to Pal is more complex to work with. I was able to pick steady frame movement to know what the pull down is. I tried normal TDecimate, and It ends with 20FPS. So I guess it isn't good. I used SRestore(frate=23.976), and while panned shots move at 1 frame per movement - some sections has blended frames. So is there nothing better to do except using SRestore here?
What about real PAL Cartoon? can I use TDcimate on it?
Thank you jagabo -
That PAL video is a little unusual -- it has partial field blending. If you look at individual fields you'll see some of them are clean but some have blending on only a part of the frame. This seems to work pretty well:
Code:Mpeg2Source("Pal.demuxed.d2v"Info=3) Blur(0.0, 0.15) QTGMC(Preset="fast") SRestore(frate=25)
-
Thank you jagabo
So, I'm familiar with most of the code. I didn't know the Blue() command, and now you mention it, I indeed see the ghosting effect you mentioned.
So answering myself by reading between the lines. It seems that even though the PAL video is NTSC converted into Pal, the final Frame rate should be indeed 25 and not 23.297. I also assume the true PAL videos should also be 25.
Does it means I always need to use SRestore? or TDecimate(mode=2, rate=25) can work too?
EDIT: Oh no. Seems like TDeimate want the new rate to lower then the current one. How can on TDecimate PAL?Last edited by Okiba; 3rd Mar 2021 at 09:41.
-
In this particular case 23.976 left many jerks from missing film frames. 25 worked better. I also tried 24.975 and 24.
Most, but not always.
With blended frames SRestore() will work better. It preferentially removes blended frames. TDecimate() preferentially removes duplicate frames. It will see blended frames as unique. -
Of course, the other option with field blended videos is simply to QTGMC them. It won't look any worse than playing the original DVD -- usually a little better since QTGMC is better than other deinterlacers (ie, the ones built into TVs, DVD players, graphics cards, software players, etc.).
-
In this particular case 23.976 left many jerks from missing film frames. 25 worked better. I also tried 24.975 and 24.
TDecimate() preferentially removes duplicate frames. It will see blended frames as unique.
usually a little better since QTGMC is better than other deinterlacers (ie, the ones built into TVs, DVD players, graphics cards, software players, etc.). -
By default TDecimate() removes one of every fiver frames to go from 29.97 fps to 23.976 fps. But it can be used to remove M of every N frames with TDecimate(Cycle=N, CycleR=M). Or if you know the desired final frame rate, TDecimate(mode=2, rate=fps). Just keep in mind that TDecimate() removes duplicate frames. If it runs out of duplicates it will remove the next most similar frames.
Yes. Just like NTSC TVs convert to 59.94 fps. That's why sports and soap operas look nice an smooth. -
By default TDecimate() removes one of every fiver frames to go from 29.97 fps to 23.976 fps. But it can be used to remove M of every N frames with TDecimate(Cycle=N, CycleR=M).
I'm running old DVD/VHS Captures into DVD now. But what will happen with modern animation. Computer generated animation for example, or Disney movies converted into DVD. where all is progressive and there is no repeats. If there's one movement per frame I should basically just convert it into mp4 without modifying it?
I had a chance for example to see an cartoons in 4:3 size, but it had big bottom/upper black bars like it's kinda wide screen. Can I just crop those and set SAR to be 16:15 (PAL)? -
When starting with a 25fps DVD? Why? If starting with an NTSC DVD and it's from a PAL master (and isn't field-blended), then:
TFM().TDecimate(Cycle=6,CycleR=1)
And that will give you 24.975fps. If starting with a PAL DVD made from an film master (and isn't field-blended) then:
TFM().TDecimate(Cycle=25,CycleR=1)
That will result in 24fps. -
Thank you.
I actually stumbled upon a DVD with repeated 25th frame. Cycle=25,CycleR=1 solved that.
What about a situation where there is no duplicated frames (and it's progressive)? It means It's fully progressive and I should do nothing?
I wonder if there's a way to know the FPS of the actual cartoon? When there's clean pull-down I can count, like 3:2 for example, I know what tool to use. But sometimes, It's very hard to find a pattern, because it's not steady, and there's pauses in the animation etc. So if it's PAL for example, I will try 25/1 to make it 24fps, find a panning shot - and verify there's a movement every single frame, and it's steady and does not jitter 2 frames. If not, I will try 6/1 for example that will give me 24.975, and check the panning shot again. I'm trying 25, 24.975, 24 and 23.976 - and I will pick the one that is most smooth.
Is there anyone to know the right FPS instead of trying and guessing?Last edited by Okiba; 4th Mar 2021 at 13:16.
-
That's why I asked "Why?" in my previous reply. Yes, leave it alone. Unless - UNLESS - it was speeded up from a film source. Then you might want to slow it back to film speed using AssumeFPS(24) (or 23.976) and slow the audio to match. I always slow mine.
I wonder if there's a way to know the FPS of the actual cartoon? -
it was speeded up from a film source.
I've never seen any European-created animations.
All the ones with which I'm familiar are meant to play at 24fps. However, sometimes you get portions created at 29.976fps,
So let me sure I get it correctly (excuse my verbosity, but there's a lot to grasp for someone without Video experience):
If animated and interlaced -
- TFM() it to turn it into progressive
- Find a panning shot
- If there 1 frame duplicated every 5 frame, It's NTSC, use TFM()TDecimate().
- If 1 frame duplicated every 6 frames, is PAL. Use TFM().TDecimate(cycle=6, rcycle=1)
If animated and progressive:
- Find a panning shot
- If 25th frame is duplicated, TFM().TDecimate(cycle=25, rcycle=1).
- If there's no duplication. Do nothing (unless it was speeded up).
* After TDcimate. End results should be either 23.976 or 24.985 for NTSC cartoons.
* If at any point there's blending frames, using QTGMC().SRestore() instead (23.976 for NTSC, 25 for PAL).
* If I have a PAL 25FPS video, It's progressive, and there's no duplication during panning shot, It might be a good idea to AssumeFPS(24). (how do you slow down the Audio accordingly by the way?)
Is that about right?Last edited by Okiba; 4th Mar 2021 at 15:35.
-
PAL speedup doesn't bother me. I usually keep 25p PAL video at 25p so I don't have to reencode the audio.
-
Sorry, my fault. After saying I haven't seen any PAL animations, I switched back to NTSC. I've seen interlaced anime end credits and progressive 29.97fps intros and also some of that in the middle of episodes. Thank goodness it's fairly rare.
Can one tell it? because I assume it's not possible to notice 1 FPS change while the video is playing. Perhaps by the origin of the video?
* If at any point there's blending frames, using QTGMC().SRestore() instead (23.976 for NTSC, 25 for PAL).
* If I have a PAL 25FPS video, It's progressive, and there's no duplication during panning shot, It might be a good idea to AssumeFPS(24).
(how do you slow down the Audio accordingly by the way?) -
Is that about right?
I've seen interlaced anime end credits and progressive 29.97fps intros and also some of that in the middle of episodes. Thank goodness it's fairly rare.
Animations are 24fps. Or used to be
Although the SRestore default is okay most of the time
EDIT: Oh what the hell. I'll attached it. Might be educational.
AviSynth can slow the audio along with the video with AssumeFPS(24000, 1001, sync_audio=true)
Code:AssumeFPS(24000, 1001, sync_audio=true) ResampleAudio(48000)
Thanks again!Last edited by Okiba; 5th Mar 2021 at 04:49.
-
Usually.
The video alternates between progressive frames for a while then 50:50 blended frames for a while. Since a blended frame is produced by averaging two adjacent frames, B = (X+Y)/2 (B = blended frame, X = one frame, Y = the next frame), X can be restored by reversing the procedure if you have a clean Y, X = (B-Y/2)*2. In practice, compression artifacts and limited granularity of 8 bit video make this unfeasible. For example, here's frame 11 (blended) restored by subtracting the clean frame 12:
[Attachment 57669 - Click to enlarge]
Code:src = Mpeg2Source("Blended.demuxed.d2v", Info=3) next = src.Trim(1, 0) # ie the next frame Overlay(src, next, mode="subtract", opacity=0.5).ColorYUV(gain_y=256, cont_u=256, cont_v=256)
DVD audio is always 48000 Hz. Assuming your slowing 25p to 23.976p, AssumeFPS will reduce the sampling rate from 48000 to 46034. ResampleAudio brings it back up to 48000. I don't know how AviSynth's conversion compares to Audacity, Besweet, or eac3to. -
Thank you jagabo. How this happened exactly? I assume it's a very bad convert from interlaced to Progressive?
Yea, I wondered that too. I guess I can do that with Audacity and test the differences:
Code:video = Mpeg2Source("D:\video.d2v") AssumeFPS(video, 24000) audio = NicAC3Source("F:\audio_at_23_976.ac3") AudioDub(video, audio)
- Crop doesn't effect SAR right? so in case I have 4:3 video with a lot of black bars at top and bottom (like a wide video was converted into 4:3) - I can crop it and SAR still be the same? (it's a very long from both sides).
- We talked about 8 pixel from each site hint MTU content convert into DVD. Is that the case for any black borders? I had couple of other scenario, 20 pixels from each side, or 10-12 from the top or bottom etc. Every kind of black borders donates to MTU and should be treated like that when calculating SAR? (so every PAL DVD with any type of black borders is 12:11 and every NTSC DVD with and type of black border is 10:11)?
- As far as I know mp4 x264 doesn't support multiple audio tracks right? so if I have audio for a DVD in both english and my native language - I am forced to have 2 identical files with different audio? -
One way of converting 24p to 25i is to duplicate one field every 12 frames, 2:2:2:2:2:2:2:2:2:2:2:3 pulldown. 12 frames becomes 25 fields, 24 frames become 50 fields. When woven together 50 fields becomes 25 frames. This produces two little jerks every second (arguably slightly smoother than duplicating one frame every second). But you end up with 12 progressive frames followed by 13 interlaced frames (or vice versa). If that is blend deinterlaced you end up with 12 clean frames followed by 13 blended frames (or vice versa). This particular video seems to switch between clean/blended every ~17 frames implying it was converted from a film rate slightly higher than 24 fps (maybe the sped the film up slightly to reduce the running time, then used a longer 2:2:2....:3 pulldown pattern).
Correct. Think of it this way: take a piece of graph paper with a square grid. Cut away part of the paper at the left and right. The remaining grid is still a bunch of squares -- the sampling aspect ratio (SAR) hasn't changed, it's still 1:1. What has changed is the shape of the paper, the display aspect ratio (DAR).
That suggest an ITU cap. Actually with PAL it's closer to 702 rather than 704, a total of ~18 rather than 16. And it's not always centered (which is why the wider frame is used).
In theory. In reality video is often mishandled so you can't simply assume the SAR. If you can find something with a known aspect ratio, like a large circle or a square directly facing the camera, you can use that to judge the correct aspect ratio.
Don't forget that one common film aspect ratio is 1.85:1, slightly wider than 16:9. Such a film in a 16:9 ITU cap will typically have small borders at the top and bottom as well as usual left and right borders. With an MPEG2 spec video it will fill the width but have small borders at the top and bottom.
x264 is a video encoder. It doesn't support any audio.
No. It's the container that supports multiple audio tracks. MKV, MP4, even AVI support multiple audio tracks. -
One way of converting 24p to 25i is to duplicate one field every 12 frames.
Don't forget that one common film aspect ratio is 1.85:1, slightly wider than 16:9. Such a film in a 16:9 ITU cap will typically have small borders at the top and bottom as well as usual left and right borders. With an MPEG2 spec video it will fill the width but have small borders at the top and bottom
No. It's the container that supports multiple audio tracks. MKV, MP4, even AVI support multiple audio tracks.
By the way. It was mentioned Film and Animation are 24FPS. There's something I'm not clear about. Those days, when I watch a movie from my Cable Provider for example, I get interlaced content. The TV act as de-interlacer, and we talked about the TV basically double the FPS (so sport for example will look smooth). So if I'm at PAL region, It means the movie plays at 50FPS. But shouldn't it technically be played in 24FPS (or even 25FPS)? what about the my old Camcorder VHS tapes. They are 25FPS. But I assume there is no problem with QTGMC them to 50FPS? as the original content was taken in 25FPS?Last edited by Okiba; 5th Mar 2021 at 12:42.
-
Here's the full DAR/SAR table assuming a 704 pixel wide cap contains the DAR (also true for 704xY DVD, rarely used):
Code:NTSC 704x480 16:9 DAR: SAR = 40:33 NTSC 704x480 4:3 DAR: SAR = 10:11 PAL 704x576 16:9 DAR: SAR = 16:11 PAL 704x576 4:3 DAR: SAR = 12:11
Code:NTSC 720x480 16:9 DAR: SAR = 32:27 NTSC 720x480 4:3 DAR: SAR = 8:9 PAL 720x576 16:9 DAR: SAR = 64:45 PAL 720x576 4:3 DAR: SAR = 16:15
There are several ways you can handle this. MkvMerge, ffmpeg, mp4box all have the ability to add multiple audio tracks once they have been encoded. Of course, ffmpeg can also encode audio.
AviSynth only handles one audio stream attached to a video stream. That audio stream can have as many tracks as you want. In the past I've "stacked" two stereo audio streams into a single 4 channel audio stream with MergeChannels() and AudioDub'd them to a video stream for output. Then I opened the AVS script in ffmpeg and split the 4 channel stream back into two stereo streams for encoding and muxing. It's probably easier to just have two scripts and encode the audio separately.
PAL sources will already be 25 fps by one method or another. They are (smart) bob deinterlaced to 50p for display. If the picture is 25p each frame is displayed twice at 50p, so there's only 25 motions per second. -
Here's the full DAR/SAR table
There are several ways you can handle this.
If the picture is 25p each frame is displayed twice at 50p, so there's only 25 motions per second.
I'm asking because my VHS Camcorder footage is 25fps interlaced. After de-interlacing it with QTGMC, I get 50FPS - which mostly look great, but some hard turns with the camera make me a bit disoriented as a watcher - like It should actually be 25. -
There is no 24i broadcast. The TV will use a smart deinterlacer on 25i broadcast, converting it to 50p.
I hesitate to say all, but yes, the vast majority of what's shot on film will be 24p.
The whole point of 25i is to provide smooth motion at 50 different (half) images per second. 25p flickers quite badly during high contrast, high motion shots. -
Note that even with material that's shot on film some/all shots may have been slowed or sped up before and/or after being telecined. So may not always get smooth results at 24 fps. This is especially true of opening credits in TV shows and cartoons.
Similar Threads
-
help DVDRip encoding of .VOB files using LINUX tools?
By precipizio in forum DVD RippingReplies: 1Last Post: 16th Apr 2020, 10:38 -
Splitting or trimming raw VOB or MPG files without re-encoding?
By DF001 in forum Capturing and VCRReplies: 3Last Post: 14th Mar 2020, 22:53 -
Multiple .VOB file to one file?
By neworldman in forum Video ConversionReplies: 12Last Post: 4th Jan 2017, 02:00 -
vob to mp4 - encoding using vdub to mimic HB settings
By wolfdogg in forum Video ConversionReplies: 27Last Post: 24th Dec 2016, 21:03