Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • SRT : No Room to Store Incoming Packets when we stream SRT streams through VLC

    10 février, par Shankar

    Hope all you are doing well.

    Actually i was trying to stream a media file using VLC by SRT protocol. For which, srt-live-transmit is used as converter in between SRT Listener and VLC UDP streams. srt-live-transmit used to convert udp to srt streams(mpegts). But when i tried to do that, after few seconds, i got error in srt-live-transmit terminal that : No room to store incoming packet:

    What should be the reason for this error? And if anyone know anything about this problem, please share info. It would be helpful. Thank you.

  • PHP cannot run a python script that uses ffmpeg (when the python script runs in terminal)

    10 février, par dr3kiki

    In my website, a user uploads an audio file that gets mixed by a python script. The python script uses ffmpeg to translate the files, however it doesn't work when I try executing via php due to ffmpeg, I get this error

    usr/local/lib/python3.9/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work")

    The python script can run (with no errors) in the Linux terminal and ffmpeg can run separately also in the terminal (in the website's directory).

    I have tried linking the environment with php with putenv("/usr/bin/ffmpeg") which had no luck, as well as linking to the usr/local/lib/python3.9/site-packages/ directory in the same way, also no luck.

  • How to timestamp video with seconds and milliseconds with ffmpeg ? [closed]

    10 février, par JulianJ

    I am trying to timestamp an .mp4 video with seconds and milliseconds using ffmpeg. I can timestamp with hours, minutes, seconds and milliseconds using the code below but just can't figure out how to print seconds and milliseconds.

    ffmpeg -i input.mp4 -vf "drawtext=:text='%{pts\:s}':rate=25:start_number=0:x=(w-tw)/2:y=h-(3*lh):fontcolor=white:fontsize=50,drawtext=:text='%{pts\:hms}':rate=25:start_number=0:x=(w-tw)/2:y=h-(2*lh):fontcolor=white:fontsize=50" output.mp4
    
  • How to hide the output of yt-dl in CMD ? python

    10 février, par Qais Albeaiz

    I'm coding program that download mp3 audio from youtube videos but I have an issue that yt-dl show some output in console

    my code:

    with open('Links.txt') as f:
        content = f.readlines()
        for links in content:
    
            ydl_opts = {
                'format': 'bestaudio/best',
                'postprocessors': [{
                    'key': 'FFmpegExtractAudio',
                    'preferredcodec': 'mp3',
                    'preferredquality': '192',
                }],
            }
            with youtube_dl.YoutubeDL(ydl_opts) as ydl:
                ydl.download([links])
    

    photo of output: enter image description here

    and i need the option or some way to hide the output.

  • How to make multiple ffmpeg commands run in parallel [duplicate]

    9 février, par Kim Mỹ

    I'm using the following ffmpeg command to compress video:

    `nice -n 10 ${ffmpegPath} -i "${chunkPath}" -c:v libx264 -preset fast -crf 28 "${compressedPath}"`
    

    However, when I run two instances of ffmpeg of this command to achieve parallelism:

    Either in two child processes within a single Node.js application or in two separate Node.js applications running at the same time, it seems only one command is processed, and the other is skipped.

    I've noticed that 2 FFmpeg instances are loaded into RAM and both create a starting file for the final compressed video, they finish compression around the same time. However, the total processing time is effectively doubled compared to compressing a single video file alone, which only takes half the time.

    I also try to pass the -threads argument but it produces same result.