m1k1o / go-transcode

On-demand transcoding origin server for live inputs and static files in Go using ffmpeg. Also with NVIDIA GPU hardware acceleration.
Apache License 2.0
208 stars 38 forks source link

Fix invalid segment times #36

Closed pulsejet closed 1 year ago

pulsejet commented 1 year ago

I'm not familiar with this code, but I needed this change to get anything to work. Basically the limit was larger than the size of the breakpoints slice, so it ended up with a zero at the end for segmentTimes. This cause the ffmpeg call to fail because the end time is zero. If it matters, I'm testing with very short videos (~10s)