why use DIVX instead of FMP4 in AVI muxer

Song Bing-B06498 B06498 at freescale.com
Thu Apr 11 20:18:51 PDT 2013


Hi,

When I test AVI muxer. The video input is MPEG4 stream. Found AVI muxer will treat MPEG4 video as DIVX. As our platform haven't DIVX decoder, we can't playback the muxed file. Why use DIVX instead of FMP4? Our platform has MPEG4 decoder, if set FOURCC to FMP4 and store codec data in file header, we can playback the muxed file.

579     } else if (!strcmp (mimetype, "video/mpeg")) {
 580       gint mpegversion;
 581
 582       gst_structure_get_int (structure, "mpegversion", &mpegversion);
 583
 584       switch (mpegversion) {
 585         case 2:
 586           avipad->vids.compression = GST_MAKE_FOURCC ('M', 'P', 'G', '2');
 587           break;
 588         case 4:
 589           /* mplayer/ffmpeg might not work with DIVX, but with FMP4 */
 590           avipad->vids.compression = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
 591
 592           /* DIVX/XVID in AVI store the codec_data chunk as part of the
 593              first data buffer. So for this case, we prepend the codec_data
 594              blob (if any) to that first buffer */
 595           codec_data_in_headers = FALSE;
 596           break;
 597         default:
 598           GST_INFO ("unhandled mpegversion : %d, fall back to fourcc=MPEG",
 599               mpegversion);
 600           avipad->vids.compression = GST_MAKE_FOURCC ('M', 'P', 'E', 'G');
 601           break;
 602       }

Regards,
Song Bing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130412/7abedf42/attachment-0001.html>


More information about the gstreamer-devel mailing list