Change keyframe interval

You’ll need to reencode. Set x264’s keyint parameter to 5*fps and disable scenecut. If your fps is 24 for example : ffmpeg -i <input> -vcodec libx264 -x264-params keyint=120:scenecut=0 -acodec copy out.mp4 This is obviously not optimal for quality but it’ll match your demand. Edited to change no-scenecut to scenecut=0, as per sigh-boy suggestion.

Pipe input in to ffmpeg stdin

ffmpeg has a special pipe flag that instructs the program to consume stdin. note that almost always the input format needs to be defined explicitly. example (output is in PCM signed 16-bit little-endian format): cat file.mp3 | ffmpeg -f mp3 -i pipe: -c:a pcm_s16le -f s16le pipe: pipe docs are here supported audio types are … Read more

How to download .m3u8 in once time

The correct way to concat multiple video files from m3u8 playlist is ffmpeg -i “http://example.com/chunklist.m3u8” -codec copy file.mp4 the m3u8 playlist can be on web or locally in directory it contains list of file paths relative to the playlist -codec copy to avoid encoding (which takes time) container type matters: *.mp4 is fine but it … Read more

Best approach to get RTSP streaming into web browser from IP Camera?

Here is a blog entry, or tutorial if you will, that achieves something very similar. Their setup slightly different, but this is the summary: use ffmpeg to convert your input into mpeg1video: ffmpeg -i rtsp://whatever -f mpeg1video -b 800k -r 30 http://localhost:8082/yourpassword/640/480/ Install node.js with stream-server.js script from jsmpeg and ws ws WebSocket package. To … Read more

ffmpeg unable to find encoder ‘libvorbis’

Edit 2020: Homebrew now installs libvorbis by default, so you can just run: brew install ffmpeg If you’re using Homebrew, try this: brew install ffmpeg –with-libvorbis …or, if you’ve already tried installing ffmpeg with Homebrew… brew reinstall ffmpeg –with-libvorbis If you want libvpx, too: brew reinstall ffmpeg –with-libvpx –with-libvorbis

Simulating TV noise

Create video and audio noise, artifacts, and errors with ffmpeg Noise Using filters The geq (video “generic equation”) filter (with nullsrc as its “blank canvas”) can create video noise, and the aevalsrc filter can create white noise audio: ffmpeg -f lavfi -i nullsrc=s=1280×720 -filter_complex \ “geq=random(1)*255:128:128;aevalsrc=-2+random(0)” \ -t 5 output.mkv Note that this will create … Read more

tech