VideoHelp Forum




+ Reply to Thread
Results 1 to 28 of 28
  1. Member
    Join Date
    Apr 2004
    Location
    United States
    Search Comp PM
    I have some mkv files with the video in h264 and the audio on acc.
    I'm trying to convert them into avi or some other format so I can feed them into DVD-lab and burn to watch on a portable dvd player.
    I've tried alltoavi but that didn't work, it just sort of hung there while converting. It works fine for xvid/divx mkvs though.
    I have all the needed codecs and whatnot (the files play fine on my PC) so I don't know what the problem is.

    Can anyone recommend another tool (and/or) an easy to follow user guide that might help me?

    Please note, when it comes to working with h264 video I'm a complete n00b but I'm not a total n00b with video editing in general.
    Quote Quote  
  2. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Never tried this technique, but VirtualDubMod supports MKV containers. The question is, does the VFW codecs? With ffdshow, I would think yes.

    Here's MKVdemuxAll, which might make it a bit easier.

    http://sourceforge.net/project/showfiles.php?group_id=169837
    Quote Quote  
  3. Member
    Join Date
    Apr 2004
    Location
    United States
    Search Comp PM
    Thanks, but MKVdemuxAll doesn't seem to work all that well either.
    I went from having an mkv I can't convert to an avi that can't even be played.

    Vdubmod gives me an error message or freezes when opening h264 files.
    Quote Quote  
  4. Mod Neophyte redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    T_virus, in the future please use a more descriptive subject title in your posts to allow others to search for similar topics. I will change yours this time. From our rules:
    Try to choose a subject that describes your topic.
    Please do not use topic subjects like Help me!!! or Problems.
    Thanks, Moderator redwudz
    Quote Quote  
  5. Member
    Join Date
    Apr 2004
    Location
    United States
    Search Comp PM
    Sorry.
    Quote Quote  
  6. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Ah yes, forgot about one step.

    1) Demux with MKVdemux

    2) Resulting Video file won't play UNTIL you do the following:

    a) Download avc2avi

    http://mirror05.x264.nl/Sharktooth/force.php?file=./x264/utils/avc2avi_r594.7z

    b) rename the demuxed video file from whatever.avi to whatever.264

    c) Run the avc2avi GUI and choose your whatever.264 file . Run mux

    Now the resulting AVI will play

    -------------------------------------------------------
    Converting the Audio

    Download aacdecdrop http://www.rarewares.org/files/aac/aacdecdrop.zip

    Download libmmd.dll http://www.rarewares.org/files/libmmd9.1.zip

    Unzip and put both in same folder.

    drag your .aac files onto the aacdecdrop square and it will auto convert to wav.
    Quote Quote  
  7. Member
    Join Date
    Apr 2004
    Location
    United States
    Search Comp PM
    That worked except now the audio/video is much out of sync.
    Audio comes out 4233kbps 23:20 (59 seconds longer than video).

    Did I mention that I hate h264?
    Quote Quote  
  8. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Sounds like your video is VFR, which has nothing to do with H.264 or even mkv. When you assume that VFR video is CFR, its length changes.
    Quote Quote  
  9. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Indeed. You should hate VFR, not h264.
    Quote Quote  
  10. Member
    Join Date
    Apr 2004
    Location
    United States
    Search Comp PM
    So, I'm pretty much screwed then?
    Quote Quote  
  11. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    No, build a htpc. .
    Quote Quote  
  12. Member
    Join Date
    Apr 2004
    Location
    United States
    Search Comp PM
    Originally Posted by Baldrick
    No, build a htpc. .
    How's that going to help me watch these files on a portable dvd player when I'm several hundred to a couple thousand miles from home?
    Quote Quote  
  13. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Missed that part...or well you can build a portable htpc...a laptop, maybe just a bit too expensive though.

    Have you read https://forum.videohelp.com/viewtopic.php?t=320686&highlight=vfr ?
    Quote Quote  
  14. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    The iAudio A3 is supposed to support mkv. Still need to re-encode down to a lower resolution and BP or MP AVC instead of the HP that you probably have. But you could re-use the time code file and keep the video VFR. That's if the A3 can handle VFR.
    Quote Quote  
  15. Member
    Join Date
    Apr 2004
    Location
    United States
    Search Comp PM
    Ok, as this is the first time I've run into vfr can anyone explain how to convert it into a usable file as if explaining it to a complete idiot? (I already feel like one so why not)

    In MKVextractGUI the mkv looks like this
    Track ID 1: video (V_MPEG/ISO/AVC)
    Track ID 2: audio (A_AAC/MPEG4/LC/SBR)
    ect, ect.(only listed the two I care about)

    And another one looks like this
    Track ID 1: video (V_MS/VFW/FOURCC, DX50)
    Track ID 2: audio (A_AAC/MPEG4/LC/SBR)
    ect, ect.

    I'm going nuts with this.
    What ever happened to normal standard bitrates?
    Quote Quote  
  16. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    PITA, isn't it ? Here's the best writeup and how to I've read on the procedure.

    http://avisynth.org/VariableFrameRateVideo
    ---------------------------------------------------------------------------------------------------------
    From another post:

    VFR helper tool
    This utility is now part of the splitter package.
    As there are no tools to process/reencode VFR Matroska files, I've written a small utility to ease such processing.
    mkv2vfr extracts all video frames from Matroska to a CFR AVI file and a timecode file. You can extract video to avi, process it with any apps and mux back to matroska using a timecode file if you didn't add/remove frames. If you changed the frames you'd need to edit the timecode file by hand.

    http://haali.cs.msu.ru/mkv/
    --------------------------------------------------------------------------------
    avi_tc_package - 08/02/2006 v1.5 (Released)

    This package includes the commandline programs cfr2tc (v1.4), tc2cfr (v1.5), and tcConv (v1.0), as well as a GUI frontend named tc-GUI for using them. tc-GUI is a c# program and will require the .NET framework (at least version 1.1) to run. cfr2tc, tc2cfr, and tcConv are plain c++ commandline programs and do not require the .NET framework. Following are descriptions of cfr2tc, tc2cfr, and tcConv:

    cfr2tc takes an avi file with a video stream containing null frames and outputs a new avi file containing the same video stream, but with all null frames removed and a v1 or v2 timecode file. It also has timecode file only modes that create the timecode file but do not create a new avi file. As of v1.4 there is also the option to output an avs script instead of a new avi file.

    tc2cfr turns an avi file (with each frame present once) into a new avi file with null frames that has the specified framerate and varying display length for each individual frame based on a v1 or v2 timecode file.

    tcConv performs v1<->v2 timecode file conversions.

    Download http://bengal.missouri.edu/~kes25c/avi_tc_package.zip
    -------------------------------------------------------------------------------------------------------
    Quote Quote  
  17. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM

    I was getting ready to ask the same questions myself.
    Good I stumbled on this thread.

    Got a mkv wih avc and aac audio streams.

    Originally Posted by T_virus
    I've tried alltoavi but that didn't work, it just sort of hung there while converting.
    Tried it too.
    It worked. In a fashion....
    How long did you let it run? I had the impression it had hung too but it's just the avc2avi part which gives no (visual) indication of processing. Also takes long time...

    Anyway. AlltoAvi sucks!
    I ended up with an Xvid avi without sound, and it had deleted the intermediate mp3 file it produced during the processing....
    Anyway only having fixed bitrates sucks. 1000 kbps max just doesn't cut it for what I'm trying to do.

    Ok!

    So to me, this VFR issue looks fascinating but I doubt that is what is going on.
    First time doing this but I have strong suspicions it's a case of framerate conversion and not variable framerate.
    The avc2avi for some obscure reason has a default setting to convert to 25 fps.
    It's unlikely that your source is 25 fps, most probably 23.97 fps.
    Mine must be too. (What's the deal with not being able to see info like framerate in these mkv files when using mediainfo or gspot anyway? How are you supposed to know?)
    Anyway I haven't moved to the final stage myself yet but you could either try setting avc2avi to 23.97. Or just time shift your audio.
    Personally I'd just use time stretch in Soundforge at the stage you are.
    To me from the times you gave, it sounds exactly like you've had the video framerate change from 23.97 to 25. If you shorten the audio by a factor of 0.9588, it should be perfect.
    Of course I might be wrong.

    Anyway on to my own questions.
    I originally started with MKVExtractGUI to get my seperate streams (and thought I was halfway there). So I started with the audio which is simple for me....
    The aac streams wouldn't convert with dbpower!!
    About then I ran into this thread and moved on to use aacdecdrop. Then tried DbPower with the wav file and again the same error about not being able to find the codec needed!!! WTF!
    Finally got it to convert with Besweet. But why???

    Right now I'm trying to get my avc avi to xvid at the bitrate I want.
    When entering the avi into vdubmod i get the error:
    "Couldn't locate decompressor for format "h264" (unknown)
    VirtualDub requires a Video for Windows (VFW) compattible codec to decompress video.
    DirectShow codecs, such as those used by windows media player, are not suitable. Only 'direct stream copy' is available for this video"

    So what are my options?
    I think TMPGEnc Xpress could do it.
    Any suggestions?

    ty
    Quote Quote  
  18. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    "Right now I'm trying to get my avc avi to xvid at the bitrate I want.
    When entering the avi into vdubmod i get the error:
    "Couldn't locate decompressor for format "h264" (unknown)
    VirtualDub requires a Video for Windows (VFW) compattible codec to decompress video.
    DirectShow codecs, such as those used by windows media player, are not suitable. Only 'direct stream copy' is available for this video"


    You have to open ffdshow and choose h264 libavcodec active

    Quote Quote  
  19. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    If you are just going to re-encode it, then demuxing and remuxing to avi is pretty much a waste of time and space. You could just use AVISynth with directshowsource() to frameserve to VDubMod. Latest version shouldn't have any grey frame issues and if you have say CoreAVC, then you would get faster decoding than libavcodec.
    Quote Quote  
  20. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by Soopafresh
    You have to open ffdshow and choose h264 libavcodec active
    Thanks.
    I already encoded with MEncoder.

    Originally Posted by celtic_druid
    If you are just going to re-encode it, then demuxing and remuxing to avi is pretty much a waste of time and space. You could just use AVISynth with directshowsource() to frameserve to VDubMod.
    Nice! 8)
    The original plan was to demux and remux, just switch containers with the least hassle.
    As it got complicated I decided I might as well re-encode too and use the more universal Xvid.

    Originally Posted by celtic_druid
    Latest version shouldn't have any grey frame issues
    grey frame issues?

    Originally Posted by celtic_druid
    and if you have say CoreAVC, then you would get faster decoding than libavcodec.
    How much faster?


    I still don't unserstand the audio.
    Is there another way to extract both (all) audio tracks from mkvs aside from demuxing with MKVExtract GUI? Because the aac files I get are buggy. Nothing will convert them (not even besweet) except aacdecdrop. And then the wav produced by aacdecdrop is also buggy and won't work with dBpower but will with besweet.


    I'd say Celtic is right that vdubmod is the fastest easiest was to re-encode to avi.
    MEncoder worked well for me but it's a bit slow and the MeWIG gui and I had a hit and miss relationship.
    AlltoAvi sucks.
    StaxRip looked interesting but it's basically just using vdubmod anyway and I gave up at the first difficulty.

    If I was going from mkv to dvd though, I think i'd try and get TMPGEnc Xpress as it can take the video through that in a single step.

    cheers
    Quote Quote  
  21. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    TMPGEnc Xpress would just be loading via dshow. Anything else that can take input via dshow should work just as well.

    Encoding to an Xvid avi, mencoder should be faster. Both use libavcodec for decoding (ffdshow VfW) and both use Xvid for encoding. Just that mencoder's interface is more direct. Guess there is also the difference in speed of ICL compiled Xvid binaries vs. gcc compiled mencoder binaries.

    When you extract the audio, you get raw aac. Not everything can handle aac raw and some of the tools that do won't detect that it is SBR (assuming that it is). mplayer can decode to PCM wav directly from the mkv.

    Not sure how much faster. libavcodec has gotten progressively faster, but it still isn't multithreaded and I still think CoreAVC is more efficient. Probably not by a huge margin anymore though.

    There was a problem with directshowsource() where it would include grey frames in the output.
    Quote Quote  
  22. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by celtic_druid
    When you extract the audio, you get raw aac. Not everything can handle aac raw and some of the tools that do won't detect that it is SBR (assuming that it is). mplayer can decode to PCM wav directly from the mkv.
    Thanks for all the info.

    I wouldn't know how to tell if it's SBR or not.
    What does handle raw aac with sbr?

    I had problems again with the second audio stream. Besweet would convert the aacdecdrop wav to a mp3 of 3 times the length....
    Almighty God.
    So I tried a few things and ended up having dBpower convert the aacdecdrop wav to it's own wav, and then to mp3.
    Doesn't make sense.

    I tried playing with mplayer but it crashed on me and now is asking to be recompiled...
    I've never compiled anything in my life!

    Anyway assuming I get it running would this work:
    mplayer title.mkv -ao pcm:file=audio1.wav -vc dummy -aid 2 -vo null
    ?

    I liked MEncoder but it was slow (slower).
    Also I can't be bothered with command lines and getting past long path names and spaces in names...
    I like the look of MeWIG. But it only worked 100% for me once. The Sound Settings tab is effectively inactive full time.... It only detected the audio streams once for me. Now whatever I load into it it doesn't detect audio (avi, ogm, mkv, mp3, ac3, ogg).
    Don't know what to do.
    With the added bonus of being able to process a single stream while doing the video with a few clicks I like it. Without that option, less so.

    Originally Posted by celtic_druid
    TMPGEnc Xpress would just be loading via dshow. Anything else that can take input via dshow should work just as well.
    So the only diff is that tmpg doesn't require you to frameserve with avisynth.
    If you served in dshow you could feed it to cce, mainconcept and procoder?

    cheers


    edit:
    p.s.
    should i in future wrap the raw aac files with mp4box and then use my normal audio converting tools instead of using aacdecdrop?
    Quote Quote  
  23. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    The command would now be -ao pcm:fast:file=audio1.wav -vc null -vo null -aid 2, that is assuming that you have a recent build.

    mp4box would be fine. Just don't forget to flag the stream he/SBR if it is.
    Quote Quote  
  24. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    I finally did the conversion.
    100%

    It seems I had aac 5.1 audio in the mkv which is why I had a hard time with it.
    Even so, it's weird how the track I really wanted gave me more trouble and didn't respond to the brutish conversions the way the other track did. Track 1 went to mp3 ok..
    Track 2 ended up with clipping and horrid crackling.
    I wasn't amused by the fact that if you only want the first track of audio in mkv you have dozens of options but if you want the second track you are up against it.

    In the end I took the raw 5.1 aac from extraction and fed it into graphedit, to convert straight to 5.1 ac3. It worked very well. And I'm happy because it's the first time I've managed to operate graphedit.

    Just because I spent a lot of time on this
    questions:

    would the mplayer/mencoder command render a 6 channel wav?
    -ao pcm:fast:file=audio1.wav -vc null -vo null -aid 2
    If so how do you specify you want 2 channel output?

    What are the corresponding commands if working directlty with FAAD2?

    When putting the raw aac into a mp4 container with mp4box the .mp4 would playback silence with quicktime player (tried -sbr and -sbrx flags too).
    Why?

    Any tips on how to get mplayer/mencoder encoding functionality back would be appreciated.
    Since the crash it refuses to work. I don't know how to delete memory of this crash (aside from formating) from my machine so I can get funcionality back. It mentions recompiling but I didn't have to compile in the first place and I suspect that it would be easier to format than to try get some laguage software and learning compiling.
    Is there something i can do n the registry?

    Edit
    {Just unziping MPlayer 1.0rc1 Windows,
    But even tried to see if istalling MPUI full package woul help it didn't
    get the following error:
    MPlayer interrupted by signal 11 in module: demux_open
    - MPlayer crashed by bad usage of CPU/FPU/RAM.
    Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
    disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
    - MPlayer crashed. This shouldn't happen.
    It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
    gcc version.}

    ty
    Quote Quote  
  25. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Default is 2 channels. You can specify with -channels # though.
    Quicktime doesn't support SBR, still it should play.

    mplayer doesn't store any info in the registry. It is telling you directly or this comes from some front end? I have had mencoder crash plenty of times. It still continues to work. For compiling you will want mingw. Still in the end there is no no real difference between compiling and downloading a binary other than you can customise what you want in terms of libs and CFLAGS.
    Quote Quote  
  26. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by celtic_druid
    Quicktime doesn't support SBR, still it should play.
    It would play the raw aac. Once in an mp4 though there would only be silence.

    Originally Posted by celtic_druid
    mplayer doesn't store any info in the registry. It is telling you directly or this comes from some front end?
    I didn't think so.
    Which is why I don't understand it. After deletion, reboot and re-download, how does it still give the same error? Where is the memory of the crash stored?
    No front end, me, the executable and a command line.

    I might as well format sooner rather than later
    Quote Quote  
  27. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    There is no memory or record of the crash stored. It crashes during a certain scenario though then it make sense that it would continue to crash. Shouldn't when doing something else though.

    I have come to the conclusion though that mplayer/mencoder and P4's under windows don't get along. Whenever someone reports a crash, they are usually running a P4 and I can't usually reproduce it here.
    Quote Quote  
  28. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by celtic_druid
    It crashes during a certain scenario though then it make sense that it would continue to crash. Shouldn't when doing something else though.
    I have come to the conclusion though that mplayer/mencoder and P4's under windows don't get along.
    I guess runnning a P4 under windows is a rather unfortunate scenario.
    One get's used to it though

    Thanks for all the help
    Quote Quote  



Similar Threads

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