Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • iOS how to build ffmpeg

    10 février 2012, par zvoice

    How to build ffmpeg for iOS? I have got 5.0 framework and scripts from iFrameExtractor fail to build it with - invalid operand on inline asm ldr ${0:q}, $1

    Do you have a successfull experience with it?

  • FFMPEG shell execution with PHP - Unusual Error Because of GCC

    9 février 2012, par trocker

    I've been trying to debug the PHP Script, but the error message that I receive is very unusual.

    • CP, MV , WHOAMI - all these commands work with shell_exec
    • FFMPEG is installed
    • apache user - nobody with read write execute permission for nogroup to /usr/bin/ffmpeg.
    • FFMPEG working fine in terminal.
    • GCCPP is installed and GCC package is also installed.
    • Working with shell PHP command (brock@ubuntu~$ php runthis.php)

    Code I ran:

    exec('ffmpeg -i beep.mp3 -ac 1 -ar 48000 -ab 128k audio1.mp3 2>&1', $out, $rv);
    echo "output is:\n".implode("\n", $out)."\nexit code:$rv\n";
    

    I get the following error:

    output is: ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.0.0' not found (required by /usr/lib/libdirac_encoder.so.0) ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6) exit code:1
    

    Can someone help me out here?

  • Extracting clips from videos using the FFMPEG library - issue with audio

    9 février 2012, par velocipedestrian

    I'm trying to get my program to extract short clips from longer videos using the ffmpeg library. I found the dranger tutorial, which reads in video from files, and output-example.c, which outputs video, so right now I'm trying to glue the two together. The video works fine, but the audio appears to be sped up/corrupt.

    while(av_read_frame(pFormatCtx, &packet)>=0)
    {
        if(packet.stream_index==audioStream)
        {
            write_audio_frame(oc, audio_st);
        }
        ...
    }
    
    ...
    
    static void write_audio_frame(AVFormatContext *oc, AVStream *st)
    {
        AVCodecContext *c;
        AVPacket pkt;
        av_init_packet(&pkt);
        c = st->codec;
        static uint8_t audio_buf[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2];
        uint8_t* audio_buf_ptr = audio_buf;
        uint8_t *audio_pkt_data = packet.data;
        int audio_pkt_size = packet.size;
        int len1,data_size;
        data_size = sizeof(audio_buf);
        len1 = avcodec_decode_audio3(aCodecCtx, (int16_t *)audio_buf, &data_size,
                          &packet);
        samples = (uint16_t*) audio_buf;
        pkt.size= avcodec_encode_audio(c, audio_outbuf, audio_outbuf_size, samples);
        pkt.flags |= PKT_FLAG_KEY;
        pkt.stream_index= st->index;
        pkt.data= audio_outbuf;
        av_interleaved_write_frame(oc, &pkt);
    }
    

    pFormatCtx and oc are the input and output AVFormatContexts defined in dranger 1 and output-example.c respectively. audio_st is an AVStream defined in output-example.c. I tried inserting a

    pkt.pts = av_rescale_q(packet.pts, pFormatCtx->streams[audioStream]->time_base, st->time_base);
    

    but that did not fix the problem either.

  • ffmpeg compiling on MSVC9 (Visual C++ 2008)

    9 février 2012, par Dr Deo

    i want to compile ffmpeg on windows MSVC9 (Visual C++ 2008) because i want to use it in wamp server 2 which is compiled using the same compiler however am currently at a loss of how to do this as there are no visual studio solution files. I know it is possible because people have compiled dlls but i cant seem to find just how they did it . There are also some precompiled dlls here but they are incompatible with my php version 5.38. Please help

  • How can I tell if a file is a valid video stream using RVideo ?

    8 février 2012, par fenec

    I am trying to see if a file has a valid video stream using the RVideo library:

    read_file.rb:

    require 'rubygems'
    require 'rvideo'
    
    file_path="/mnt/glusterfs/video/2012/02/04/2012-02-04 1000 CSPAN United Nations Security Council Meeting (337711).mp4"
    puts file_path
    file = RVideo::Inspector.new(:file => file_path)
    

    I get this error:

    rbennacer@services:~$ ruby read_file.rb 
    /mnt/glusterfs/video/2012/02/04/2012-02-04 1000 CSPAN United Nations Security Council Meeting (337711).mp4 
    sh: Syntax error: "(" unexpected
    

    Even when I put a backslash before each space character and parenthesis character, I am getting that error.