Opened 7 years ago

Last modified 9 months ago

#6617 new enhancement

ffprobe feature request: add RFC 6381 string to stream metadata

Reported by: Tomer Lahav Owned by:
Priority: wish Component: ffprobe
Version: git-master Keywords: rfc6381
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


RFC6381 defines a string representation for media files that also includes codec specifics such as profile, level etc.

Examples include:

video/mp4; codecs="avc1.42E01E, mp4a.40.2"
video/3gpp2; codecs="mp4v.20.9, mp4a.E1"

These strings are required for working with media on the web.
Examples of JS APIs that require these include addSourceBuffer and canPlayType.

It would be extremely useful if a property would be added to stream's metadata, with the full codec string as a value (i.e. avc1.4D401F)

Another property could be added to the format object, with the full content type string (i.e. video/mp4; codecs="avc1.640028, mp4a.40.2")

Related links:

Change History (4)

comment:1 by Mihai, 7 years ago

Is there any way to build the RFC 6381 "manually" from ffprobe output?

comment:2 by Tomer Lahav, 7 years ago

I'm not sure...
If you're looking for a workaround, try mp4box -info command.
You can parse the RFC 6381 string from the stderr stream.
Only caveat is that MP4Box only works for ISO BMFF containers (i.e. mp4, mov, 3gp etc).

comment:3 by Carl Eugen Hoyos, 7 years ago

Priority: normalwish
Version: unspecifiedgit-master

comment:4 by maximrazin, 9 months ago

The code for converting codecpar into RFC 6381 is already there in (write_codec_attr), it only should be extracted into a public interface

Note: See TracTickets for help on using tickets.