[FFmpeg-devel] [PATCH] Encapsulate Dirac in MPEG TS.

Måns Rullgård mans
Wed May 7 10:30:34 CEST 2008


Anuradha Suraparaju <anuradha at rd.bbc.co.uk> writes:

> I've attached a patch to the latest FFmpeg trunk revsion 13071 to wrap
> Dirac in MPEG Transport Streams. The encapsulation has been done is
> accordance with the draft document
>
> http://schrodinger.sourceforge.net/dirac-in-13818-1-mapping.pdf
>
> Regards,
> Anuradha
>
> diff --exclude=.svn --exclude='430*' -ruN ffmpegsvn_trunk/libavformat/mpegts.c ffmpegsvn_trunk_dirac_mpegts/libavformat/mpegts.c
> --- ffmpegsvn_trunk/libavformat/mpegts.c	2008-05-07 10:48:33.000000000 +1000
> +++ ffmpegsvn_trunk_dirac_mpegts/libavformat/mpegts.c	2008-05-07 12:57:45.000000000 +1000
> @@ -611,6 +611,7 @@
>          case STREAM_TYPE_VIDEO_MPEG4:
>          case STREAM_TYPE_VIDEO_H264:
>          case STREAM_TYPE_VIDEO_VC1:
> +        case STREAM_TYPE_VIDEO_DIRAC:
>          case STREAM_TYPE_AUDIO_AAC:
>          case STREAM_TYPE_AUDIO_AC3:
>          case STREAM_TYPE_AUDIO_DTS:
> @@ -945,6 +946,10 @@
>          codec_type = CODEC_TYPE_VIDEO;
>          codec_id = CODEC_ID_VC1;
>          break;
> +    case STREAM_TYPE_VIDEO_DIRAC:
> +        codec_type = CODEC_TYPE_VIDEO;
> +        codec_id = CODEC_ID_DIRAC;
> +        break;
>      case STREAM_TYPE_AUDIO_AAC:
>          codec_type = CODEC_TYPE_AUDIO;
>          codec_id = CODEC_ID_AAC;

You should detect dirac video by the registration descriptor.
Anything else is prone to error, since there is no coordination for
use of private stream types.  You should also get your format
identifier value properly registered if you want to be serious.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list