Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
What are the specifications of Flex usable FLV videos ?
26 septembre 2011, par RiduidelI have a server which streams FLV files to a Flex client. In this flex client, the video timeline advances incoherently, and no video can be seen on screen (only the sound can be heard).
My FLV file has been generated using ffmpeg, which says (about this generated file)
FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers built on Aug 8 2010 04:24:04 with gcc 4.3.2 configuration: --prefix=/home/marpada/ffmpegfull --enable-gpl --enable-version3 --enable-nonfree --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-libfaac --enable-libvpx --enable-libfaad --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxvid --enable-libx264 --enable-libtheora --extra-ldflags=-static --extra-libs='-lvorbis -logg -lxvidcore -lx264 -lopencore-amrnb -lopencore-amrwb -lfaad -lfaac -lvpx -ltheora -lm -lpthread' --enable-small --enable-runtime-cpudetect libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0.11. 0 / 0.11. 0 [flv @ 0x95c6aa0]Estimating duration from bitrate, this may be inaccurate Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1) Input #0, flv, from '/appli/perigee_70ri/data/files/ged_bur%0/Imagettes/70ri/279/2/8/20_109021138o.70ri_FLV_preview_.flv': Metadata: hasMetadata : true hasVideo : true hasAudio : true duration : 589 lasttimestamp : 589 lastkeyframetimestamp: 589 width : 352 height : 288 videodatarate : 199 framerate : 25 audiodatarate : 125 audiosamplerate : 44100 audiosamplesize : 16 stereo : true filesize : 25058444 videosize : 15195503 audiosize : 9690850 datasize : 23027 metadatacreator : flvmeta 1.1-r202 audiocodecid : 2 videocodecid : 2 audiodelay : 0 canSeekToEnd : false hasCuePoints : false hasKeyframes : true Duration: 00:09:48.78, start: 0.000000, bitrate: 332 kb/s Stream #0.0: Video: flv, yuv420p, 352x288, 204 kb/s, 25 tbr, 1k tbn, 1k tbc Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16, 128 kb/s At least one output file must be specified
Which, as far as it seems to me, is OK.
Furthermore, the video plays nice in VLC.
-
FFmpeg decoding H264
25 septembre 2011, par Steve McFarlinI am decoding a H264 stream using FFmpeg on the iPhone. I know the H264 stream is valid and the SPS/PPS are correct as VLC, Quicktime, Flash all decode the stream properly. The issue I am having on the iPhone is best shown by this picture.
It is as if the motion vectors are being drawn. This picture was snapped while there was a lot of motion in the image. If the scene is static then there are dots in the corners. This always occurs with predictive frames. The blocky colors are also an issue.
I have tried various build settings for FFmpeg such as turning off optimizations, asm, neon, and many other combinations. Nothing seems to alter the behavior of the decoder. I have also tried the Works with HTML, Love and Peace releases, and also the latest GIT sources. Is there maybe a setting I am missing, or maybe I have inadvertently enabled some debug setting in the decoder.
Edit
I am using sws_scale to convert the image to RGBA. I have tried various different pixel formats with the same results.
sws_scale(convertCtx, (const uint8_t**)srcFrame->data, srcFrame->linesize, 0, codecCtx->height, dstFrame->data, dstFrame->linesize);
I am using PIX_FMT_YUV420P as the source format when setting up my codec context.
-
How to calculate ffmpeg output file size ?
25 septembre 2011, par poundifdefI am using ffmpeg to convert home videos to DVD format and want to calculate the output file size before doing the conversion.
My input file has a bit rate of 7700 kbps and is 114 seconds long. The audio bitrate is 256 kbit (per second?) The input file is 77MB. To get this information I ran:
mplayer -vo null -ao null -frames 0 -identify input.MOD
So in theory, the input file should have (roughly) a file size of:
((7700 / 8) * 114) / 1024
That is, (7700 / 8) is kilobytes/second, multiplied by 114 seconds, and then converted to megabytes. This gives me 107MB, which is way beyond my 77. Thus I am skeptical of his formula.
That said, after converting the video:
ffmpeg -i input.MOD -y -target ntsc-dvd -sameq -aspect 4:3 output.mpg
The numbers seem to make more sense. Bitrate is 9000 kbps, and applying the above formula, I get 125MB, and my actual output file size is 126MB.
So, two questions:
How do I factor the audio bitrate into this calculation? Is it additive (video file size + audio file size)?
Do DVDs always have a 9000 kilobit/second rate? Is that the definition of a DVD? Or might that change depending on video quality of my input video? What does "-target ntsc-dvd" guarantee about my video?
Why does my input file not "match" the calculation, but the output file does? Is there some other variable I'm not accounting for?
What is the correct way to calculate filesize?
-
Convert image sequence to flv video [closed]
24 septembre 2011, par Lotusis it possible, using PHP/FFMPEG, to convert a sequence of jpeg files (with progressive names, eg 0001.jpg, 0002.jpg, and so on) to a flv file?
-
FFmpeg problem while writing streams to file
23 septembre 2011, par NoviceAndNoviceI finally "able" to write video stream packets to a file using the function
av_interleaved_write_frame(outputContext, &packet);
But after a short period of time i got this error:
Application provided invalid, non monotonically increasing dts to muxer in stream 0: *numberX* >= *numberY*
Anybody has any idea, what may cause this? And how to fix it?
Best Wishes