Log in

View Full Version : Simple Demux/Extract option in ffmpeg


TKC
21st May 2006, 00:28
Hello,

I sometimes need to change containers and the most complete A/V solution seems to be ffmpeg. As I heard, the developers don't respond to tracker items often, so I thought I might get help here. My posted tracker item:
You've created a great program!
But what I really miss is a Demux/Extract elementary
streams option. I now do it like that now:
> ffmpeg -i test.mp4 -vcodec copy -an video.h264
or for asf:
> ffmpeg -i test.wmv -acodec copy -vn audio.wma

But that always results in files with wrong headers. If
I demux an mp4 with MPEG4ip it works great, thought
it's based on ffmpeg...

Great program to transcode a LOT of files, but changing
containers and demuxing/remuxing doesn't work so
properly... Or am I doing something wrong?
Source (http://sourceforge.net/tracker/index.php?func=detail&atid=366082&aid=1492273&group_id=16082)

Maybe someone can help me...?

Greetz,
TKC

bond
21st May 2006, 11:20
try adding "-f rawvideo"

TKC
22nd May 2006, 00:22
try adding "-f rawvideo"

That isn't what I wanted. With this option enabled the movie is being decompressed which results in an extremely huge file!
I only want to demux/extract the elementary stream from a ffmpeg-supported container. Demuxing an mp4 with ffmpeg would look lifke this (how I do it):
ffmpeg -i infile.mp4 -vcodec copy -an -f h264 video.h264
But the resulting file is erroneous. Whereas with MPEG4ip it works great:
mp4creator -extract=1 infile.mp4

I notice that it works because the file produced by MPEG4ip is playable with MPC and ffdshow installed, and the file produced by ffmpeg is not.
Try it for yourselves and download a HD file from:
http://www.apple.com/trailers/

bond
27th May 2006, 19:08
-vcodec copy -f rawvideo -an raw.264