Skip to content

Instantly share code, notes, and snippets.

@Nub
Created December 8, 2011 10:42
Show Gist options
  • Select an option

  • Save Nub/1446683 to your computer and use it in GitHub Desktop.

Select an option

Save Nub/1446683 to your computer and use it in GitHub Desktop.
#incoming request buid m3u8
#assume seconds
segmentLength = 10
segments = duration/10
for i in segments
concat somename_$i.ts to m3u8
end
respond with m3u8 file
#encode/part 2
#!/bin/bash
#assume seconds
segmentLength = 10
segments = duration/10
for i in segments
ffmpeg magic h.264 -ss i*segmentLength -t segmentLength -o somename_$i.ts
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment