Wednesday, 15 April 2015

ubuntu 14.04 - FFmpeg simple 1:1 overlay and concatenate? -


I am using FFPAG at Ubuntu 14.04 (PPA of John Severinson) and one-one video files I'm playing

The first question I could not figure out yet - how can I add a simple overlay - 720p footage with 720p overlay (with partial transparency)? Therefore no size or alignment is needed - just 1: 1 overlay. I tried to do a lot already - VF and - filter_comax but did not show up.

Second question - with engagement, is it possible to switch between files? Best without creating a new file - So, on the fly? I need to reduce the gap between file switch or eliminate them completely.

This is my block right now:

  #! / Usr / bin / env bash while:; Do files = (*) ffmpeg -re -i "$ {files [$ RANDOM% $ {# files [@]}]}" -Codecode copy-vcodec copy -f flv server has been done  
< P> Then I have everything / vod - videofiles, plus overlay page

Thanks a bunch in advance, Tim

overlay, you have to scale the image to the original source dimensions.

To collect multiple source files that have the same codec used.

Example:

Make a playlist.txt with the following format:

  file '/ path / to / File_1 'file' / path / to / file_2 'file' / path / to / file_3 '[..]  

and then:

  ffmpeg - F concat -i playlist.txt -i overlay.png -filter_complex "[1: v] scale = 1280: 720 [ovr]; [0: V] [ovr] overlay = 0: 0" ...  

If the video and image are the same size then you can use it:

  ffmpeg -f concat -i playlist.txt -i overlay.png -filter_complex "[ 0: V] Overlay " 

Update : Full example:

You can stream the video stream at the same time Can not filter and copy!

  Ffmpeg -re -f concat -i playlist.txt -i overlay.png -filter_complex "[0: v] overlay" -c: v h264 -c: a libfdk_aac -ar 44100 -f flv rtmp: // ...  

If your audio stream is valid and is one of supported audio rates (44100, 22050, 11025) then you can do this Are:

  ffmpeg -re -f concat -i playlist.txt -i overlay.png -filter_complex "[0: v] overlay" -c: v h264 -c: one per -f Flv rtmp: // ...  

No comments:

Post a Comment