mirror of https://github.com/mpv-player/mpv
player: print manifest per-stream bitrate information to terminal
Aka hls-bitrate. In turn, remove the demux_lavf.c hack, which made the track title use this.
This commit is contained in:
parent
2567997ecf
commit
b8f80b3854
|
@ -796,8 +796,6 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
|
|||
if (lang && lang->value && strcmp(lang->value, "und") != 0)
|
||||
sh->lang = talloc_strdup(sh, lang->value);
|
||||
sh->hls_bitrate = dict_get_decimal(st->metadata, "variant_bitrate", 0);
|
||||
if (!sh->title && sh->hls_bitrate > 0)
|
||||
sh->title = talloc_asprintf(sh, "bitrate %d", sh->hls_bitrate);
|
||||
sh->missing_timestamps = !!(priv->avif_flags & AVFMT_NOTIMESTAMPS);
|
||||
mp_tags_copy_from_av_dictionary(sh->tags, st->metadata);
|
||||
demux_add_sh_stream(demuxer, sh);
|
||||
|
|
|
@ -284,6 +284,8 @@ static void print_stream(struct MPContext *mpctx, struct track *t)
|
|||
APPEND(b, " %dHz", s->codec->samplerate);
|
||||
}
|
||||
APPEND(b, ")");
|
||||
if (s->hls_bitrate > 0)
|
||||
APPEND(b, " (%d KB/s)", s->hls_bitrate / 8 / 1024);
|
||||
if (t->is_external)
|
||||
APPEND(b, " (external)");
|
||||
MP_INFO(mpctx, "%s\n", b);
|
||||
|
|
Loading…
Reference in New Issue