Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Using chunks of MP4 file for thumbnails

    11 mai, par Moritz Mahringer

    I want to extract single frames (as thumbs) from videos, without having to download the full video file. I would like to just read the mp4 header (the info should be in the moov atom) and then download the required byte ranges. Afaik thats what browsers (HTML5 video) do when you skip to an unbuffered part

    I already looked at: How can HTML5 video's byte-range requests (pseudo-streaming) work? but i can't figure out how to use it with ffmpeg for example.

    Thanks a lot!

  • FPS reduction for H264 [closed]

    11 mai, par Александр А

    There is a USB camera that sends H264 frames with a frequency of 30 fps in a resolution of 1920x1080, GOP size 30 or 60 (1 or 2 I frame per second depending on the camera), which requires throughput of about 6 mbit/s. It is necessary to reduce this to no more than 2 mbit/s. All this is done on a weak ARMv7, so the option of transcoding is extremely resource intensive, especially considering that I did not find how to do it as a GPU Mali.

    Given that the basic functionality is performed on the framework ffmpeg, is it possible to reduce the frame rate, ideally to 10 fps, WITHOUT loss of quality and decoding?

  • OpenEncodeSessionEx failed : no encode device (1) : (no details)

    11 mai, par Jayce Li

    I'm testing the ddagrab filter with this command line:

    ffmpeg -f lavfi -i ddagrab -c:v h264_nvenc -cq 18 -v 40 -t 10 -y out.mp4

    FFmpeg exits with this error message: OpenEncodeSessionEx failed: no encode device (1): (no details)

    My laptop has Nvidia Geforce GTX 1050 Ti, Driver version 527.37. Windows 10 Home, Version 22H2, OS build 19045.4291. DirectX version 12.

    This command works without problems: ffmpeg -f gdigrab -i desktop -c:v h264_nvenc -t 10 -y out.mp4

    I test these command on my other laptop with Nvidia Geforce RTX 2060, Driver version 512.78.Windows 10 Home, Version 22H2, OS build 19045.3693. DirectX version 12. They both work fine.

    How to solve the problem. OpenEncodeSessionEx failed: no encode device (1): (no details)

  • Error while processing Video using Ffmpeg

    10 mai, par Kaunain

    I am facing a weird error in FFMPG while doing any operation of a particular video. I did a lot of R&D but did not found any solution regarding this. Can anyone of you please look into it, it will be so kind.

    here is a command i am using to mute the video, but end up with the following error.

    fun videoMuteCmd(
        filePath: Uri,
        outputPath: String,
    ): Array {
        return arrayOf(
            "-y", "-i", filePath.toString(),
           
            "-c", "copy", "-an", outputPath
        )
    }
    

    ERROR

    : LogMessage{executionId=3010, level=AV_LOG_ERROR, text='[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb400007c1243e000] Multiple mdhd? '}

    : LogMessage{executionId=3010, level=AV_LOG_ERROR, text='[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb400007c1243e000] error reading header '}

    LogMessage{executionId=3010, level=AV_LOG_ERROR, text='/storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Video/VID-20240510-WA0037.mp4: Invalid data found when processing input '}

    Please look into this error and please suggest the possible fix.

  • ffmpeg does not make a video from my images

    10 mai, 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.