Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg shutting down when stream is silent

    7 février 2017, par chr_lt_ney

    I am running ffmpeg in a Linux environment, where I merge the audio stream from an Icecast-stream and a static image in order to be able to stream that to Youtube.

    At times, the Icecast stream get's very silent, sometimes for almost a minute. That is intended to happen, due to the nature of the content. But, when the stream get's too silent, ffmpeg just shuts down with no notice.

    This is how I start ffmpeg:

    ffmpeg -loop 1 -r 30  -s 1280x720 -i /var/www/html/files/youtube/image.png -i http://my-stream-to-icecast:8000/my-mount -c:v libx264 -preset fast -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p -f flv rtmp://a.rtmp.youtube.com/live2/my-youtube-key
    

    Any ideas on how to solve this? And/or how to optimize the above?

    Thanks a lot!

  • FFMPEG-How can i mix mutilple audio streams with a video having embedded audio ?

    7 février 2017, par hack

    How can i mix mutilple audio streams with a video having embedded audio? Eg i am having video.mp4 which has embedded audio stream. I want to mix one or more audio streams with it,keeping the orignal embedded audio stream. How can i do it? Thanks.

  • FFMPEG Converting a bunch of PNG images to a video

    7 février 2017, par user2419553

    I have a folder full of 600 .png's that I'd like to convert to a video using FFMPEG. The .png filenames are as follows:

    f_001.png

    f_002.png

    f_003.png

    ...

    f_600.png

    I've been trying to use the following command to try to convert them:

    ffmpeg -r 10 -i root/Record/frames/f_%03d.png -vcodec libx264 -crf 0 /root/Record/"$(date +"%Y_%m_%d %I.%M %p")".mkv
    

    But I keep getting the error:

    Could find no file with path 'root/Record/frames/f_%03d.png' and index in the range 0-4
    root/Record/frames/f_%03d.png: No such file or directory
    
  • FFMPEG (BASH) Saving .asf stream from IP camera as mp4- really low framerate

    7 février 2017, par user2419553

    I'm using a FFMPEG to get an .asf stream from my IP camera and save it as an MP4 on my computer. The problem is that the framerate of the output MP4 is really low; around 2 or 3 FPS, and I want it to be about 10 FPS since that's around what the input stream's (the .asf) framerate is. Here's the code:

    ffmpeg -i http://USER:PASSWORD@IP:PORT/videostream.asf -r 10 -vcodec copy -an -t 60 /root/Record/"$(date +"%Y_%m_%d %I.%M %p")".mp4
    

    I also tried putting the "-r 10" before the "-i" as seen below, but got the same result:

    ffmpeg -r 10 -i http://USER:PASSWORD@IP:PORT/videostream.asf -vcodec copy -an -t 60 /root/Record/"$(date +"%Y_%m_%d %I.%M %p")".mp4
    
  • Arecord->FFMPEG works but FFMPEG w/ ALSA stutters ?

    7 février 2017, par user2989813

    I am trying to stream audio from my Pi Zero and my I2s MEMS mic. I would like to stream using FFMPEG and ALSA (which I have already compiled) but I'm running into stuttering issues.

    1. FFMPEG + ALSA

      ~/special/ffmpeg/ffmpeg -report -f alsa -ar 48000 -ac 2 -acodec pcm_s32le -i mic_sv -f lavfi -i testsrc -c:v h264_omx -c:a aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY

    This results in constant stuttering and choppiness.

    1. Arecord piped directly to FFMPEG

      arecord -Dmic_sv -c2 -r48000 -fS32_LE | ~/special/ffmpeg/ffmpeg -report -acodec pcm_s32le -i - -f lavfi -i testsrc -c:v h264_omx -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY

    This results in a coherent audio stream, but with skipping every 5 seconds or so.

    1. Arecord recorded to a wav file, piped into FFMPEG

      arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v & ~/special/ffmpeg/ffmpeg -report -re -i temp.v -f lavfi -i testsrc -c:v h264_omx -ac 2 -acodec aac -ab 32k -bufsize 32k -async 2 -f flv rtmp://209.85.230.23/live2/KEY

    This results in a perfect audio stream.

    I don't know why #3 works but #2 and #1 cause problems. Any suggestions?