Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • C++ - Inject EditBox on OpenGL video stream

    15 juillet 2015, par Marco Reisacher

    I wanted to overlay/inject a EditBox over my OpenGL Video window. My Goal is a kind of Video text Insertion.
    I am recording my Video using ffmpeg, the Input source is a Blackmagic Decklink Video Card (unfortunately Blackmagic doesn't give you a lot of insight into the OpenGL part -> most of it is done behind the curtain in the API)
    In my Handler of the PreviewWindow I've got a method called "DrawFrame" that is responsible to draw the Images into the preview box of my application.

    I want to inject the TextBox (transparently) into that, because I am later reading the OpenGL stream into a buffer and then capture that off to a file using ffmpeg.

    Is there any possibility to do something like that?

  • ffmpeg uninstall from centos 6.6

    15 juillet 2015, par Edward Meaderds

    I am trying to remove ffmpeg and install the newest version but I can't get the old version out. This is the error when trying to install:

    Transaction Check Error:
      file /usr/lib64/pkgconfig/libpostproc.pc from install of ffmpeg-devel-2    .2.1-65.el6.x86_64 conflicts with file from package ffmpeg-libpostproc-    0.6.5-1.el6.rf.x86_64
      file /usr/include/libpostproc/postprocess.h from install of ffmpeg-    devel-2.2.1-65.el6.x86_64 conflicts with file from package ffmpeg-    libpostproc-0.6.5-1.el6.rf.x86_64
      file /usr/lib64/libpostproc.a from install of ffmpeg-devel-2.2.1-65.el6    .x86_64 conflicts with file from package ffmpeg-libpostproc-0.6.5-1.el6    .rf.x86_64
      file /usr/lib64/libpostproc.so from install of ffmpeg-devel-2.2.1-65.    el6.x86_64 conflicts with file from package ffmpeg-libpostproc-0.6.5-1.    el6.rf.x86_64
    

    Can someone help me with this issue? I have tried make ubinstall but that does not work, nor does yum remove ffmpeg nor the command yum erase ffmpeg x264 x264-devel.

  • i want to convert images(3 4ea) and mp3 to mp4 file

    15 juillet 2015, par John smith

    i am convert images(3~4) and mp3 to video with ffmpeg

    i use this command

    ffmpeg -loop 1 -i %05d.jpg -i sample.mp3 -c:v libx264 -tune stillimage -c:a aac -strict experimental -b:a 192k -pix_fmt yuv420p -shortest out.mp4

    converting is well done. but, Images are changing very short period.

    i want to set images changing period once every 10~15 seconds.

    How would I do that using ffmpeg?

  • ffmpeg player out of sync after seek

    15 juillet 2015, par sat

    I have a ffmpeg/SDL video player based on Dranger's tutorial07: https://github.com/illuusio/ffmpeg-tutorial/blob/master/tutorial07.c

    The image and the audio are not synchronized anymore, once seeked backwards to the beginning of the video. The image seems to be in the correct position unlike the audio. However, the video becomes synchronized subsequently being seeked forwards once.

    I trigger seeking in the main function's loop by keypress :

    incr = -get_video_clock(is) //to restart the video    
    if(global_video_state) {
        pos = get_master_clock(global_video_state);
        pos += incr;
        stream_seek(global_video_state, (int64_t)(pos * AV_TIME_BASE), incr);
    }
    

    Then stream_seek sets seek parameters of global structure:

    void stream_seek(VideoState *is, int64_t pos, int rel) {
        if(!is->seek_req) {
            is->seek_pos = pos;
            is->seek_flags = rel < 0 ? AVSEEK_FLAG_BACKWARD : 0;
            is->seek_req = 1;
        }
    }
    

    And here is the seek part of the decode_thread's main loop :

    if(is->seek_req) {
        int stream_index = -1;
        int64_t seek_target = is->seek_pos;
    
        if(is->videoStream >= 0) {
            stream_index = is->videoStream;
    
        } else if(is->audioStream >= 0) {
            stream_index = is->audioStream;
        }
    
        if(stream_index >= 0) {
            seek_target = av_rescale_q(seek_target, AV_TIME_BASE_Q, pFormatCtx->streams[stream_index]->time_base);
        }
    
        if(av_seek_frame(is->pFormatCtx, stream_index, seek_target, is->seek_flags) < 0) {
            fprintf(stderr, "%s: error while seeking\n", is->pFormatCtx->filename);
    
        } else {
            if(is->audioStream >= 0) {
                packet_queue_flush(&is->audioq);
                packet_queue_put(&is->audioq, &flush_pkt);
            }
    
            if(is->videoStream >= 0) {
                packet_queue_flush(&is->videoq);
                packet_queue_put(&is->videoq, &flush_pkt);
            }
        }
    
        is->seek_req = 0;
    }
    
  • Convert images to a video file while keeping the same file name ? [duplicate]

    15 juillet 2015, par Ertzi

    This question already has an answer here:

    My intention would be to get at the same time, picture1.jpg, picture2.jpg, picture3.jpg to video format such as picture1.mp4, picture2.mp4, picture3.mp4.

    I am currently using Mencoder and Linux bash code mencoder mf: //*.jpg -mf w = 1366: h = 768: fps = 6/60: type = jpg -ovc copy -oac copy -o images.mp4. But this command makes all the images into one video file (images.mp4).

    Can I do it with mencoder or ffmpeg? My linux bash coding skills are basic.


    I found a solution that works for me as I want. Thank you to all who helped me.

    #! /bin/bash for input in *.jpg do mencoder -ovc copy -mf w=1366:h=768:fps=1/11:type=jpg -ofps 30000/1001 mf://"$input" -o $(echo $input | sed -e 's/.jpg$/.mp4/') done