Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg : AVI to FLV conversion doubles file size
22 septembre 2012, par weekensI convert AVI to FLV with ffmpeg using -sameq parameter (same quality):
ffmpeg -i test.avi -sameq -f flv sameq.flv
The resulting file has the same video and audio quality as the original, but it's more than twice the original file size:
84M sameq.flv 41M test.avi
Why does it happen?
Transcoder output:
ffmpeg version N-34750-g070d2d7, Copyright (c) 2000-2011 the FFmpeg developers built on Nov 12 2011 11:23:07 with gcc 4.6.1 configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab libavutil 51. 24. 1 / 51. 24. 1 libavcodec 53. 33. 0 / 53. 33. 0 libavformat 53. 20. 0 / 53. 20. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 48. 0 / 2. 48. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, avi, from 'test.avi': Duration: 00:06:30.00, start: 0.000000, bitrate: 866 kb/s Stream #0:0: Video: mpeg4 (Advanced Real Time Simple Profile) (DIVX / 0x58564944), yuv420p, 400x300 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16, 64 kb/s [buffer @ 0xa247ae0] w:400 h:300 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: Output #0, flv, to 'sameq.flv': Metadata: encoder : Lavf53.20.0 Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 400x300 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 25 tbc Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 44100 Hz, mono, s16, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (mpeg4 -> flv) Stream #0:1 -> #0:1 (mp3 -> libmp3lame) Press [q] to stop, [?] for help frame= 9742 fps=255 q=0.0 Lsize= 85074kB time=00:06:30.00 bitrate=1787.0kbits/s video:79163kB audio:5525kB global headers:0kB muxing overhead 0.455568%
-
how to use ffmpeg/libavcodec/libstagefright
22 septembre 2012, par 7bigtreesI just have a question about how to use
ffmpeg/libavcodec/libstagfright.cpp
: I try toavcodec_open2(st->codec, codec)
when I have use ffmpeg to setcodec->id
asCODEC_ID_H264,codec->name
aslibstagefright_h264
,that means I will open AVCodecff_libstagefright_h264_decoder
.but when
Stagefright_init->OMXCodec::Create->configureCodec-> initOutputFormat(meta)
, the process just Quit ! It is a bazinga !I knew that meta is Metadata, its data comes from
codec->extradata
, and in here, it means sps and pps, am I right?How can I use
libstagefright
sucessfully in ffmpeg? Can somebody give me an example? -
"Transcode" copying video/audio codec
22 septembre 2012, par JunCTionSI took some very shaky video, and went online to try and find how to stabilize it. I came upon this nice blog that uses transcode for it. Following the blog instructions it worked very nice, but the end result had a lot of compression artifacts. This I imagine is mostly due to using xvid as a new codec.
My intention is reuse the codec the camera originally used which is H.264/AVC but I haven't found a way of doing so (ran into various dead ends using either encoder -y mov... or -y ffpmeg.
In particular when using -y ffmpeg -F "-vcodec copy -acodec copy" it prints out:
[export_ffmpeg.so] warning: Video template standard must be one of pal/ntsc
but running
ffmpeg -i input.mov -vcodec copy -acodec copy output.mov
Presents no problem.
Any idea on how to do this? or an alternative to stabilize video on linux?.
-
ffmpeg convert to mp4 and ogg. Where error ?
21 septembre 2012, par John SmithNext code create convert video files but they are bad - files not play. Tell me please where error?
shell_exec("ffmpeg -i $infile_ogg -v 10 $outfile_mp4 2>&1"); shell_exec("ffmpeg -i $infile_mp4 -v 10 $outfile_ogg 2>&1");
i use code:
$outfile_mp4=$_SERVER['DOCUMENT_ROOT'].'/10001/ConcertMedia/1348213376.mp4'; $outfile_ogg=$_SERVER['DOCUMENT_ROOT'].'/10001/ConcertMedia/1348213376.ogg'; echo $outfile_mp4.'
'.'
'.$outfile_ogg.'
'.shell_exec("ffmpeg -i $outfile_mp4 -V 10 $ outfile_ogg 2> & 1");but i see only:
/hsphere/local/home/c292729/testwork.ru/10001/ConcertMedia/1348213376.mp4 /hsphere/local/home/c292729/testwork.ru/10001/ConcertMedia/1348213376.ogg
i not see consol log....
I will take any help
-
How to record video using ffmpeg on android ?
21 septembre 2012, par JunaidI want to create a video using ffmpeg by taking byte[] data from Android Camera. Now the problem is i don't have much knowledge about ffmpeg. So i need some documentation on ffmpeg. I will appreciate if anyone can provide some useful tutorial / sample code / example on ffmpeg and how it works , how it can be used to create video programmatically, Thanks.