[FFmpeg-user] mpeg-dash mux w/multiple representations? (multi-bitrate)
Mark Hassman
mark at hassman.org
Thu Aug 13 16:03:02 CEST 2015
Hi,
Does anyone know how to encode live mpeg-dash with multiple-bitrates?
I can create multiple outputs with -s.. this works well for multi-bitrate
hls (f=hls) as .m3u8 files are independent and can be referenced by a master
.m3u8, but with mpeg-dash (f=dash), each output's .mpd is independent.
Instead, what's needed is a single .mpd with multiple representations.
Looking at dashenc.c - appears the mux is setup for this, but I have no idea
how to queue this within ffmpeg.
Relevant excerpt from dashenc.c: (ffmpeg v2.7)
line 505:
if (c->has_video) {
avio_printf(out, "\t\t<AdaptationSet contentType=\"video\"
segmentAlignment=\"true\" bitstreamSwitching=\"true\">\n");
for (i = 0; i < s->nb_streams; i++) { <-- this will append multiple
presentations
AVStream *st = s->streams[i];
OutputStream *os = &c->streams[i];
if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO)
continue;
avio_printf(out, "\t\t\t<Representation id=\"%d\"
mimeType=\"video/mp4\" codecs=\"%s\"%s width=\"%d\" height=\"%d\">\n", i,
os->codec_str, os->bandwidth_str, st->codec->width, st->codec->height);
output_segment_list(&c->streams[i], out, c);
avio_printf(out, "\t\t\t</Representation>\n");
}
avio_printf(out, "\t\t</AdaptationSet>\n");
}
There's little documentation on ffmpeg mpeg-dash.
Can anyone help?
Thnx!
-Mark
More information about the ffmpeg-user
mailing list