Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg rtmp streaming

    4 février 2012, par Wazzzy

    I have Red5 oflaDemo Connected and working fine

    When I try to rtmp stream flv file with ffmpeg I am getting this errors

    root@zzz-OptiPlex-170L:~# ffmpeg -re -i '/usr/share/red5/webapps/oflaDemo/streams
    /avatar.flv' -vcodec libx264 -acodec copy -ab 128.k -ac 2 -ar 44100 -r 25 
    -s 320x240 -vb 660.k -preset slow -f flv 'rtmp://localhost/oflaDemo/streamTest' 
    
    
    Output #0, flv, to 'rtmp://localhost/oflaDemo/streamTest':
      Metadata:
        encoder         : Lavf53.24.2
        Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 320x240, q=-1--1, 660 kb/s, 1k tbn, 25 tbc
        Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 11025 Hz, mono, 16 kb/s
    Stream mapping:
      Stream #0:0 -> #0:0 (flv -> libx264)
      Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=   15 fps=  0 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s
    frame=   27 fps= 26 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s
    frame=   40 fps= 26 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s
    frame=   52 fps= 24 q=27.0 size=       7kB time=00:00:00.-4 bitrate=-1362.0kbits
    
  • Executing FFmpeg in php-cli

    4 février 2012, par ravz

    I used a ffmpeg command to get a screenshot of a video. It works fine. My problem is that it is throwing a "Internal Server Error 500". when i searched i found that i need to execute it through a php-cli. Can any1 help me out on how to execute the following code in php-cli

    $ffmpeg = 'ffmpeg.exe';
    
    $video = 'video.flv';
    
    $image = 'image.jpg';
    
    $interval = 1;
    
    $size = '109x109';
    
    //ffmpeg command
    
        $cmd = exec("$ffmpeg -i $video -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1");
    
  • How to fuse a .mp4 video with a .wav audio with an offset in ffmpeg from command line ?

    4 février 2012, par minder42

    I've got a tv clip in mp4 format containing audio and video, and an wav audio_commentary track.

    I've been trying to fuse them in ffmpeg and have they played online with a flash player (which can only take h264 format)

    What's the best ffmpeg command to accomplish this? My inputs are mp4 video, wav audio, and an offset in seconds which is the time the audio commentary starts relative to the start of the mp4 video.

    I tried

    ffmpeg -i input_audio.wav -i input_vid.mp4 -vcodec copy output.mp4
    

    and

    ffmpeg -vcodec copy -ss offset -i input_audio.wav -i input_video.mp4 output.mp4
    

    nether of these do what i want and output the video in the h264 format that is good for flash players- Is there a way to do this from command line in ffmpeg?

    Thanks in advance

  • how to encode videos for the web and mobile phones using ffmpeg

    3 février 2012, par Arnar Yngvason

    I'm running a website where users can upload their videos and they are all trancoded to the same format (mp4 a.t.m.). Up until now I've been using zencoder (transcoding as a service). But I want to start transcoding the videos on my own server.

    What I would like to know is:

    • Which formats should I transcode to and which sizes are needed for the videos to play on most mobile phones?
    • Do I actually need webm?
    • Which is better: CRF or VRF?
    • I would like the videos to have the same bitrate/quality as the originals. Can I set a max?
    • Is there a max bitrate I should not exceed if I want to videos to play everywhere?

    If someone would be so kind to write down the commands I need and explain how they work and what they do, I would be very thankful :)

  • Create Video Thumbnail of All Files in a Directory via FFmpeg and PHP

    2 février 2012, par Hashid Hameed

    I have searched all over the Google and StackOverFlow, but still did not find a solution for this.

    I want to generate video thumbnail of all mp4 video files in a directory and name the thumbnails as "filename.mp4".jpg

    I have ffmpeg and ffmpeg-php installed on my server. I also succeeded in creating thumbnails of one file at a time.

    So this is the situation, I have a directory named uploads which has lots of mp4 videos. Now, when I run the script, thumbnail of size 100x100 shoud be created automatically and placed in another folder "skrin". Eg: xxx.mp4 should have xxx.mp4.jpg has the thumb name.

    IMPORTANT: My filenames have spaces, single quotes, brackets etc in their file names. So the script should be able to handle this.

    Could some one help me ? I use the following shell command in php using exec to generate thumb of an individual video.

    exec("/usr/local/bin/ffmpeg -itsoffset -105 -i 'xxx haha.mp4' -vcodec mjpeg -vframes 1 -an -f rawvideo -s 100x100 'xxx haha.mp4.jpg'");