On Fri, 27 Jan 2017 19:34:42 +0100 Anton Khirnov <[email protected]> wrote:
> If we did, I don't remember the conclusion :)
>
> Anyway, I agree that this is a misuse of metadata. There are at least
> two methods for passing the stream bitrate to the muxer -- the
> AVCodecParameters.bit_rate field and the AV_PKT_DATA_CPB_PROPERTIES side
> data.
>
> IIUC, the problem you're trying to solve is that avconv does not set the
> bit_rate field in certain situations. If that's the case, that should be
> fixed in avconv. We should not design our muxer behaviour around
> limitations of one specific caller.
>
> If you describe more fully what's the situation where bit_rate is not
> set properly, I might have some more specific ideas for handling this.
Hm I see.
I tried to remux an already encoded MKV stream pulled from an icecast server.
So I used -codec copy and the upstream container didn't contain bitrate
metadata.
Avprobe output from a stream dump see below [1].
For DASH I needed to hint the average bandwith of a stream in the manifest.
Calculating this from the first segment created might be an option, but I felt
more comfortable explicitly hinting the bandwidth via a metadata option.
Other than for the manifest, this value isn't used anywhere, as far as I
remember.
I thought the parser for the adaptation_set option is complex enough. I tried
to avoid writing another one for adding metadata to individual streams.
Yes, the obvious solution would be to fix the upstream encoder. But I'm not
sure, whether I get all possible codecs to write an average bitrate to their
stream metadata.
Regards
Peter
[1]
avprobe version v13_dev0-754-g87afb34, Copyright (c) 2007-2017 the Libav
developers built on Jan 26 2017 22:50:58 with gcc 4.9.4 (Gentoo 4.9.4 p1.0,
pie-0.6.4) [matroska,webm @ 0x170fba0] Unknown entry 0x56BB
[matroska,webm @ 0x170fba0] Unknown entry 0x56BB
[matroska,webm @ 0x170fba0] Unknown entry 0x56BB
Input #0, matroska,webm, from 'test.mkv':
Metadata:
ICY-NAME : no name
ICY-METADATA : 1
ICY-PUB : 0
ENCODER : Lavf57.56.100
Duration: 00:00:19.76, start: 0.000000, bitrate: N/A
Stream #0:0: Video: vp8
yuv420p, 1920x1080, PAR 1:1 DAR 16:9
25 fps, 1k tbn (default)
Metadata:
ENCODER : Lavc56.60.100 libvpx
DURATION : 00:00:19.760000000
Stream #0:1: Video: vp8
yuv420p, 720x576, PAR 64:45 DAR 16:9
25 fps, 1k tbn (default)
Metadata:
ENCODER : Lavc56.60.100 libvpx
DURATION : 00:00:19.720000000
Stream #0:2: Audio: opus
48000 Hz, mono, fltp (default)
Metadata:
ENCODER : Lavc56.60.100 libopus
DURATION : 00:00:19.726000000
Stream #0:3: Audio: opus
48000 Hz, mono, fltp (default)
Metadata:
ENCODER : Lavc56.60.100 libopus
DURATION : 00:00:19.726000000
Stream #0:4: Audio: opus
48000 Hz, mono, fltp (default)
Metadata:
ENCODER : Lavc56.60.100 libopus
DURATION : 00:00:19.726000000
Stream #0:5: Audio: mp3
44100 Hz, 1 channels, s16p, 96 kb/s (default)
Metadata:
ENCODER : Lavc56.60.100 libmp3lame
DURATION : 00:00:19.726000000
Stream #0:6: Audio: mp3
44100 Hz, 1 channels, s16p, 96 kb/s (default)
Metadata:
ENCODER : Lavc56.60.100 libmp3lame
DURATION : 00:00:19.726000000
Stream #0:7: Audio: mp3
44100 Hz, 1 channels, s16p, 96 kb/s (default)
Metadata:
ENCODER : Lavc56.60.100 libmp3lame
DURATION : 00:00:19.726000000
# avprobe output
pgpzDbTNiTmKY.pgp
Description: OpenPGP digital signature
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
