Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Changing alpha value of images using ffmpeg

    6 décembre 2011, par Rajat

    How can i change aplha value of images using ffmpeg??? If it is possible than please guide me how to do it...

    If not than can i do it with php or javascript? I want to make permanent changes to images by changing their alpha valves...

  • Need explanation of details of ffmpeg and pipes comand

    6 décembre 2011, par Don Nummer Jr

    Got the following from FFmpeg FAQ:

    mkfifo intermediate1.mpg
    mkfifo intermediate2.mpg
    ffmpeg -i input1.avi -sameq -y intermediate1.mpg < /dev/null &
    ffmpeg -i input2.avi -sameq -y intermediate2.mpg < /dev/null &
    cat intermediate1.mpg intermediate2.mpg |\
    ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi
    

    Before i use or modify it I would like to understand it completely.

    What does the < /dev/null & do?

    I understand | is pipe but why |\ ?

    What is the -f mpeg after ffmpeg (Seems, it tells ffmpeg to accept the piped in output from the cat(?) )

  • Build Live Audio Stream Player

    5 décembre 2011, par Kurt

    For an internship project i've been trying to develop a simple audio player for audio live stream.

    Currently i'm using a homemade three buffering (of 1/3 s each) solution played by QAudioOutput, which recall himself after finished his reading.

    void VideoServer::getBuf(QBuffer * p_buf)
    {
        audio_chunk*    ac = NULL;
        std::vector v;
    
        v.clear();
        for (int i = 0; i < 20;)
        {
            ac = _audioPreviewSharedData->deQueueAudio();
            if (ac)
            {
                v.insert(v.end(), ac->v_buf.begin(), ac->v_buf.end());
                i++;
                delete ac;
            }
            else
                usleep(50000);
        }
        p_buf->close();
        p_buf->setData((const char *)(&v[0]), v.size()*2);
        p_buf->open(QIODevice::ReadOnly);
    }
    

    -

    void VideoServer::slot_launchAudioPreviewBuffering()
    {
        getBuf(_buf1);
        getBuf(_buf2);
        _state = 2;
        connect(_audioPreviewTimer, SIGNAL(timeout()), this, SLOT(slot_audioPreviewBuffering()));
        _audioPreviewTimer->start(0);
        connect(_audioOut, SIGNAL(stateChanged(QAudio::State)), this, SLOT(finishedPlaying(QAudio::State)));
    }
    

    -

    void VideoServer::finishedPlaying(QAudio::State state)
    {
        if(state == QAudio::IdleState) {
            slot_audioPreviewBuffering();
        }
    }
    

    -

    void VideoServer::slot_audioPreviewBuffering()
    {
        switch (_state) {
        case 0:
            {
                _audioOut->start(_buf2);
                getBuf(_buf1);
                _state = 1;
                break;
            }
        case 1:
            {
                _audioOut->start(_buf3);
                getBuf(_buf2);
                _state = 2;
                break;
            }
        case 2:
            {
                _audioOut->start(_buf1);
                getBuf(_buf3);
                _state = 0;
                break;
            }
        }
    }
    

    But i'm suffering of choppy sound (little interruption between audio chunk).

    How to play this flux without interruption () and with a reasonable delay between audio and video (less 1s) ? Is there a best way ? Am i doing wrong ?

    Thank you !

  • Can I use ffmpeg to create multi-bitrate (MBR) MPEG-4 videos ?

    5 décembre 2011, par hoangbv15

    I am currently in a webcam streaming server project that requires the function of dynamically adjusting the stream's bitrate according to the client's settings (screen sizes, processing power...) or the network bandwidth. The encoder is ffmpeg, since it's free and open sourced, and the codec is MPEG-4 part 2. We use live555 for the server part.

    How can I encode MBR MPEG-4 videos using ffmpeg to achieve this?

  • ffmpeg missing frames when generating video from images

    5 décembre 2011, par Eder

    I have been trying to generate a video from a set of images using ffmpeg. Everything seems to be working, but when I watch the video I notice that some of the images are missing. I checked the output from ffmpeg, and it seems that it processes all the source images. Has any of you experienced the same problem? I'm using mp4 format and mpeg4 codec.

    Interestingly, if I use avi format, without specifying any codec, I can see those missing images correctly (although the video seems to be jumping from one image to the next quite irregularly). By the way, I have only 14 images, so I set a frame rate of 6. The mp4 video is smooth with these settings, but the avi is quite 'jumpy'.

    Thanks in advance.