Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Decode aac audio file with ffmpeg command ? [closed]

    23 octobre 2012, par MaiTiano

    how to decode the AAC format audio file(i.e. 1.aac) into pcm or wav file with ffmpeg command?

  • Fastest way to create a multi-frame tiff

    23 octobre 2012, par user1414470

    I need to create a multi-frame tiff file to store large number of images. Time consumption is very important here. Also my initial format is an 'avi' video so if i can change it directly it'd be great. Can you tell me how to do that? weather it is through programming or using some software isn't important but it would be great if it were through just ffmpeg(I'm already doing the frame separation with ffmpeg).

    Thank you

  • Reading JPEG in ffmpeg

    23 octobre 2012, par Paul Lammertsma

    I'm trying to get ffmpeg to encode several individual JPEG images into a video on Android. I've successfully built it for Android (see the configuration string at the end of this post).

    I can encode an h.263+ video with randomly generated frame content, and ffmpeg otherwise appears to work well.

    A similar question suggests that the following code should be sufficient to load an image into an AvFrame:

    // Make sure we have the codecs
    av_register_all();
    
    AVFormatContext *pFormatCtx;
    int ret = av_open_input_file(&pFormatCtx, imageFileName, NULL, 0, NULL);
    
    if (ret != 0) {
        printf("Can't open image file '%s': code %d, %s",
            imageFileName, ret, strerror(AVERROR(ret)));
    }
    

    The above returns the correct absolute file path and error:

    Failed '/sdcard/DCIM/Camera/IMG083.jpg': code -1094995529, Unknown error: 1094995529

    Incidentally, if I omit av_register_all(), it returns with error 2.

    I've compiled ffmpeg with the following arguments:

    ./configure --target-os=linux --prefix=$PREFIX --enable-cross-compile --extra-libs="-lgcc" --arch=arm --cc=$PREBUILT/bin/arm-linux-androideabi-gcc --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- --nm=$PREBUILT/bin/arm-linux-androideabi-nm --sysroot=$PLATFORM --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " --enable-shared --enable-static --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" --disable-everything --enable-demuxer=mov --enable-demuxer=h264 --disable-ffplay --enable-protocol=file --enable-avformat --enable-avcodec --enable-decoder=mjpeg --enable-decoder=png --enable-parser=h264 --enable-encoder=h263 --enable-encoder=h263p --disable-network --enable-zlib --disable-avfilter --disable-avdevice

    Any suggestions would be most welcome!

  • How to convert RTSP stream into flv/swf Stream (w. ffmpeg) ?

    22 octobre 2012, par acy

    I want embed a webcam stream (From geovision video server) into a website. Unfortunately only the rtsp stream gives direct access to the video data.

    I tried a bunch of different variants. With this version I got no errors:

    openRTSP -b 50000 -w 352 -h 288 -f 5 -v -c -u admin password rtsp://xxxxxx.dyndns.org:8554/CH001.sdp | \
    ffmpeg -r 5 -b 256000 -f mp4 -i - http://127.0.0.1:8090/feed1.ffm
    

    Unfortunately I get no video. Sometimes I see a single frame of the webcam, but no livestream.

    This is my ffserver.conf

    Port 8090
    BindAddress 0.0.0.0
    MaxClients 200
    MaxBandwidth 20000
    CustomLog /var/log/flvserver/access.log
    
    NoDaemon
    
    # Server Status
    
    Format status
    
    
    
    File /tmp/feed1.ffm
    FileMaxSize 200K
    ACL allow 127.0.0.1
    
    
    # SWF output - great for testing
    
     # the source feed
     Feed feed1.ffm
     # the output stream format - SWF = flash
     Format swf
     #VideoCodec flv
     # this must match the ffmpeg -r argument
     VideoFrameRate 5
     # another quality tweak
     VideoBitRate 256K
     # quality ranges - 1-31 (1 = best, 31 = worst)
     VideoQMin 1
     VideoQMax 3
     VideoSize 352x288
     # wecams don't have audio
     NoAudio
    
    

    What am I doing wrong? THe test.swf seems to load forever...

  • FFMPEG avcodec_find_decoder(2) (CODEC_ID_MPEG2VIDEO) always returns incomplete AVCodec ?

    22 octobre 2012, par Passer

    I got a problem with FFMPEG (avcodec-54.dll) 1) I wrote a .NET wrapper. As far as I can see it works well. 2) I try to decode something... and thats were the problem is:

    ...
      FFmpeg.avcodec_register_all();
    
      pAVCodec = FFmpeg.avcodec_find_decoder(CodecID.CODEC_ID_MPEG2VIDEO); //which is in int 2
      Console.WriteLine("CodecID " + (*pAVCodec).id);
      Console.WriteLine("CodecType " + (*pAVCodec).type);
      Console.WriteLine("CodecName " + (*pAVCodec).name);
    ....
    

    No EXC was thrown and the following output came:

    CodecID CODEC_ID_NONE
    CodecType 1790854254
    CodecName mpeg2video
    

    What confuses me the most is that the name is correct, but the id and type are wrong. In the previous Version if the DLL everything works fine. This behaviour came up with the new version. Any guesses or debugging tips?