1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MKV to DVD: Audio file won't re-sample

Discussion in 'MPEG-1 and MPEG-2 encoding (AVI to DVD)' started by thyguib, Feb 10, 2010.

  1. thyguib

    thyguib Member

    Joined:
    Feb 1, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    11
    Hi. I have an mkv file that I tried to convert to a DVD using avi2dvd, but the audio file wasn't re-sampled properly (when I play the .iso file, all I hear is silence). When I try using Total Video2dvd, the program crashes.

    I tried to demux the original mkv using mkvExtractGui and when I played the audio file, it worked fine. So I extracted both the video and audio and muxed them into a new mkv file which works fine, but when I try to convert it to a DVD, I still encounter the same problem.

    Thanks for any advice you might have.
     
  2. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,856
    Likes Received:
    0
    Trophy Points:
    66
    You haven't provided any details about the source audio format except
    to explain it doesn't work.

    Best thing to do is to drag the MKV into mediainfo,
    select view/tree and put the results in here.
     
  3. thyguib

    thyguib Member

    Joined:
    Feb 1, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    11
    Sorry, I didn't know what information was pertinent.
    ID/String: 2
    Format: AAC (Advanced Audio Codec v.4)
    Format Profile:LC
    Format Settings SBR String: Yes
    Format Settings PR string: No
    Codec ID:A_AAC
    Duration: 2h8mn
    Channels/string:6
    Channels position: Front: LCR Rear: LR, LFE
    Sampling rate/string: 48KHz

    Let me know if you need anything else. Thanks.
     
  4. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,856
    Likes Received:
    0
    Trophy Points:
    66
    Please try the conversion with AVStoDVD.
    http://sourceforge.net/projects/avstodvd/

    It's recommended often in the forums - perhaps your other
    converters are having issues with the AAC audio.

    Within the AVStoDVD project, you'll get a choice to convert the
    audio to 6-channel or 2-channel ac-3.
     
  5. thyguib

    thyguib Member

    Joined:
    Feb 1, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    11
    I tried to use avs2dvd but I still encountered an error. Here is the copy of the audio encoding process:
    AUDIO ENCODING. Please wait ...
    -------------------------------

    Temp>"C:\Program Files\AVStoDVD\Wavi\Wavi.exe" "C:\DO
    CUME~1\LOCALS~1\Temp\Pride and Prejudice_0_Pride.avs" - | "C:\Program Fi
    les\AVStoDVD\Aften\aften.exe" -b 448 -pad 0 -dynrng 5 -bwfilter 0 - "G:\Movies\P
    ride and Prejudice_0_Pride.ac3"

    Aften: A/52 audio encoder
    Version SVN
    (c) 2006-2007 Justin Ruggles, Prakash Punnoor, et al.

    Found PCM audio: 6 channels, 48000 Hz, 16 bits, 7698.744708 seconds.
    Warning: WAV file will be larger than 4 GB.
    Writing WAV file...
    input format: Microsoft WAVE Signed 16-bit little-endian 48000 Hz 5.1-channel
    output format: 48000 Hz 3/2 + LFE

    error allocating read buffer
    Error: Could not write to the standard output.

    ____________________________________________________

    So would changing the channel to 2.0 help this problem?

    Thanks.
     
  6. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,856
    Likes Received:
    0
    Trophy Points:
    66
    You seem to have reached the 4GB Wav file limit.

    Try it this way. Use AVIDEMUX to split the file in two.
    Leave 'video" on "copy", and set "audio" to "pcm"
    Use the A and B controls at the bottom to select the first half,
    save the file, then use A and B again to select the rest, save the file.
    (Use the GO menu at the top to jump to marker A or B as necessary)

    Setup AvstoDVD with the first part as title 1, and the 2nd part as
    title 2. It will encode as two seperate titles on the DVD,
    but if you select "play all" from the menu, it will play right through.
    Let us know how it goes.
     
  7. cyprusrom

    cyprusrom Active member

    Joined:
    Jan 5, 2006
    Messages:
    5,439
    Likes Received:
    1
    Trophy Points:
    96
    If you're trying to convert to DVD, where does the WAV come into play?

    Probably would be easier to convert the audio only to AC-3 using Audacity(just drag the MKV into Audacity and export to an AC3), then use that and the video to author the DVD.
     
  8. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,856
    Likes Received:
    0
    Trophy Points:
    66
    cyprusrom,
    The problem is the source file 6-channel aac,
    movie length 128 minutes. The tools that AVStoDVD uses,
    encodes to 6-channel wave as an intermediate temp file;
    then it does the conversion to dolby digital ac-3.

    The maximum size of 32-bit wav is 4GB which was reached hence the
    failure. My suggestion was to split the source file in two.

    As far as I know, AVStoDVD does not allow you to add more than one file
    per title while DVD Flick does. If the created dvd is intended
    to be a "keeper", perhaps DVD Flick should be considered for it's
    use of the single title. For casual viewing, not a concern.
     
  9. cyprusrom

    cyprusrom Active member

    Joined:
    Jan 5, 2006
    Messages:
    5,439
    Likes Received:
    1
    Trophy Points:
    96
    That makes sense, I guess the the audio needs to be decompressed before compressed to a different format...
     
  10. thyguib

    thyguib Member

    Joined:
    Feb 1, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    11
    Hi. I downloaded avidemux and tried what you said, but the audio became all garbled when I opened the file. I got a message saying, "if the file is using b-frames as a reference it can lead to stuttering. avidemux can use another mode which is safe but you will lose frame accuracy. do you want to use that mode?" At first I said no, then I got another message that said, Index: "You should use Tool-Rebuild frame." I tried saying yes to both messages, no to one and yes to the other, but the result was still the same no matter what option I chose. When it's imported into avidemux, it becomes garbled. Is there a setting I can change? I am completely unfamiliar with avidemux.
     
  11. cyprusrom

    cyprusrom Active member

    Joined:
    Jan 5, 2006
    Messages:
    5,439
    Likes Received:
    1
    Trophy Points:
    96
    Since you already have MkvMerge, use that to split your file in half. I think will do a better job at keeping everything in sync. The Audio/Video don't need to be processed before you load them gain in your DVD converting software.
    Enter whatever custom size(M for Megabits, or G for Gigabits)

    [​IMG]
     
    Last edited: Feb 17, 2010
  12. thyguib

    thyguib Member

    Joined:
    Feb 1, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    11
    Thank you very much for the tip with mkvmerge. I was unaware of that setting.

    I was able to split the file into two, but when I encoded them with avs2dvd, the video was choppy, and the audio was fine. I then tried avi2dvd, and the video was perfect, but the audio wasn't encoded properly. So I waited until avi2dvd finished encoding the pulldown.m2v file then made a copy to a different location before the program deleted the .m2v file. I then loaded the .m2v file from avi2dvd and the .ac3 from avs2dvd into tmpgenc dvd author. This way, there were no separate tracks, just one continuous video stream. However, I encountered an error that said, the GOP values are incorrect for a standard DVD. I continued anyway and used DVD shrink to make the ISO a proper size, but I am concerned that it won't play on a dvd player. It worked perfectly except for that warning. Could this be a result of copying the pulldown.m2v before another process that would have fixed the GOP values? (I don't fully understand what GOP values are). Is there a better way to go about it?

    I like using CCE as my encoder for mkvs but I don't know how to use it directly, so I need another program to manage it, like avi2dvd. avs2dvd appears to use a better audio encoder, so is there anyway to use CCE with it instead of HCenc?

    Thank you very much for your help and suggestions. I wouldn't have been able to do it without you. And cyprusrom, this is the second time I owe you one. Much appreciated.
     
  13. cyprusrom

    cyprusrom Active member

    Joined:
    Jan 5, 2006
    Messages:
    5,439
    Likes Received:
    1
    Trophy Points:
    96
    This looks like it turned to be quite some project:)...
    I have not personally used any video to DVD software that uses any of the encoders you mentioned, lie CCE or HEnc, but I have seen recommended The FilmMachine, people use it with CCE with good results. Give that a try.
     
  14. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,856
    Likes Received:
    0
    Trophy Points:
    66
    Regarding the jerky output, was it because of a frame rate mismatch?
    For example, your file is 25 frames per second, and you set the project to NTSC?

    I've done it before in AVStoDVD and the product runs the DGpulldown to
    re-time the frames so that they play at 29.97. Usually it works
    fine.

    The GOP is groups of pictures, and it's the way the MPG data is
    formatted. If you're encoding PAL, GOP should be 15, NTSC 29.97
    usually 18, and NTSC 23.976 (to which pulldown is applied to make
    it 29.97) should be 12.

    Could you post a 20 or 30 MB clip of your original source for us to look at?
     
    Last edited: Feb 19, 2010
  15. thyguib

    thyguib Member

    Joined:
    Feb 1, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    11
  16. cyprusrom

    cyprusrom Active member

    Joined:
    Jan 5, 2006
    Messages:
    5,439
    Likes Received:
    1
    Trophy Points:
    96
    "Pride and Prejudice", good movie. Me likey Keira:)

    I tried converting with DVD Flick, and it seems it cannot handle the 6 channel audio(didn't know that).The video came out great though.
     
    Last edited: Feb 19, 2010
  17. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,856
    Likes Received:
    0
    Trophy Points:
    66
    At a bare minimum, you should set your output format, ie.
    whether you want a PAL or NTSC DVD.
    In AVStoDVD, before you begin your project, hit the preferences
    button at the top and set the items in the audio/video tab,
    and perhaps the paths tab.
    Most everything else can be left as-is.

    I set my project to NTSC and decoded the clips in AVStoDVD.
    It handle the audio just fine, but it got the aspect ratio wrong !
    The source MKV has a physical res of only 832*480, but a "display
    aspect ratio " of 2.35, which AVStoDVD does not recognize properly.
    I was able to fix it by manually adjusting the avisynth script.
    I set it to this:
    Video = Video.AddBorders(0,75,0,75)
    Video = Video.lanczosresize(720,480)
     
  18. lphan

    lphan Member

    Joined:
    Apr 6, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    11
    Hello,

    I'm having the same problem with audio encoding from MKV. First of all, the audio wav file seems to be larger than 4GB, which choked both AVStoDVD and FAVC. Then I tried to follow the suggestions in this thread and used MKVMerge to split the MKV into 2 smaller MKVs. However, some frames in the resulted videos were garbled (audios are fine though). Is there any way to get around this? I'd appreciate any input from you.

    Thanks a lot,
    LP
     

Share This Page