


You can use this ruby gem or you can do it manually (downloading the manifest and media chunks).You can download the scripts from this link: 20140807_HLStrim_JCF_v1 Procedure I have developed and tested them in a virtual Ubuntu (14.04 TLS). To use these scripts you will need to install ffmpeg (v2.2+) and libxml2 (v20901+) (also known xmllint). To be able to do this the TS files shall be h264 baseline and they must start with an I frame (see the section: Known problems and future work). The purpose of these scripts is to perform a VERY FAST frame accuracy trimming to HLS streaming files (.TS: h264, aac), it only re-encodes the first and the last segment of whole stream. FFmpeg cropping example: crop 100×100 pixels in the upper right corner of the video. Crop a part 100x100 Pixels in the upper left corner (so x with y Yes 0 ),please use: ffmpeg -i input.mp4 -filter:v 'crop100:100:0:0' output.mp4.

To achieve that I developed a group of bash scripts that are able to trim a HLS stream using ffmpeg. FFmpeg cropping example: crop a 100×100 part from the top left of the video. The main idea of this post is to practise with ffmpeg and write down my experiences, issues that I have found, possible solutions, etc.
