Hi guys,
I'd need a little help on this thing I'm working on.
I have this mkv file (MediaInfo output):
I want to get a PAL DVD out of it.General
Format : Matroska
Format version : Version 1
File size : 3.08 GiB
Duration : 2h 44mn
Overall bit rate : 2 687 Kbps
Writing application : mkvmerge v2.2.0 ('Turn It On Again') built on Mar 4 2008 13:20:25
Writing library : libebml v0.7.7 + libmatroska v0.8.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 44mn
Bit rate : 2 300 Kbps
Width : 1 280 pixels
Height : 544 pixels
Display aspect ratio : 2.35:1
Frame rate mode : Constant
Frame rate : 23.220 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.142
Stream size : 2.58 GiB (84%)
Writing library : x264 core 112
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=2300 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 2h 44mn
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 451 MiB (14%)
Default : Yes
Forced : No
As usual, I work on audio and video separately. In this case I used MKVExtractGUI2 to demux.
I managed to get a DVD compliant video stream (720x576 25fps) via DGAVCIndex -> Avisynth -> HCenc but audio is giving me troubles.
HCenc output is 02h:37m now (due to the different framerate I suppose) so the original AC3 output from MKVExtractGUI2 is out of sync (as it is 02h:44m).
My final goal is to mantain the 5.1 channels (I remember there was some piece of software that could split a multi-channel track in several WAVs and vice-versa, but I don't remember the name. Was it EncWAVtoAC3?), but first I was going to get a simple stereo track I need to syncronize subtitles.
I tried Besweet (AC3 to WAV) changing the framerate (from 23220 to 25000) but I got a file shorter than the PAL video.
So I used Audacity to stretch it to 02h:37m. I got the same lenght as the video (-/+ 0.2 seconds) but it's seems to gradually go out of sync too.
How in the world am I supposed to do this?
+ Reply to Thread
Results 1 to 16 of 16
-
-
trash it? not a valid framerate to begin with 23.22fps is nonsense. created by a moron.
--
"a lot of people are better dead" - prisoner KSC2-303 -
Do you think that 23.220fps is accurate? Anyway, try this. Take your output M2V (or MPV) from HCEnc and run it through DGPulldown set for 23.22->25fps. Then mux the result and see if it's in synch. There are at least two reasons to do it this way (if it works). One is that you can keep the audio unchanged. The other is that you'll keep the original more natural movement, rather than speeding it for PAL. Of course, the pulldown may or may not bother you.
If that doesn't work then the framerate as given by MediaInfo isn't correct and I'd next try DGPulldown for 23.976->25fps followed by a mux to check the synch. -
Thanks to both for replying.
I checked the file again. If I preview it in DGAVCIndex it seems to be 25fps (and I got a 25fps .m2v out of HCenc) so I am beginning to think MediaInfo is the problem here.
I am not much familiar with Matroska files, is there another way to check the framerate?
Anyway, if the original framerate is actually 25fps, there are two things I don't understand:
- why is the MPEG2 video shorter than the H264?
- hence, why the audio is out of sync?
The .m2v file is 25fps already.
Generally speaking, I prefer to speed up (by a little amount, of course) rather than introducing pulldown. -
Because the the 25fps video you made is at the wrong framerate?
I know that. The DGPulldown suggestions were meant as a test. You 'reset' the film's length at the same time keeping 25fps to check if either of those two framesrates synch up with the audio. I think maybe I'd try 23.976->25fps first, followed by muxing with the audio. Running it through DGPulldown like that slows the video to 23.976fps speed and, with any luck, it'll synch up with the audio afterwards. And if it does synch up, who knows, maybe the pulldown won't bother you. Beats reencoding the audio which you'll have to do if you keep your original reencoded 25fps video.The .m2v file is 25fps already. -
Sorry but I don't get it.
23.976 -> 25.000 means speed the video up to 25fps to me, so I don't understand this:
Maybe I'm missing something.Running it through DGPulldown like that slows the video to 23.976fps speed
Anyway, I came up with this: I took the number of frames and divided it by the lenght (in seconds), I got 23.998fps.
Then I loaded the audio into BeSweet and changed the speed from 23998 to 25000.
I haven't had the time to check it carefully but it looks 99% syncronized.
I have to see if introducing some delay or working on the lenght with Audacity makes it 100%.
In case I succeed, how am I gonna get the final 5.1 AC3 audio?
Is Audacity (or BeSweet) able to output such a file? Or will I have to split it into several wavs and work on each separately?
P.S.: I learned something here: there isn't a positive way to know the framerate of a MKV file (at least to my knowledge).
MediaInfo gives me that 23.220 odd value, GSpot gives nothing, DGAVCIndex gives me 25.000 and I found out 23.998.
So I posted a new thread about this here. -
You are. It does exactly what I said - slows the video to 23.976fps speed and adds pulldown (the flags that tell the player when the duplicate fields are to be inserted) to make it play at 25fps and become PAL DVD compliant. You could have accomplished the same thing in HCEnc by encoding as progressive 23.976fps (by sticking 'AssumeFPS(23.976)' into your script) and running the result through the same DGPulldown settings afterwards.
You don't think 23.976fps makes a lot more sense? Meaning the audio doesn't have to be reencoded at all if using the pulldown method? Have you even tried my suggestion yet? And if it absolutely has to be reencoded, you don't think using one of the NTSC->PAL presets for 23976->25000 makes more sense?Then I loaded the audio into BeSweet and changed the speed from 23998 to 25000.
Nonsense. I have yet to download one that wasn't correct in the framerate given by any program, or had any synch problems after being converted to DVD. Your problem is (maybe) that you're downloading MKVs made by idiots that don't know what they're doing.I learned something here: there isn't a positive way to know the framerate of a MKV file (at least to my knowledge). -
Ok, let me get this straight:
are you saying that any video (no matter the framerate) worked with DGPulldown the way you told me is slowed to 23.976fps and "pulldowned" to 25fps? Am I correct or I just don't get it?
I understand this.You could have accomplished the same thing in HCEnc by encoding as progressive 23.976fps (by sticking 'AssumeFPS(23.976)' into your script) and running the result through the same DGPulldown settings afterwards.
BTW, here it is the AVS script I used:
AVCSource("D:\...\filename.dga")
BicubicResize(720,448,0,0.6,2,0,1276,544)
AddBorders(0,64,0,64)You don't think 23.976fps makes a lot more sense?Yes I do. But I consider myself an eternal noob and the guys who write programs much smarter than me so if I see 23.220fps (or whatever) I assume that strange as it may seem, for some unknown reason, that is the value I have to work with.you don't think using one of the NTSC->PAL presets for 23976->25000 makes more sense?
No, because:Have you even tried my suggestion yet?
- I haven't had the time so far
- I didn't quite understand the logic behind it (but again, I am probably missing something)
Others seem to disagree with you here.I have yet to download one that wasn't correct in the framerate given by any program, or had any synch problems after being converted to DVD.
Don't know, maybe.Your problem is (maybe) that you're downloading MKVs made by idiots that don't know what they're doing.Last edited by Instant Martian; 23rd Dec 2013 at 17:13.
-
Not exactly. You're encoding for DVD and DVD allows only certain framerates, and the encoders will encode at only certain specific framerates. But you can encode at one of those framerates and then use DGPulldown to change the 'base' or 'true' framerate to something else. Its most common use outside of standard 3:2 pulldown for NTSC DVD is for NTSC->PAL or PAL->NTSC conversions. 23.976->25 or 25->29.97. In both of those cases the M2V has usually been encoded at the framerate wanted and the length won't change when applying either of those two pulldowns. However, it has another very useful purpose, and that is to apply pulldown, at the same time changing the length or framerate. Say I wanted to encode a 19.98fps silent film (as I have done many times), or other silent films at lower framerates than 23.976fps. I can't just encode for 19.98fps for DVD so I encode for 23.976fps and then afterwards in DGPulldown I set it for 19.98->29.97fps. This both slows the M2V down to 19.98fps and applies 3:3 pulldown making it compliant for NTSC DVD. With your 25fps M2V you're doing something similar - both slowing it and applying the right pulldown. Pulldown can be applied for framerates as low as 19.98fps for NTSC and 16.67fps for PAL (2/3 the required DVD framerate).
eac3to can speed up your 23.976fps audio (assuming that's what it is) to PAL speed all in one go, keeping the DD5.1. Don't ask me how as I haven't ever used it. I usually make the 6 mono WAV files in BeSweet and then load them into my AC3 encoder.
No, I only said I've never had the problem, not that others haven't had the problem. You made the blanket statement "I learned something here: there isn't a positive way to know the framerate of a MKV file" and I have yet to see one that doesn't have the right framerate shown in the player or MediaInfo or the AviSynth script I make when converting it to DVD.Others seem to disagree with you here.Last edited by manono; 24th Dec 2013 at 03:55.
-
Excuse me manono, I must be a little dumb here.
I understood (at least I think) what you wrote, but isn't is basically what I wrote too?
isn't this the same as (different values, of course):Say I wanted to encode a 19.98fps silent film (as I have done many times), or other silent films at lower framerates than 23.976fps. I can't just encode for 19.98fps for DVD so I encode for 23.976fps and then afterwards in DGPulldown I set it for 19.98->29.97fps. This both slows the M2V down to 19.98fps and applies 3:3 pulldown making it compliant for NTSC DVD.
I've used eac3to in the past. The speeding part is not the issue, the sync part is.are you saying that any video (no matter the framerate) worked with DGPulldown the way you told me is slowed to 23.976fps and "pulldowned" to 25fps?
But I haven't had the time to put my hands on it again and try your suggestions. I think I will after Christmas and let you know.
That "Nonsense" at the beginning gives a general meaning to your statement imho.No, I only said I've never had the problem
Anyway, I won't make an argument on this, maybe I misunderstood.
Thanks for your help, I appreciate it. -
Not if you encoded for 23.976fps in the first place. Then the framerate and length isn't changed at all. You seemed to be having trouble with the concept of DGPulldown adjusting the framerate or length when using it for 23.976->25fps on your video originally encoded at 25fps. But yes, you're right in the sense that DGPulldown can change the length at the same time adding pulldown, no matter the original or final framerates.are you saying that any video (no matter the framerate) worked with DGPulldown the way you told me is slowed to 23.976fps and "pulldowned" to 25fps?
I'm not promising or guaranteeing it's going to work. In your other thread something was mentioned about it possibly being variable framerate even though MediaInfo said it's constant framerate. If that's true with this video then all bets are off. But I think I'd do everything first under the assumption it's CFR 23.976fps and see what happens. Good luck.But I haven't had the time to put my hands on it again and try your suggestions. I think I will after Christmas and let you know. -
I encoded a 25fps file.Not if you encoded for 23.976fps in the first place.
I didn't see a reason to do otherwise. As you can see from the Avisynth script I used, I didn't change the original framerate, DGAVCIndex output a 25fps value directly from the H264 file I got from MKVExtract.
As far as I have understood, DGPulldown alters the framerate without changing the lenght, by adding (or subtracting?) "virtual frames" that are created during playback.You seemed to be having trouble with the concept of DGPulldown adjusting the framerate or length
But I thought this was possible only using the real framerate value of a video stream.
E.g., I have a 23.976fps video, I pulldown it to 25fps, now I have a 25fps stream of the same lenght of the original one.
You wrote this (correct me if I'm wrong): take a 25fps, feed it to DGPulldown and apply 23.975 -> 25. This way the video will be slowed to 23.976 and pulldowned to 25fps (hence it will be longer than the original).
It's the first part (the "slowing part") I didn't know (and don't completely understand, to be honest).
Anyway, if this is how it works... one never stops to learn.
I made some test, following (correctly I hope) your suggestions.
The pulldowned video (23.976 -> 25) is out of sync both with the original AC3 audio and with a 23.975 -> 25 wav I got from BeSweet.
This wav is in sync with the video I encoded (25fps, no pulldown) almost as much as the one I got using 23.220 -> 25, though the latter seems to be slightly better.
I checked carefully, the best option in this case seems to be the 25fps video I encoded in the first place + 23.220 -> 25 audio.
They are in sync (that 1% is maybe a 0.1% and it is in the original file too).
So I think this is it.
Now I have only to figure how to get the final DD 5.1 synchronized audio.
I think I mistook eac3to for another software, maybe HeadAC3he.
How do you do that?I usually make the 6 mono WAV files in BeSweet
I distinctly remember to have split a multi-channel audio track into several files once, but I can't remember which software I used. -
Okay, now you're getting somewhere. Even though, intuitively, one would think it's supposed to be 23.976, you seem to have proven it's not. So, maybe it really is VFR encoding and that's what's messing up the conversion. There's a way to make it properly CFR again in the script, but as I haven't run across MKVs like yours I haven't bothered to learn how. Maybe someone else will show up and help out. *
Anyway, it does seem odd the the 23.220->25 audio is the one that synchs the best with the 25fps video, and I think that's another piece of evidence that it was originally VFR encoded. I think at this point I'd make the audio the same length as the video using something like Audacity, and see if that does the job for you.
I've been assuming the out-of-synch is progressive - that it gets worse as the video goes along. If there's a delay involved as well, you can remove it using DelayCut.They are in sync (that 1% is maybe a 0.1% and it is in the original file too).
In the AC3/OGG/PCM section of BeSweet is a box to tick to give you 16bit (Six) Mono Waves:How do you do that?
* Edit later: I see poisondeathray showed you how to make it CFR again, in the other thread.Last edited by manono; 29th Dec 2013 at 18:18.
-
Maybe you are thinking of something like poisondeathray suggested here.There's a way to make it properly CFR again in the script, but as I haven't run across MKVs like yours I haven't bothered to learn how. Maybe someone else will show up and help out.
That is what I was going to do, but I think I can use it as it is (at least this is what I saw in tests).I think at this point I'd make the audio the same length as the video using something like Audacity, and see if that does the job for you.
BTW, I seem to be unable to get the exact lenght I want in Audacity, usually there's a difference (+/-) of some hundredth of a second.
The 23.220 -> 25 audio is in sync. I would say 99.9%.I've been assuming the out-of-synch is progressive
To be totally honest I don't know if the 0.1% is really there or it's just me being too pedantic.
Anyway, I will be sure only when I see the whole thing, from start to end.
Thanks for the BeSweet tip.
One last thing:
did I understand correctly your notes on DGPulldown?
Edit: I see you saw poisondeathray's post on the other thread
-
Yes. If you've encoded at the same framerate as the initial framerate of the DGPulldown pair of input/output framerates, you add the required flags at the same time keeping the length unchanged. Example - you encoded for 23.976 and are adding flags for PAL (23.976->25fps).
If you've encoded at a different framerate from the intitial framerate of the DGPulldown pair, you not only add the flags but also change the length to what it would be had you encoded for that initial number. Example - you encoded for 25 and are adding flags for PAL (23.976->25fps), at the same time slowing the video to film speed. Another example - you encoded for 23.976 and are adding flags for NTSC (19.98->29.97fps), at the same time slowing the video back to the original silent film speed.
Similar Threads
-
Sync issue when changing ts to mkv container using txmuxer
By mt123 in forum Newbie / General discussionsReplies: 3Last Post: 18th Dec 2012, 12:34 -
Odd audio/video sync issue with mkv
By agni451 in forum EditingReplies: 0Last Post: 5th Jul 2012, 23:18 -
Audio/video/subtitle sync problem converting MKV to DVD (Muxman issue?)
By crackerbear in forum Authoring (DVD)Replies: 3Last Post: 7th May 2010, 12:23 -
MKV framerate/Sync issue
By dragonkeeper in forum Blu-ray RippingReplies: 0Last Post: 15th May 2009, 00:14 -
Avi to DVD and Audio Sync Issue
By macbuz in forum MacReplies: 21Last Post: 11th Jan 2009, 20:04



Quote