2024-02-22

command
v1.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: OSL-3.0 Imports: 3 Imported by: 0

README

Jan 9 2024

start with this:

youtube -b BCRhBaFqtf0 -vc avc1

then:

ffmpeg -i in.mp4 -c copy -frag_size 9K -movflags empty_moov frag.mp4

check this out. if I take a "normal" file:

ffmpeg -i in.mp4 -c copy -frag_size 9K frag.mp4

you get the poor result of tools reading nearly the entire file:

> ffmpeg -v verbose -i frag.mp4
[AVIOContext @ 000001997f374c80] Statistics: 38141952 bytes read, 48 seeks

but if you use this undocumented option:

ffmpeg -i in.mp4 -c copy -frag_size 9K -movflags global_sidx frag.mp4

then the amount read drops by 99%:

> ffmpeg -v verbose -i frag.mp4
[AVIOContext @ 000002128d154c80] Statistics: 131076 bytes read, 3 seeks

https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/movenc.c

does this module have a similar option? this works:

> ffmpeg -i in.mp4 -c copy -frag_size 99K -movflags dash dash.mp4
> ffmpeg -v verbose -i dash.mp4
[AVIOContext @ 00000221423e4c80] Statistics: 14155780 bytes read, 413 seeks

> ffmpeg -i in.mp4 -c copy -frag_size 99K -movflags dash+global_sidx dash.mp4
> ffmpeg -v verbose -i dash.mp4
[AVIOContext @ 000001dc9c144c80] Statistics: 131076 bytes read, 2 seeks

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL