Opened 12 hours ago

Last modified 67 minutes 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 sha8, 12 hours ago

Sorry for the accidental spam report. It was a misclick.

comment:2 by Gyan, 3 hours ago

Resolution: invalid
Status: newclosed

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 sha8, 3 hours ago

Good to know! But it's currently undocumented. Please add it to the manual.

Last edited 3 hours ago by sha8 (previous) (diff)

comment:4 by Gyan, 2 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.

in reply to:  2 comment:5 by MasterQuestionable, 67 minutes ago

Analyzed by developer: set
Cc: MasterQuestionable added
Component: ffmpegdocumentation
Keywords: subfile protocol added; ffmpeg ffplay ffprobe removed
Resolution: invalid
Status: closedreopened
Summary: Please add a byte offset option (like -sb in mplayer) in ffmpeg, ffplay, ffprobe.Improve documentation of "subfile" protocol
Note: See TracTickets for help on using tickets.