Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • MP4 codec support in Chromium

    9 décembre 2015, par Staggan

    We have integrated Chromium Embedded Framework into our Windows game to allow us to render web pages from within our application, and everything works fine, except MP4 videos.

    I understand Chromium does not include this codec due to licensing issues, but can anyone provide details on how we can add support, even if we have to license a codec for it.

    All the information we can find seems to be old, and the functions referred to appear to be deprecated... so we are at a bit of a loss.

    All the video serving networks we have spoken to appear to serve MP4s.. so changing encoding does not seem to be an option.

    Any advice would be greatly appreciated.

    Thanks

  • Open sourced library on video analysis and key frame extraction

    9 décembre 2015, par sunzhida

    I am new in multimedia analysis area.

    Recently, I am working on a project which is built on AngularJS and Flask framework and I want to realize the following functions in our website:

    • user can cut the video into segments and the website can merge all the selected segments into one new video;
    • the website can extract key frames of the new video which is generated by the first step;
    • the player can get a 'start time' parameter and a 'end time' parameter (or a 'duration' parameter) given by user and play the clips based on the user input parameters.

    For now, I have searched several tools like JWPlayer, FFMpeg. But I really have no idea on how to use them and whether they are the best tools for these requirements. I was wondering if you might be able to give me some advice.

    Thank you.

  • Adding an Overlay Using FFMPEG With Minimal Re-Encoding

    9 décembre 2015, par spaceman

    FFMPEG is really useful for cutting a part of a video, without re-encoding the video.

    I know it is also possible to use FFMPEG for adding an Overlay Image to a video, in a certain part of the video (for example from 10secs till 20secs).

    My question is: If I do this overlaying of an image, will the whole video get re-encoded because of that? Or just the relevant duration will be encoded?

    Also are there any options that I can use to make the re-encoding minimal?
    The purpose if of course to keep the quality of the video like the original one..
    (I would ask for no re-encoding at all, but I don't see how that might be possible...)

    Thank you

  • Pipe opencv images to ffmpeg using python

    9 décembre 2015, par jlarsch

    How can I pipe openCV images to ffmpeg (running ffmpeg as a subprocess)? (I am using spyder/anaconda)

    I am reading frames from a video file and do some processing on each frame.

    import cv2   
    cap = cv2.VideoCapture(self.avi_path)
    img = cap.read()
    gray = cv2.cvtColor(img[1], cv2.COLOR_BGR2GRAY)
    bgDiv=gray/vidMed #background division
    

    then, to pipe the processed frame to ffmpeg, I found this command in a related question:

    sys.stdout.write( bgDiv.tostring() )
    

    next, I am trying to run ffmpeg as a subprocess:

    cmd='ffmpeg.exe -f rawvideo -pix_fmt gray -s 2048x2048 -r 30 -i - -an -f avi -r 30 foo.avi'
    sp.call(cmd,shell=True)
    

    (this also from the mentioned post) However, this fills my IPython console with cryptic hieroglyphs and then crashes it. any advice?

    ultimately, I would like to pipe out 4 streams and have ffmpeg encode those 4 streams in parallel.

  • Is There a Difference between These 2 FFMPEG Commands ?

    9 décembre 2015, par spaceman

    If you have a 1:30h video, and you want to cut a part of it without re-encoding it, you can use FFMPEG for that.

    For example, To cuts a 30 mins video out of an original video, starting at 15mins 30secs, the command will be:

    FFMPEG -i "C:\Input.mp4" -vcodec copy -acodec copy -ss 00:15:30.000 -t 00:30:00.000 "C:\Output.mp4"

    But also this should do it:

    FFMPEG -i "C:\Input.mp4" -ss 00:15:30.000 -codec copy -t 00:30:00.000 "C:\Output.mp4"

    As you can see the options for the codec are different. The first specifically specifies the v and a ones (video and audio), and the second one just uses -codec..

    Is there a difference between the two?
    Might there be additional codecs in addition to the a and v? (and the -codec will include all types?)

    Thank you