Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to get h264 bitrate

    21 octobre 2014, par Optimus Prime

    Tried MediaInfo, tried ffprobe -show_streams -i "file.mkv" (or raw file.h264) and it gives me bit_rate=N/A. MediaInfo gives nothing at all.

    The only way I found out is by creating the .dga file by indexing it via MegUI and the using its Bitrate Calculator tool and setting the same exact size like the source, then it shows the average bitrate, but this way is ridiculous and who knows how accurate.

  • Killing ffmpeg from Qt results in a corrupt video file

    21 octobre 2014, par parsley72

    I'm using Qt to record stream data from a Mobotix camera on Windows 7. The command I use is:

    ffmpeg -f mjpeg -i "http://admin:password@192.168.0.100/control/faststream.jpg?stream=full" -c:v libx264 -preset slow -crf 22 -c:a copy out.mp4

    This works fine from the command line and when I want to stop it I just do Ctrl-C. But I'm doing this from an application using Qt 5.2 via a QProcess. After 10 minutes I want to stop the recording so I tried QProcess::terminate() but this doesn't stop it. QProcess::kill() works but the resulting video won't play. This answer suggests I'm doing it the right way.

    I connect to QProcess::finished() so when I call QProcess::kill() the result is:

    Apparently this is the return code Qt uses when it kills a process.

    So is there any other way for me to either terminate the process gracefully (the same as pressing Ctrl-C) or perform this same functionality via an ffmpeg library so I can stop it properly?

  • ffmpeg does not make a video from my images

    21 octobre 2014, par QuantumFool

    I've currently got some images that I'd like to display in the form of a movie. So, I pocked around a bit and found ffmpeg. This is the tutorial I have been going with:

    http://zulko.github.io/blog/2013/09/27/read-and-write-video-frames-in-python-using-ffmpeg/

    Since I don't care about reading, I skipped right to the writing section. As far as I can tell, this is what my program should say:

    import subprocess as sp
    FFMPEG_BIN = "ffmpeg" #I'm on Ubuntu
    command = [ FFMPEG_BIN,
                '-y',
                '-f', 'rawvideo',
                '-vcodec', 'rawvideo',
                '-s', '1000x1000',
                '-pix_fmt', 'rgb24',
                '-r', '24',
                '-i', '-',
                '-an',
                '-vcodec', 'mpeg',
                'my_output_videofile.mp4' ]
    
    
    pipe = sp.Popen( command, stdin = sp.PIPE, stderr = sp.PIPE)
    

    However, when I run this in spyder, I get the error message:

    Traceback (most recent call last):
      File "", line 1, in 
      File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile
        execfile(filename, namespace)
      File "/home/xander/Downloads/python-meep/makeVideo.py", line 15, in 
        pipe = sp.Popen( command, stdin = sp.PIPE, stderr = sp.PIPE )
      File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
        errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
        raise child_exception
      OSError: [Errno 2] No such file or directory
    

    Why is that happening? I'm really suspicious: I never mention the names of my pictures ("Image0.jpeg", "Image1.jpeg", ..., "Image499.jpeg", "Image500.jpeg"). Any help will be greatly appreciated!

    P.S. The guy in the tutorial also says that some codecs require a bitrate; I tried that and it didn't work either.

  • Creating a movie from multiple .png files

    21 octobre 2014, par QuantumFool

    I've got quite a few .png files, and I need to create a movie out of them. So, I'm going through this tutorial which uses ffmpeg:

    http://www.miscdebris.net/blog/2008/04/28/create-a-movie-file-from-single-image-files-png-jpegs/

    When I go to type the first line (sudo apt-get install ffmpeg), in Terminal and enter my password as appropriate, I get:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package ffmpeg is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'ffmpeg' has no installation candidate
    

    That's funny; I installed the latest version manually this morning! Anyway, I proceed with the instructions assuming ffmpeg is installed properly (I'm looking at the file where it downloaded to, so that can't be the issue):

    cd Downloads
    cd python-meep
    cd Images
    ffmpeg -qscale 4 -r 20 -b 9600 -i Image%03d.png movie.mp4
    

    To my surprise, I get:

    ffmpeg: command not found
    

    I just installed it! Furthermore, I dragged my manual installation folder into the very same directory with the pictures! What's going on?

    Thanks!

  • How much video data is required to get stream information using ffprobe ?

    21 octobre 2014, par Mayank

    I am using java to download a video file from my cloud. Later on I am using java runtime to execute ffprobe on that video file. The video file size could be in hundreds of MBs. I want to know that can I make only a partial download of the video file (say around 10kb) and run ffprobe on this content and still get all relevant information? If yes, how much data should be downloaded to guarantee successful ffprobe results?