ffmpeg -live_start_index -99999 -i 'https://….m3u8' -c copy something.tsDirect copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func split(buf []byte, lim int) [][]byte { | |
| var chunk []byte | |
| chunks := make([][]byte, 0, len(buf)/lim+1) | |
| for len(buf) >= lim { | |
| chunk, buf = buf[:lim], buf[lim:] | |
| chunks = append(chunks, chunk) | |
| } | |
| if len(buf) > 0 { | |
| chunks = append(chunks, buf[:len(buf)]) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| ) | |
| type String string | |
| type Struct struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
NewerOlder