VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Hi guys,
    I'd need a little help on this thing I'm working on.
    I have this mkv file (MediaInfo output):
    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
    I want to get a PAL DVD out of it.
    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?
    Quote Quote  
  2. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    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
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Thanks to both for replying.

    Originally Posted by manono View Post
    Do you think that 23.220fps is accurate?
    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?
    Originally Posted by manono View Post
    Take your output M2V (or MPV) from HCEnc and run it through DGPulldown set for 23.22->25fps.
    The .m2v file is 25fps already.
    Originally Posted by manono View Post
    Of course, the pulldown may or may not bother you.
    Generally speaking, I prefer to speed up (by a little amount, of course) rather than introducing pulldown.
    Quote Quote  
  5. Originally Posted by Instant Martian View Post
    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?
    Because the the 25fps video you made is at the wrong framerate?
    The .m2v file is 25fps already.
    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.
    Quote Quote  
  6. 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:
    Running it through DGPulldown like that slows the video to 23.976fps speed
    Maybe I'm missing something.

    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.
    Quote Quote  
  7. Originally Posted by Instant Martian View Post
    Maybe I'm missing something.
    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.
    Then I loaded the audio into BeSweet and changed the speed from 23998 to 25000.
    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?
    I learned something here: there isn't a positive way to know the framerate of a MKV file (at least to my knowledge).
    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.
    Quote Quote  
  8. 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?
    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.
    I understand this.
    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?
    you don't think using one of the NTSC->PAL presets for 23976->25000 makes 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.
    Have you even tried my suggestion yet?
    No, because:
    - I haven't had the time so far
    - I didn't quite understand the logic behind it (but again, I am probably missing something)
    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.
    Others seem to disagree with you here.
    Your problem is (maybe) that you're downloading MKVs made by idiots that don't know what they're doing.
    Don't know, maybe.
    Last edited by Instant Martian; 23rd Dec 2013 at 16:13.
    Quote Quote  
  9. Originally Posted by Instant Martian View Post
    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?
    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.
    Others seem to disagree with you here.
    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.
    Last edited by manono; 24th Dec 2013 at 02:55.
    Quote Quote  
  10. 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?
    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.
    isn't this the same as (different values, of course):
    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've used eac3to in the past. The speeding part is not the issue, the sync part is.
    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.

    No, I only said I've never had the problem
    That "Nonsense" at the beginning gives a general meaning to your statement imho.
    Anyway, I won't make an argument on this, maybe I misunderstood.

    Thanks for your help, I appreciate it.
    Quote Quote  
  11. Originally Posted by Instant Martian View Post
    isn't this the same as (different values, of course):
    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?
    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.
    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'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.
    Quote Quote  
  12. Not if you encoded for 23.976fps in the first place.
    I encoded a 25fps file.
    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.
    You seemed to be having trouble with the concept of DGPulldown adjusting the framerate or length
    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.
    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.
    I usually make the 6 mono WAV files in BeSweet
    How do you do that?
    I distinctly remember to have split a multi-channel audio track into several files once, but I can't remember which software I used.
    Quote Quote  
  13. 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.
    They are in sync (that 1% is maybe a 0.1% and it is in the original file too).
    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.
    How do you do that?
    In the AC3/OGG/PCM section of BeSweet is a box to tick to give you 16bit (Six) Mono Waves:

    * Edit later: I see poisondeathray showed you how to make it CFR again, in the other thread.
    Image Attached Thumbnails Click image for larger version

Name:	SixMonoWAVFiles.jpg
Views:	246
Size:	75.2 KB
ID:	22428  

    Last edited by manono; 29th Dec 2013 at 17:18.
    Quote Quote  
  14. 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.
    Maybe you are thinking of something like poisondeathray suggested here.
    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.
    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).
    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.
    I've been assuming the out-of-synch is progressive
    The 23.220 -> 25 audio is in sync. I would say 99.9%.
    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
    Quote Quote  
  15. Originally Posted by Instant Martian View Post
    ...did I understand correctly your notes on DGPulldown?
    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.
    Quote Quote  
  16. Didn't know that, interesting!
    Thanks for clarifying.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!