Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Hold last frame in ffmpeg streaming

    1er avril 2015, par Tushar Jain

    i am new to ffmpeg streaming so please help me.

    At run time i am getting frames from server & perform ffmpeg streaming on those frames,so able to access the video properly.

    *Problem is- I want to hold the stream at last frame,if suppose server stop throwing frames at runtime for 4-5 seconds,then i want to resume the streaming from the last frame where ffmpeg stops the streaming. *

    Thanks in advance

  • Compress Images Using FFMPEG [on hold]

    31 mars 2015, par Alharith Aqra'

    Kinldy let me know if there is any method to compress image using FFMPEG

    ffmpeg i-  img.PNG imgOut.png
    

    how to compress the output image or change the quality if it

    Regards ,

  • java.lang.UnsatifiedLinkError : no jniavutil in java.library.path using JavaCV FFmpegFrameGrabber

    31 mars 2015, par Noah Lutz

    I'm writing a program that is using JavaCV to grab frames from a stream. Its trying to use FFmpegFrameGrabber to capture the frames but when I try to run it, I get an UnsatisfiedLinkError.

    Here is the code:

    FrameGrabber frameGrabber;
        try{
            frameGrabber = new FFmpegFrameGrabber("http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8");
            frameGrabber.start();
    
            while(true){
                video.addFrame(new Frame(frameGrabber.grab()));
                System.out.println(video.getLength());
            }
        }catch(Exception e){
            e.printStackTrace();
        }
    

    And here is the stack trace:

    Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: no jniavutil in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
        at java.lang.Runtime.loadLibrary0(Runtime.java:870)
        at java.lang.System.loadLibrary(System.java:1119)
        at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
        at org.bytedeco.javacpp.Loader.load(Loader.java:410)
        at org.bytedeco.javacpp.Loader.load(Loader.java:353)
        at org.bytedeco.javacpp.avutil.(avutil.java:10)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:344)
        at org.bytedeco.javacpp.Loader.load(Loader.java:385)
        at org.bytedeco.javacpp.Loader.load(Loader.java:353)
        at org.bytedeco.javacpp.avcodec.(avcodec.java:12)
        at org.bytedeco.javacv.FFmpegFrameGrabber.(FFmpegFrameGrabber.java:103)
        at com.noahlutz.gopro.GoProDVR.run(GoProDVR.java:23)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/4q/tw0nqgpn4cv2q7yr052_szh00000gn/T/javacpp104085411945039/libjniavutil.dylib: dlopen(/private/var/folders/4q/tw0nqgpn4cv2q7yr052_szh00000gn/T/javacpp104085411945039/libjniavutil.dylib, 1): Library not loaded: @rpath/libavutil.52.dylib
      Referenced from: /private/var/folders/4q/tw0nqgpn4cv2q7yr052_szh00000gn/T/javacpp104085411945039/libjniavutil.dylib
      Reason: no suitable image found.  Did find:
        /private/var/folders/4q/tw0nqgpn4cv2q7yr052_szh00000gn/T/javacpp104085411945039/./libavutil.52.dylib: malformed mach-o image: load command #16 length (0) too small in /private/var/folders/4q/tw0nqgpn4cv2q7yr052_szh00000gn/T/javacpp104085411945039/./libavutil.52.dylib
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
        at java.lang.Runtime.load0(Runtime.java:809)
        at java.lang.System.load(System.java:1083)
        at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)
        ... 11 more
    
    Process finished with exit code 0
    

    I have both OpenCV and FFmpeg installed and I followed the instructions for the manual installation of JavaCV on their github page.

    Thanks for your help.

  • Convert pictures to live video using ffmpeg and python

    31 mars 2015, par zerzer

    I'm trying to record a live video (using H.264 codec) from a series of pictures that i receive by socket using python.

    I tried to use the MoviePy package (documentation here : github.com/Zulko/moviepy) on python to do that but i didn't figured it out.

    If anyone have a guide on how to get started with python and saving pictures I receive as frames in real time using ffmpeg, I would really appreciate it .

    what I have is something like this , but it gives only the last captured image in the video it doesn't save continuously the stream of images :

    from moviepy.editor import *
    import numpy as np
    
    while True:
       data = sock.recv()
       image = np.fromstring(data)
       folder = [image] 
       cv = ImageSequenceClip(folder, fps = 1)
       cv.write_videofile("video.mp4")
    
  • FFmpeg Degrades Quality of Video

    31 mars 2015, par elliotsandbox

    I have been tasked with converting a batch of videos from MOV to MP4 for an application my company is building. We're converting the videos because a short MOV file has an extremely large file size (well over five hundred megabytes), obviously not what we want for a mobile application. Now I tried directly converting MOV to MP4 however FFmpeg produces broken MP4 files. I overcame this by converting MOV to AVI then the AVI to MP4. Huzza! It works, however the quality is slightly degraded.

    Here is the code I am executing to convert the videos, it's in Lua.

    os.execute(("./ffmpeg/ffmpeg -i %s %s/%s.avi"):format(inputDir[video], finalDirectory, friendlyName))
    os.execute(("./ffmpeg/ffmpeg -i %s/%s.avi %s/%s.mp4"):format(finalDirectory, friendlyName, finalDirectory, friendlyName))
    os.execute(("rm -r %s/%s.avi"):format(finalDirectory, friendlyName))
    

    I've had a look around and see that I should look at codecs and stuff. However my mind comes to a complete blank when it comes to codecs. I am certain that all I need is an extra parameter and the videos will just be fine.

    Any help is greatly appreciated!