libav muxer: added WEBM support
This commit is contained in:
parent
94ff39dead
commit
53b168cc10
5 changed files with 17 additions and 1 deletions
|
@ -57,7 +57,7 @@ EXTLIBS = libx264 libvorbis libvpx
|
|||
COMPONENTS = avutil avformat avcodec swresample swscale avresample
|
||||
DECODERS = mpeg2video mp2 ac3 eac3 h264 h264_vdpau aac aac_latm vorbis libvorbis
|
||||
ENCODERS = mpeg2video mp2 libx264 libvpx_vp8 libvpx_vp9 aac libaacplus vorbis libvorbis
|
||||
MUXERS = mpegts mpeg2dvd matroska
|
||||
MUXERS = mpegts mpeg2dvd matroska webm
|
||||
BSFS = h264_mp4toannexb
|
||||
|
||||
LIBOGG = libogg-1.3.2
|
||||
|
|
|
@ -32,6 +32,7 @@ typedef enum {
|
|||
MC_RAW = 5,
|
||||
MC_WEBM = 6,
|
||||
MC_AVMATROSKA = 7,
|
||||
MC_AVWEBM = 8,
|
||||
} muxer_container_type_t;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -163,6 +163,12 @@ lav_muxer_support_stream(muxer_container_type_t mc,
|
|||
ret |= SCT_ISSUBTITLE(type);
|
||||
break;
|
||||
|
||||
case MC_WEBM:
|
||||
case MC_AVWEBM:
|
||||
ret |= type == SCT_VP8;
|
||||
ret |= type == SCT_VORBIS;
|
||||
break;
|
||||
|
||||
case MC_MPEGTS:
|
||||
ret |= (type == SCT_MPEG2VIDEO);
|
||||
ret |= (type == SCT_H264);
|
||||
|
@ -517,6 +523,10 @@ lav_muxer_create(const muxer_config_t *m_cfg)
|
|||
case MC_AVMATROSKA:
|
||||
mux_name = "matroska";
|
||||
break;
|
||||
case MC_WEBM:
|
||||
case MC_AVWEBM:
|
||||
mux_name = "webm";
|
||||
break;
|
||||
default:
|
||||
mux_name = muxer_container_type2txt(m_cfg->m_type);
|
||||
break;
|
||||
|
|
|
@ -258,6 +258,10 @@ mk_build_tracks(mk_mux_t *mkm, const streaming_start_t *ss)
|
|||
mkm->tracks[i].sri = ssc->ssc_sri;
|
||||
mkm->tracks[i].nextpts = PTS_UNSET;
|
||||
|
||||
if (mkm->webm && ssc->ssc_type != SCT_VP8 && ssc->ssc_type != SCT_VORBIS)
|
||||
tvhwarn("mkv", "WEBM format supports only VP8+VORBIS streams (detected %s)",
|
||||
streaming_component_type2txt(ssc->ssc_type));
|
||||
|
||||
switch(ssc->ssc_type) {
|
||||
case SCT_MPEG2VIDEO:
|
||||
tracktype = 1;
|
||||
|
|
|
@ -646,6 +646,7 @@ profile_class_mc_list ( void *o )
|
|||
{ "MPEG-TS /av-lib", MC_MPEGTS },
|
||||
{ "MPEG-PS (DVD) /av-lib", MC_MPEGPS },
|
||||
{ "Matroska (mkv) /av-lib", MC_AVMATROSKA },
|
||||
{ "WEBM /av-lib", MC_AVWEBM },
|
||||
};
|
||||
return strtab2htsmsg(tab);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue