Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Encoding a group of images with ffmpeg or mencoder

    5 novembre 2011, par user846400

    I have a group of H.264 images (I-frames only) that I want to encode into JPEG with a single command. For a single image encoding, I can use the following (ffmpeg):

    ffmpeg -i raw_image image.jpg
    

    It works fine. What about a list of images? I have tried the following, but it doesn't work:

    ffmpeg -i raw_image%d image%d.jpg
    

    I need a solution either in ffmpeg or mencoder. Any help will be appreciated.

  • Why doesn't -vcodec copy work with my H.264 files ?

    5 novembre 2011, par arlomedia

    I'm converting user-uploaded videos to H.264/MP4 files with ffmpeg 0.6.1:

    ffmpeg -i input.mov -f mp4 -vcodec libx264 -vpre medium -acodec libfaac -r 15 -b 360k -ab 48k -ar 22050 -s 480x320 fullclip.mp4
    

    Then I want to extract sample clips from those videos. This should give me the first 30 seconds:

    ffmpeg -i fullclip.mp4 -vcodec copy -acodec copy -ss 0 -t 30 sampleclip.mp4
    

    But when I do that, the sampleclip.mp4 file has no video track. I don't see an error message from ffmpeg; it just shows a final video size of 0kb in its output.

    If I apply the second command to the sample H.264/MP4 clip that came with JWPlayer, I have no problems. So it looks like I either need to tweak the first command to make a more compatible fullclip.mp4, or tweak the second command to make it process my fullclip.mp4. Can someone see what I'm missing?

    By the way, replacing the second command with the following command creates a video track, but takes more time and degrades the picture quality because it encodes the video again:

    ffmpeg -i fullclip.mp4 -vcodec libx264 -vpre medium -acodec copy -ss 0 -t 30 sampleclip.mp4
    
  • Drawing on video with ffmpeg

    5 novembre 2011, par waxical

    I'm trying to get some blocks of colour overlayed/burnt into video with ffmpeg. A bit like a watermark, I suppose but not a logo, just a block of color.

    I've looked at using the drawbox function, which appears to me as if it's only applicable to creating images, not video. Alternatively, I could layer an image on the video.

    Has anyone got experience with this sorta thing?

  • 4CIF H263 video fails to decode

    5 novembre 2011, par Ankuj

    I am trying to decode a H263 4CIF(704x576) resolution file with ffmpeg, but it is detected as mp3 file and fails to get decoded. I tried with lower resolution H263 files they get decoded easily as well as 16CIF. I am using ffmpeg version 0.6.1

  • Error splitting .mov file with ffmpeg

    5 novembre 2011, par Deepak Lamichhane

    I have used the following ffmpeg command to split the given media file.

    ffmpeg -i test.mov -ss 00:00:00 -t 00:07:00 -acodec copy -vcodec copy test1.mov
    

    The video "test.mov" has the following characteristics:

    Dimensions: 320 * 240
    Codecs: MPEG-4 Video, ACC
    Duration: 00:45
    Audio channels: 2
    Total bit rate: 1,292
    

    But while splitting it shows the following errors

    FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
    built on Apr 29 2011 12:03:13 with gcc 4.2.1 (Apple Inc. build 5664)
    configuration: --disable-debug --prefix=/usr/local/Cellar/ffmpeg/0.6 --enable-shared --enable-pthreads --enable-nonfree --enable-gpl --disable-indev=jack --enable-libx264 --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx
      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
    [aac @ 0x10181e200]channel element 1.0 is not allocated
        Last message repeated 215 times
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x10180b000]max_analyze_duration reached
    
    Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/sts-107-/Dev/cloudfactory/tmp/media/test.mov':
      Duration: 00:00:45.14, start: 0.000000, bitrate: 1297 kb/s
        Stream #0.0(eng): Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3], 1195 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc
        Stream #0.1(eng): Audio: aac, 0 channels, s16, 97 kb/s
    File '/Users/sts-107-/Dev/cloudfactory/tmp/media/ten/ten-1.mov' already exists. Overwrite ? [y/N] y
    [mov @ 0x10181cc00]sample rate not set
    Output #0, mov, to '/Users/sts-107-/Dev/cloudfactory/tmp/media/ten/ten-1.mov':
        Stream #0.0(eng): Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 1195 kb/s, 90k tbn, 30k tbc
        Stream #0.1(eng): Audio: libfaac, 0 channels, 97 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Could not write header for output file #0 (incorrect codec parameters ?)
    ""
    

    I couldn't figure out whats the problem.

    Any suggestions are most welcome Thank you in advance!!!