VideoHelp Forum




+ Reply to Thread
Results 1 to 22 of 22
  1. Hello,

    I want to demux / extract the video and audio tracks from a MOV file and mux them into a AVI file, but if possible without re-encoding.

    What programs are my best bet...?
    (free programs are good but if there aren't any, not free ones are OK too.)

    Thanks.
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Can probably do this freely & easily with ffmpeg (and I have often done this, to a lesser extent, with $29USD Quicktime Pro), but part of the problem isn't just the demuxing+remuxing, it is whether the particular codec(s) used in the Video/Audio are supported in the other container format. E.g: MOV has AIC (a common video codec), but it's not available in AVI - nothing would know how to work with it. Similarly, you could have HuffYUV-encoded AVI, but if you put it into a MOV, it would be wasted with nowhere to go...

    So, use MediaInfo to find out what's inside that container to make sure it's cross-compatible.

    Scott
    Quote Quote  
  3. Thanks, that makes sense.

    In my case, the codec is h246, I took the movie myself with a Canon 5D camera.

    I understood that even in case of h246 there are more variations, but I guess that shouldn't be so critical so that can't be enveloped in AVI.

    So, I think I'll start with trying ffmpeg..
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Mp4camtoavi and mpeg streamclip(file->save as and select avi) might also work.
    Last edited by Baldrick; 5th Mar 2013 at 03:06.
    Quote Quote  
  5. Just for my information,
    would that be possible to be done with a DirectShow command too?
    In case yes, what would the syntax be?
    Quote Quote  
  6. I tried ffmpeg with the following command but it seems wrong.

    ffmpeg -i Test.mov -vcodec copy -an -f h264 test.h264

    The resulted file has the same size as the original (which has no audio), but it cannot be played!

    What would be a command line just for demuxing from MOV...?
    And the command to mux to AVI...?

    Thanks
    Quote Quote  
  7. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    What happens if you use
    ffmpeg -i Test.mov -vcodec copy test.avi
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Originally Posted by windranger View Post
    Just for my information,
    would that be possible to be done with a DirectShow command too?
    In case yes, what would the syntax be?
    Directshow itself doesn't have a CLI. It is just an API/Architecture that is accessed by other apps & UIs.

    For all intents & purposes, ffmpeg is the best implementation or substitute for what you're looking for.

    Scott
    Quote Quote  
  9. OK, I see, thank you.

    Baldrick:
    I used the ffmpeg -i Test.mov -vcodec copy test.avi command and the result is an avi file, same size as the original,

    however when I play it I can't see anything - it plays, but the screen stays completely black from the beginning to the end of the movie!

    I don't understand, why is that so...?
    Quote Quote  
  10. Originally Posted by windranger View Post
    OK, I see, thank you.

    Baldrick:
    I used the ffmpeg -i Test.mov -vcodec copy test.avi command and the result is an avi file, same size as the original,

    however when I play it I can't see anything - it plays, but the screen stays completely black from the beginning to the end of the movie!

    I don't understand, why is that so...?

    It works for 5d mkii files . But why would you want to do it ?

    ffmpeg -i input.mov -vcodec copy -acodec copy output.avi

    If you can't "see" anything, it might be a player or codec configuration problem on your system, try something like vlc, smplayer, kmplayer, etc...
    Quote Quote  
  11. I installed VLC and it worked.

    About the file, G-Spot says this: Codec: avc1 , Name: H.246/MPEG-4 AVC, Codecs are installed

    So why can't I play the avi file with Media Player Classic HC, and also I can't see it with other software that I want to use for editing...?
    Quote Quote  
  12. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Normally H.264-in-AVI uses the FourCC H264. AVC1 is uncommon, is structurally-diffferent, and most AVI splitters don't support it.

    Also, even if the FourCC is "H264" already, the file may have been muxed incorrectly.
    Quote Quote  
  13. OK, then in order to have a FourCC H264 codec in the AVI,

    is it necessary to re-encode everything, or can it be done easier with ffmeg, without re-encoding?
    Quote Quote  
  14. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Use "AVI FourCC Code Changer" (avic.exe).

    If the FourCC change doesn't make the file "playable", then I suggest:

    --- demux from the MOV source to a *raw* video stream ;

    --- remux the .264 file to AVI through avc2avi.exe

    HTH.
    Quote Quote  
  15. I tried avic.exe but it doesn't do anything; it doesn't convert it to FourCC, if I check with Gspot it stays the same...

    So, back to the starting point. The video codec in the MOV file is h264. From all the research I've done including on this Forum, this codec is particularly not editing friendly.
    Initially, I wanted to copy the stream without re-encoding, into a AVI file and edit it there, but even if the avi file plays I can't edit it.

    So I'm thinking of the options I have now.
    The videos are taken with my camera so they are quite heavy. The frame rate is around 40,000 fps. Of course, I don't need it so high.
    10 minutes of movie is about 3Gb.

    So going first through a RAW stream will generate too huge files. I can't afford this option.

    What I think to do is re-encode the video stream to mpeg2 and output to AVI, with ffmpeg, as framerate is high enough.
    (I prefer not to use divx or xvid codecs.)

    Please let me know if this is a reasonable option from the point of view of loosing as little quality as possible in the given situation.

    Thanks.
    Quote Quote  
  16. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Don't use G-Spot, prefer MediaInfo instead.

    Besides.... , what, 40 thousand frames per second?
    Quote Quote  
  17. OK, so here's a screenshot from MediaInfo, for a 4.5 seconds clip.

    Click image for larger version

Name:	test.mov.gif
Views:	349
Size:	25.6 KB
ID:	16673
    Quote Quote  
  18. P.S. Sorry, I was talking about the bit-rate, not fps w(hich is 30)
    Quote Quote  
  19. OK, so about my last question- would mpeg2 encoding with ffmpeg be the best solution in this case...?
    Quote Quote  
  20. Originally Posted by windranger View Post
    OK, so about my last question- would mpeg2 encoding with ffmpeg be the best solution in this case...?
    why are you doing this ? many people edit dslr footage natively

    unless you have older/slower hardware ?

    what software are you using to edit ?

    MPEG2 will be ok if you use high enough bitrate. The quality loss will be inversely proportional to the bitrate used
    Quote Quote  
  21. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    No mpeg2 is not the best solution, nor is re-encoding one or 2 more generations down to any other intermediate (except maybe lossless/VL). Stick with your originals. Figure this remuxing thing out first. Your bitrate is high to keep quality UP, given that your GOPs look like: IPPPPPPPPPPPPPP. This isn't quite as easy to edit as all-I-frame video, but it's not terrible (like some super-long-GOP xvids & AVCs). Try AVIC again: put "h264" in both slots (type them in if they aren't in the list).

    Scott
    Quote Quote  
  22. I used again avic, put h264 manually and checked with MediaInfo. Now Codec ID is h264 (before it was avc1); everything else is the same.

    Now, I have access to my friend's pc where Premiere CS3 is installed. This version doesn't support h264 codecs.
    I want to use this program because I want to add some effects, use fragments from multiple videos, etc.

    I know re-encoding is not good and it is best to stick to the original MOV video, but unfortunately on that is a PC and Premiere cs3 doesn't swallow it.
    (Changing just the container from mov to avi doesn't help, even with the avic tweak)

    That is why I'm looking for some solution, to be able to edit with that program...
    Quote Quote  



Similar Threads

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