Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • FFmpeg decoding H264

    25 septembre 2011, par Steve McFarlin

    I 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.

    enter image description here

    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 poundifdef

    I 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:

    1. How do I factor the audio bitrate into this calculation? Is it additive (video file size + audio file size)?

    2. 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?

    3. 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 Lotus

    is 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 NoviceAndNovice

    I 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

  • Simple way to grab thumbnail of FLV in ASP.NET without changing permissions on server ?

    23 septembre 2011, par Rhys Causey

    I'm looking for a simple way to grab thumbnails of FLVs in ASP.NET, without having to change any permissions/settings on the server. Ideally, nothing is installed on the server machine, but if necessary, small tools such as FFmpeg are fine.

    I've tried FFmpeg using the command-line tool with Process.Start, but the same command that works in a Windows Forms application and from the command prompt does not work in ASP.NET (presumably because of permissions).

    I've also tried using TAO.FFmpeg, and it seems to be working most of the time, but fails randomly, and does not start working again until the machine is restarted. Even when I use the sample code (decoder.cs), it sometimes fails when I try to open multiple videos in a single request.

    If this isn't possible in a clean/straightforward way, I'm open to other suggestions.