How can I get the raw mpeg4 ES video streams from avi files.
hi experts: Can anybody tell me how to split the raw mpeg-4 video stream out from a avi file by ffmpeg. I know I can use "ffmpeg -s cif -i xxx.yuv -s cif -codec mpeg4 xxx.m4v" to generate a m4v file and get the raw mpeg4(ES) video stream. But now ,I have some avi files whose video parts are all mpeg4, I want to get the video parts of them. How can I achieve that . Thanks ======= 2005-05-03 20:18:00 =======
It can run without any problems in my system. That means your command is not wrong. Maybe rebuild your ffmpeg will cover this problem.
And can you tell me how to split the mpeg-4 video stream out from a avi file. Thanks.
On Tue, 03 May 2005 12:11:13 +0200 Mauricio Alvarez <alvarez at ac.upc.edu> wrote:
Hi I am working with ffmpeg 0.4.9-pre1 on a pentium-m ubuntu-linux machine
I am trying to encode some YUV 420 raw test sequences into mpeg-4 or h.264 but I receive an error message related with the YUV input:
$ffmpeg -s cif -i yuv/foreman_cif.yuv -s cif -vcodec mpeg4 foreman.m4v
$ffmpeg version 0.4.9-pre1, build 4754, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-xvid --enable-x264 --enable-gpl built on May 3 2005 10:04:58, gcc: 3.3.5 (Debian 1:3.3.5-8ubuntu2) yuv/foreman_cif.yuv: could not find codec parameters
Sometime in the past I can do that.
Any comment or suggestion is welcome
Thanks
Mauricio Alvarez
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
.
= = = = = = = = = = = = = = = = = = = = ????????? ?? ????????pkucjw ????????pkumoonheart at 163.com ??????????2005-05-04
On Wed, 2005-05-04 at 11:32 +0800, pkucjw wrote:
Can anybody tell me how to split the raw mpeg-4 video stream out from a avi file by ffmpeg.
I know I can use "ffmpeg -s cif -i xxx.yuv -s cif -codec mpeg4 xxx.m4v" to generate a m4v file and get the raw mpeg4(ES) video stream. But now ,I have some avi files whose video parts are all mpeg4, I want to get the video parts of them. How can I achieve that .
Check out $ ffmpeg -formats for valid values for the -f parameter. Then use -an -vcodec copy and the appropriate -f value to get an mpeg4 elementary stream.
hi Erik Slagter: Thanks . I use $ffmpeg -i MVI_0000.avi -s cif -f m4v -vcodec mpeg4 MVI_0000video.m4v the MVI_0000video.m4v can be played well and can be recognized as a MPEG4 ES stream. " ffmpeg version 0.4.9-pre1, build 4731, Copyright (c) 2000-2004 Fabrice Bellard configuration: built on May 2 2005 11:34:21, gcc: 3.3.5 (Debian 1:3.3.5-6) Input #0, avi, from 'MVI_0000.avi': Duration: 00:00:28.2, start: 0.000000, bitrate: 1152 kb/s Stream #0.0: Video: mpeg4, 352x288, 25.00 fps Stream #0.1: Audio: mp3, 44100 Hz, stereo, 128 kb/s File 'MVI_0000video.m4v' already exists. Overwrite ? [y/N] y Output #0, m4v, to 'MVI_0000video.m4v': Stream #0.0: Video: mpeg4, 352x288, 25.00 fps, q=2-31, 200 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding [mpeg4 @ 0x8344bf4]looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag frame= 707 q=0.0 Lsize= 823kB time=28.3 bitrate= 238.5kbits/s video:823kB audio:0kB global headers:0kB muxing overhead 0.000000%" It works well. MVI_0000video1.m4v can play well by mplayer. ES stream is detected. output information for mplayer " Playing MVI_0000video.m4v. Cache fill: 0.00% (0 bytes) MPEG4-ES file format detected." But I want to get a high quality the default bitrate is just 200kb/s and i set the bitrate : $ ffmpeg -i MVI_0000.avi -s cif -f m4v -vcodec mpeg4 -b 1000 MVI_0000video1.m4v It can work. But the output stream MVI_0000video1.m4v can not longer play properly due to the wrong stream format detection as following: output information for mplayer " Playing MVI_0000video1.m4v. Cache fill: 0.00% (0 bytes) RAWDV file format detected." What is the problem? Thanks again. On Wed, 04 May 2005 11:26:02 +0200 Erik Slagter <erik at slagter.name> wrote:
On Wed, 2005-05-04 at 11:32 +0800, pkucjw wrote:
Can anybody tell me how to split the raw mpeg-4 video stream out from a avi file by ffmpeg.
I know I can use "ffmpeg -s cif -i xxx.yuv -s cif -codec mpeg4 xxx.m4v" to generate a m4v file and get the raw mpeg4(ES) video stream. But now ,I have some avi files whose video parts are all mpeg4, I want to get the video parts of them. How can I achieve that .
Check out $ ffmpeg -formats for valid values for the -f parameter. Then use -an -vcodec copy and the appropriate -f value to get an mpeg4 elementary stream.
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
On Thu, 2005-05-05 at 01:57 +0800, Chen Weisi wrote:
But I want to get a high quality the default bitrate is just 200kb/s and i set the bitrate : $ ffmpeg -i MVI_0000.avi -s cif -f m4v -vcodec mpeg4 -b 1000 MVI_0000video1.m4v It can work. But the output stream MVI_0000video1.m4v can not longer play properly due to the wrong stream format detection as following: output information for mplayer " Playing MVI_0000video1.m4v. Cache fill: 0.00% (0 bytes) RAWDV file format detected."
What is the problem? Thanks again.
Looks like a genuine bug in either ffmpeg or mplayer. What does the "file" util say about the stream? If it says it's mpeg4, then mplayer has a bug, if it says it dvvideo, ffmpeg has a bug.
in your mail you wrote: What does the "file" util say about the stream? ~~~~~~~~~~~What file utility will you choose? In my system ,the file whose suffix is "m4v" can not be recognized by the file utility? How to know the file format ? I have no idea about it. . On Thu, 05 May 2005 10:33:33 +0200 Erik Slagter <erik at slagter.name> wrote:
On Thu, 2005-05-05 at 01:57 +0800, Chen Weisi wrote:
But I want to get a high quality the default bitrate is just 200kb/s and i set the bitrate : $ ffmpeg -i MVI_0000.avi -s cif -f m4v -vcodec mpeg4 -b 1000 MVI_0000video1.m4v It can work. But the output stream MVI_0000video1.m4v can not longer play properly due to the wrong stream format detection as following: output information for mplayer " Playing MVI_0000video1.m4v. Cache fill: 0.00% (0 bytes) RAWDV file format detected."
What is the problem? Thanks again.
Looks like a genuine bug in either ffmpeg or mplayer.
What does the "file" util say about the stream?
If it says it's mpeg4, then mplayer has a bug, if it says it dvvideo, ffmpeg has a bug.
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
On Thu, 2005-05-05 at 17:30 +0800, Chen Jianwen wrote:
in your mail you wrote:
What does the "file" util say about the stream? ~~~~~~~~~~~What file utility will you choose? In my system ,the file whose suffix is "m4v" can not be recognized by the file utility? How to know the file format ? I have no idea about it.
I mean type this: file MVI_0000.avi
$mplayer 0002.avi ................................. Cache fill: 0.00% (0 bytes) AVI file format detected. VIDEO: [DIVX] 640x480 24bpp 25.000 fps 983.9 kbps (120.1 kbyte/s) ========================================================================== Trying to force audio codec driver family libmad... Opening audio decoder: [libmad] libmad mpeg audio decoder AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400) Selected audio codec: [mad] afm:libmad (libMAD MPEG layer 1-2-3) ========================================================================== $ffmpeg -i mvi_0021.avi -f m4v -vcodec mpeg4 mvi_0021video.m4v ========================================================================== ffmpeg version cvs, build 4752, Copyright (c) 2000-2004 Fabrice Bellard configuration: --prefix=/usr --libdir=${prefix}/lib --enable-shared --enable-mp3lame --host=i386-linux --enable-gpl --build=i386-linux --enable-faad --mandir=${prefix}/share/man --enable-vorbis --enable-faadbin --enable-pthreads --enable-faac --enable-xvid --enable-dts cc --enable-amr_nb --enable-amr_wb --enable-pp --enable-shared-pp --enable-ogg --enable-theora --enable-a52bin --enable-x264 Input #0, avi, from 'mvi_0021.avi': Duration: 00:01:20.5, start: 0.000000, bitrate: 1121 kb/s Stream #0.0: Video: mpeg4, 640x480, 25.00 fps Stream #0.1: Audio: mp3, 44100 Hz, stereo, 128 kb/s Output #0, m4v, to 'mvi_0021video.m4v': Stream #0.0: Video: mpeg4, 640x480, 25.00 fps, q=2-31, 200 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding [mpeg4 @ 0x403a4008]looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag frame= 2013 q=0.0 Lsize= 2994kB time=80.5 bitrate= 304.6kbits/s video:2994kB audio:0kB global headers:0kB muxing overhead 0.000000% ========================================================================== play the ES stream is ok! mplayer mvi_0021video.m4v It is MPEG4 video ES stream. ========================================================================== But the strange thing is that not all the avi files can do that successfully. There are half of avi files , the out put ES streams will be recognized as RAWDV.I don't know where is the problem. I guess it is due to the avi source files. I test a lot of avi source files with different video format. Can anyboy test some avi files , I think you will meet the same problem if my operation above is not wrong. Thanks. Playing mvi_0015video.m4v. Cache fill: 0.00% (0 bytes) RAWDV file format detected. VIDEO: [DVSD] 720x576 24bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s) ................................... On Thu, 05 May 2005 10:33:33 +0200 Erik Slagter <erik at slagter.name> wrote:
On Thu, 2005-05-05 at 01:57 +0800, Chen Weisi wrote:
But I want to get a high quality the default bitrate is just 200kb/s and i set the bitrate : $ ffmpeg -i MVI_0000.avi -s cif -f m4v -vcodec mpeg4 -b 1000 MVI_0000video1.m4v It can work. But the output stream MVI_0000video1.m4v can not longer play properly due to the wrong stream format detection as following: output information for mplayer " Playing MVI_0000video1.m4v. Cache fill: 0.00% (0 bytes) RAWDV file format detected."
What is the problem? Thanks again.
Looks like a genuine bug in either ffmpeg or mplayer.
What does the "file" util say about the stream?
If it says it's mpeg4, then mplayer has a bug, if it says it dvvideo, ffmpeg has a bug.
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
I think I know the problem. :) A stupid mistake I have made. In avi files, the video part stream has a maximum bitrate. When we want to split it out from the avi file, if the video codec of avi is also mpeg4, we should not set a bitrate value( -b xxx ) bigger than the original bitrate. On Thu, 05 May 2005 10:33:33 +0200 Erik Slagter <erik at slagter.name> wrote:
On Thu, 2005-05-05 at 01:57 +0800, Chen Weisi wrote:
But I want to get a high quality the default bitrate is just 200kb/s and i set the bitrate : $ ffmpeg -i MVI_0000.avi -s cif -f m4v -vcodec mpeg4 -b 1000 MVI_0000video1.m4v It can work. But the output stream MVI_0000video1.m4v can not longer play properly due to the wrong stream format detection as following: output information for mplayer " Playing MVI_0000video1.m4v. Cache fill: 0.00% (0 bytes) RAWDV file format detected."
What is the problem? Thanks again.
Looks like a genuine bug in either ffmpeg or mplayer.
What does the "file" util say about the stream?
If it says it's mpeg4, then mplayer has a bug, if it says it dvvideo, ffmpeg has a bug.
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
participants (2)
-
erik@slagter.name -
pkumoonheart@163.com