[Live-devel] MJPEG support for MKV parser

PROMONET Michel michel.promonet at thalesgroup.com
Wed Apr 2 04:12:44 PDT 2014


            Hi Ross,

I am using the live555 code in order to parse MKV file and it works nicely.

However it fails when MKV contains a MJPEG stream.

I tried the following modification of the parser :
diff -rup live.ref/liveMedia/MatroskaFileParser.cpp live/liveMedia/MatroskaFileParser.cpp
--- live/liveMedia/MatroskaFileParser.cpp    2014-03-18 03:46:32.000000000 +0100
+++ live.new/liveMedia/MatroskaFileParser.cpp     2014-04-01 18:50:01.396098411 +0200
@@ -456,6 +456,8 @@ Boolean MatroskaFileParser::parseTrack()
                 track->mimeType = "video/THEORA";
               } else if (strncmp(codecID, "S_TEXT", 6) == 0) {
                 track->mimeType = "text/T140";
+              } else if (strncmp(codecID, "V_MJPEG", 6) == 0) {
+               track->mimeType = "video/JPEG";
               }
             } else {
               delete[] codecID;

Doing this allow to get the track using "MatroskaDemux::newDemuxedTrack" as you suggest me in a previous post.

Do you think it could be an interesting evolution in next live555 release ?

Best Regards,

            Michel.

[@@ THALES GROUP INTERNAL @@]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140402/69697e26/attachment.html>


More information about the live-devel mailing list