Opened 18 hours ago
Last modified 7 hours ago
#11439 reopened enhancement
Improve documentation of "subfile" protocol
Reported by: | sha8 | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | documentation |
Version: | unspecified | Keywords: | subfile protocol |
Cc: | sha8, MasterQuestionable | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | yes |
Description
Summary of the bug:
mplayer has a -sb option. From the manual:
Seek to byte position. Useful for playback from CD-ROM images or VOB files with junk at the beginning.
While specifying an offset in dd and piping it from ffmpeg (or ffplay or ffprobe) is possible, it is inconvenient. Besides, pipe inputs are not seekable in ffplay because they are like live streams.
With an -sb option, ffmpeg (and ffplay and ffprobe) would treat the file as if it started at this byte.
Of course, -sb should also accept size suffixes. For example, 1KB = 1000 bytes. 1K = 1024 bytes. 1M = 1048576 bytes
How to reproduce:
ffplay example.img -sb 196608 ffplay -i example.img -sb 196608 ffmpeg -i example.img -sb 196608 -c copy recording.mpg
Change History (5)
comment:1 by , 18 hours ago
follow-up: 5 comment:2 by , 9 hours ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You can already do this with the subfile protocol.
ffplay -start 196608 subfile:example.mp3
Of course, if you end up skipping over essential metadata, then ffmpeg may fail to open the file. Same if you do this with files where media data location is stored as global offsets.
comment:3 by , 9 hours ago
Good to know! But it's currently undocumented. Please add it to the manual.
(test edit)
comment:4 by , 8 hours ago
It's documented at https://ffmpeg.org/ffmpeg-protocols.html#subfile
Although an example could be added to show the regular option syntax.
comment:5 by , 7 hours ago
Analyzed by developer: | set |
---|---|
Cc: | added |
Component: | ffmpeg → documentation |
Keywords: | subfile protocol added; ffmpeg ffplay ffprobe removed |
Resolution: | invalid |
Status: | closed → reopened |
Summary: | Please add a byte offset option (like -sb in mplayer) in ffmpeg, ffplay, ffprobe. → Improve documentation of "subfile" protocol |
͏ This very example seems undocumented.
͏ https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/subfile.c
͏ https://github.com/FFmpeg/FFmpeg/commit/252128561e891da8a4a3c4ea3ffa7071c443e343 ("subfile:
")
͏ https://github.com/FFmpeg/FFmpeg/blob/790f793844390ece526ff654dc1bdddff5f5b4e8/libavformat/avio.c#L315C29-L315C37 ("subfile,
")
Sorry for the accidental spam report. It was a misclick.