[FFmpeg-devel] [PATCH] libavf: Auto-detect mjpeg 2000 in mpeg-ts

Ståle Kristoffersen staalebk at ifi.uio.no
Wed Oct 12 17:57:08 EEST 2016


On 2016-10-12 at 13:54, Carl Eugen Hoyos wrote:
> 2016-10-11 15:52 GMT+02:00 Ståle kristoffersen <staalebk at ifi.uio.no>:
> 
> > I have some transport streams with only one pid, containing MJPEG 2000
> > video. Since the PMT/PAT is missing ffmpeg is unable to decode it.
> 
> Do you also have samples that can be decoded by FFmpeg? (We don't)

I do (they are decodable by ffmpeg without the patch if I take the whole
stream with PMT, or with only the j2k-pid using my patch), but I am unsure
if I can share them.

> How are your samples produced?

They were given to me, so I do not know what produced them.

> Do you have a way to playback the samples now without FFmpeg?

I have not been able to play them back using any other tool.

> I ask because I would love to see this
> patch tested:
> https://ffmpeg.org/pipermail/ffmpeg-devel/2015-August/177303.html

I can confirm that the stream I have does indeed have stream_type set to 21
in the PMT, so the patch matches that. 

> > The attached patch makes ffmpeg able to guess that it does contain a
> > stream of jpeg 2000, but I am not sure if this is the correct approach.
> 
> The approach is correct but if you want to improve the patch, it should
> look more like the mjpeg probe function and return a higher score if
> more valid frames can be found.

That code will have to be reworked, so I'll look into doing that as well.
Is there any guidelines for how high score a probe should return?

> > Also, should LIBAVFORMAT_VERSION_MICRO
> 
> It should be MINOR since you add a new symbol to the library.

Ok.

> > and the Changelog be updated?
> 
> I don't Changelog should be updated for this patch.

Ok.

-- 
Ståle Kristoffersen


More information about the ffmpeg-devel mailing list