Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How do I reduce the video size captured by the default camera using FFMPEG in Android ?

    12 octobre 2011, par Krishnendu

    I am trying to reduce the video size captured by the default camera (it's generating high resolution video) in Android. Does FFMPEG have a property to encode a video with given resolution? I tried to Google, but all examples are using command line mode for FFMPEG.

    My questions are:

    1. Can we use ffmpeg command line in Android?
    2. If not then how we will achieve it?
    3. Can we able record a video directly using ffmpeg in Android?
    4. Is there any other solution for this?
  • Error while Creating Videos from images using ffmpeg

    12 octobre 2011, par Rcrd 009

    I am trying to create videos from images sequence. I tried all the below code given in $ff_command variable.

    $path = dirname(__FILE__);
    $ff_command = "ffmpeg -f image2 -i {$path}/img%03d.jpg video.mpg";
    
    $ff_command = "ffmpeg -r 10 -b 1800 -i {$path}/img%03d.jpg test1800.mpg";
    
    $ff_command = "ffmpeg -i {$path}/img%03d.jpg -s 1280x720 -aspect 16:9 -r 24 -vb 20M teste.mp4";
    
    $ff_command = "ffmpeg -f image2 -i {$path}/img%03d.jpg -vcodec mpeg4 -b 800k video.avi";
    
    $ff_command = "ffmpeg -f image2 -i {$path}/img%03d.jpg -vcodec libx264 -b 800k video.avi";
    

    Most of these commands are creating a video file. But when I open that video nothing comes or first image is coming for a split second and nothing after that

    Please let me know what I am doing wrong here

    I noticed that video is too short to see. Is it possible to increase the video duration so that we can see all the images?

  • MPG & MPEG Options for FFMPEG ?

    12 octobre 2011, par Latox

    We are currently using the following (we haven't included what we're using for audio birtate and video bitrate as this can be changed by the end user):

    MPG:

    -vcodec mpeg2video -s 320x240 -ar 22050 -b 500 
    

    MPEG:

    -vcodec mpeg2video -s 352x240 -r 29.97 -acodec mp2 -ac 2 -ar 44100
    

    I found the above options while searching on Google, but I am struggling to find the best settings to use for these 2 formats, can anybody please suggest what to change / add / remove to make the MPEG & MPG conversion go more smoothly and output the highest quality.

    As I said, video and audio birate is chosen by the end user, so this will greatly increase quality, I am more concerned about the following parameters posted above.

    With the options used above, we are finding that the converted file is very, very lagged...

    What don't I need? What am I missing? What can be improved? What am I doing wrong?

    I need some advice for each format, MPG & MPEG.

  • ffmpeg : How do I loop audio when encoding video ? [closed]

    11 octobre 2011, par Glstunna

    I'm trying to encode a video with an mp3 and have that audio stream loop while the video stream is still running. The video steam is priority.

    I haven't seen commands in ffmpeg that allow this specifically. Does anyone have an idea?

  • Sending input to a command line program from PHP

    11 octobre 2011, par Karl Jóhann

    I'd like to be able to stop FFMPEG from PHP (on Windows).

    What I'm doing now is starting it as so:

    pclose(popen("start ffmpeg -i rtmp://livestream -o a_file.mp4", "r"));

    But as soon as I've done that I've lost all connection to the program (right?).

    I would like to send a 'q' to the process to stop it. Is there any way to do this?

    EDIT: I should probably explain that I use pclose because I need the PHP script to keep running and thus close the file pointer. Maybe the question should be: How can I keep the script running and the file pointer open?