Skip to content

Instantly share code, notes, and snippets.

@rossixolit
rossixolit / gist:699d662b036f70f687d033f099b5bb85
Created October 16, 2019 11:45
ffmpeg -copyts and -muxrate combination
I want to transcode individual mpegts (h264/aac) chunks, and two things are very important:
1) A constant, predictable output bitrate
2) Keeping the original pts information.
For this minimal example I'm using this public accessible mpegts chunk and the least amount of arguments needed to reproduce:
https://bitdash-a.akamaihd.net/content/sintel/hls/1500kbit/seq-38.ts
Let's say I want 300k output bitrate:
Original Chunk:
Duration: 00:00:02.00, start: 76.083333, bitrate: 919 kb/s