VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 32
  1. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    I'm trying to convert and MKV file to AVI. I tried using alltoavi but the file cuts off about half way through and only half the video converts!
    So I used mkvextractgui to extract the video and audio. The audio comes out fine but the video is only 23 minutes (of the 30). So when I try to mux them together with virtualdubmod, the frame rates are completely off.
    The original MKV is 29.97 fps, and the extracted AVI is too, but I don't get why there's only 23 minutes.
    Any help is appreciated!
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Probably Variable Frame Rate. Give up. .
    Quote Quote  
  3. Does the .mkv play normally on your pc?

    What video and audio codecs are being used?

    Use mediainfo on the .mkv (view=> text) to find out more info including running time, and frame rates for video & audio
    Quote Quote  
  4. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray
    Does the .mkv play normally on your pc?

    What video and audio codecs are being used?

    Use mediainfo on the .mkv (view=> text) to find out more info including running time, and frame rates for video & audio
    Thanks for the encouragement Baldrick...!

    Yes the video plays normally (30 minute run time) on my computer. MediaInfo is showing me Xvid codec, 29.970 fps, progressive interlacement, audio is vorbis, runtime of audio same as video.
    I'm stumped!
    Quote Quote  
  5. What happens when you play the vorbis audio by itself? 30 minutes? When you play the xvid file by itself? 23 minutes? Is it "sped up?"

    Try muxing the streams with avi-muxgui, you can specify a frame rate. I suspect it should be 23.967 which would be the discrepancy value (23 vs 30)

    Another option is to change containers with avidemux (there is no re-encoding with this method)

    1) Open it up in avidemux
    2) video sidebar set "copy"
    3) audio sidebar set "copy"
    4) format sidebar set "AVI"
    5) press save with extension (eg. "myfile.avi")

    If the running time is still off (video too short), manually enter fps (video=>frame rate => 23.967), and repeat the steps.

    Cheers
    Quote Quote  
  6. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    It seems the MKV-wrapped XviD was actually encoded @ 23.976fps
    BUT played back at 29.97fps by means of timecodes.
    Follow the suggestions from poisondeathray and pray.
    Quote Quote  
  7. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Well I tried both methods and was able to get the video the right length (29:13), but the video and audio didn't sync. The audio starts ahead, but then the video catches up and eventually passes the audio. Guess I'll have to play around with the fps.
    Quote Quote  
  8. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    I'm afraid the lack of sync is being caused not by the XviD stream,
    but by the Vorbis audio. Maybe you'll have to use a Winamp trick
    for getting a constant~samplerate audio track
    ( https://forum.videohelp.com/topic346029.html )
    Quote Quote  
  9. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Midzuki
    I'm afraid the lack of sync is being caused not by the XviD stream,
    but by the Vorbis audio. Maybe you'll have to use a Winamp trick
    for getting a constant~samplerate audio track
    ( https://forum.videohelp.com/topic346029.html )
    Hey Midzuki, I tried your Winamp trick and it outputted the mp3 to a WAV file, but there is only about 7 minutes of audio!
    Oh well.
    Quote Quote  
  10. If you couldn't get it right fiddling with the fps, chances are Baldrick was right and it is a VFR .mkv

    mkv2vfr extracts all video frames from a .mkv to a CFR .avi

    It comes in the Haali media splitter package. The only problem is that there is no GUI for it (command line only), so the easiest way is to copy your original .mkv into that folder

    The syntax is (mkv2vfr original.mkv output.avi), this will output an AVI file with CFR video

    Demux the audio from the original .mkv with mkvextractgui, and mux the "fixed" AVI file using avi-mux gui

    If it is a VFR .mkv, this should work. However, if it doesn't for whatever reason, the last option is to re-encode using avisynth into an encoder (using DirectShowSource, manually stating the fps, and convertfps=true) Of course you want to avoid re-encoding video if at all possible.

    Cheers
    Quote Quote  
  11. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    I tried your Winamp trick and it outputted the mp3 to a WAV file,
    but there is only about 7 minutes of audio!
    First it was an Ogg, now it is an MP3?
    Make up your mind already!

    Seriously now: it seems your OS/Winamp is somewhat screwed up
    Quote Quote  
  12. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    I'll give it a go with mkv2vfr.
    @Midzuki - Yeah I converted the OGG to an mp3 and wav, then tried all three files with your Winamp trick. All three came out as wav files with differing lengths.
    Quote Quote  
  13. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    It seems you did NOT do the direct conversion from .ogg to .wav
    via Winamp.

    All three came out as wav files with differing lengths.
    Of course!
    Quote Quote  
  14. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    @Midzuki - Wow I'm stupid I accidentally closed winamp because I didn't realize it was converting the OGG! So now that I have the full WAV file, should I convert it to MP3 or mux it to the AVI?

    edit--Well I used mkv2vfr to get the CFRavi. It changed the fps from 29.97 to 23.97. I used the original OGG and a converted MP3 (via Yamp) and tried to mux both with avimux. The resulting AVI was the right length, but the audio is still faster than the video.
    So I used Midzuki's winamp method and took the demuxed OGG and converted to WAV via Winamp. I converted that to MP3 and muxed with avimux. Same result as before.
    So I still have an AVI file with the audio a couple seconds ahead of the video. I feel that I could use Virtualdubmod to tweak the frames and get them to match, maybe.
    Quote Quote  
  15. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    The Ogg2Winamp2Wav method produces a CSR audio file with the correct playing time.
    Use that .wav to create a correct-length .mp3/.aac/.ac3/whatever.

    As for the video part... perhaps there will not be other solution
    than re-encoding the MKV via Avisynth's DirectShowSource
    Try
    "DSS("clip.mkv", audio=false, fps=29.97, convertfps=true)" --> Encoder --> New.AVI
    and pray.
    Quote Quote  
  16. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Tried avisynth with the commands you gave me and opening with KMplayer. It said it couldn't open the file because there were no combination of filters that could render the stream.
    Quote Quote  
  17. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    Quote Quote  
  18. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    None of them open the avs
    Quote Quote  
  19. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    Have you installed Avisynth
    Quote Quote  
  20. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Yes I've used avisynth before
    Quote Quote  
  21. Are these installed?
    avisynth 2.5.7 or greater?
    Haali media splitter?

    DirectShowSource("path\filename.mkv",fps=29.97,con vertfps=true, audio=true)

    I would use "audio=true" and open the .avs in virtualdub to encode. Too many things can go wrong if you separate audio & video, in this particular case
    Quote Quote  
  22. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Yes, when I open with VirtualDub I get "No video stream found"
    Quote Quote  
  23. Can you open other videos with .avs and virtualdub? (with a different corresponding script of course)?
    Quote Quote  
  24. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    I tried another MKV and made an AVS. Very strange, it gave me the same error in Virtualdub. In my taskbar, the codecs come up (Haali etc.) then the error pops up.
    Quote Quote  
  25. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    Welcome to the codec hell.
    Quote Quote  
  26. Try an .avs script on an .mpeg or DivX in .avi (just trying to narrow down where the problems is)
    Quote Quote  
  27. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Used a Divx avi and it worked. Hmmm...
    Quote Quote  
  28. Was the "other .mkv" that you tried from the same psycho encoded source? or a regular .mkv?

    What version of Haali are you using?

    Open up a .mkv in graphedit (file=>render media file), how are your .mkv's being rendered?
    Quote Quote  
  29. Member
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    graphedit is showing ffdshow video decoder
    Quote Quote  
  30. What video codec was the "other .mkv"? Just trying to narrow it down to XviD or .mkv containers

    Not sure what else to suggest except clean up your codecs & configuration, perhaps uninstall/reinstall with newest versions
    Quote Quote  



Similar Threads

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