Ffmpeg

Adding CEA Captions To MP4 Stream.

Create an srt file 1 00:00:00,000 --> 00:00:10,000 Random sentence 1 2 00:00:10,000 --> 00:00:20,000 Random sentence 2 3 00:00:20,000 --> 00:00:30,000 Random sentence 3 ... 54 00:08:50,000 --> 00:09:00,000 Random sentence 54 Convert the .srt file to .scc pip install pycaption Write a simple python script to make the...

FFmpeg Scaling & Croping

Scale a landscape video to portrait and apply padding top and bottom maintaining aspect ratio ffmpeg -i joe-bell-trailer-1_h1080p.mov -vf "scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2,setsar=1" news.mp4

Creating A HLS Job With Ffmpeg

The code below gives an example of how to create HLS playlist using the video encoding tool FFmpeg. It uses a FFmpeg filter to resize the video to 3 resolutions 360, 720 and 1080. It then maps each one of these to an encoding process that will specify different settings...

FFmpeg Combining Adverts

I decide to have a little prototyping session and wanted to see how easy it would be to split a movie into multiple sections based on milliseconds and then insert adverts and combine it all back together in one movie. You can see my progress on GitHub. https://github.com/samueleastdev/ffmpeg-combining-ads To run...