[FFmpeg-devel] Modifying mpegts.c to add support for JPEGXS - how to inject video descriptor from PMT into stream

ffmpeg at gallery.co.uk ffmpeg at gallery.co.uk
Tue Apr 23 17:33:02 EEST 2024


Hi Folks

I am trying to add decode support for VSF TR-07 (JPEGXS in transport stream),  using the intel JPEGXS project for the codec part.  The Intel code gets JPEGXS working fine in FFMPEG via mkv or mp4 files but it doesnt implement transport stream support for the new codec so TR07 doesnt work yet

JPEGXS TR07 requires a video descriptor block in the PMT entry for the JPEGXS pid. feeding in a known good T07 stream,  I have successfully parsed that data in the call parse_stream_identifier_desc() made from pmt_cb() function in mpegts.c, but its unclear how to connect this metadata I have extracted to the internal stream which has been created.

Can I inject that newly found video description data into the stream from inside pmt_cb() ? or does this happen somewhere else ?

As it stands (since I am not actually doing anything with the parsed descriptor), I still get the error : 

mpegts @ 0x7fac96104440] Could not find codec parameters for stream 0 (Video: jpegxs, 1 reference frame (2[0][0][0] / 0x0032), none): unspecified sizeConsider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

and as you can see, it doesn't get things like the dimensions when summarising the stream.

INPUT FMT: Video: jpegxs, 1 reference frame (2[0][0][0] / 0x0032), none
  Stream #0:0[0x100], 34, 1/90000: Video: jpegxs, 1 reference frame (2[0][0][0] / 0x0032), none, 60 fps, 60 tbr, 90k tbn
    Metadata:
      SRCPID          : 256

Could anyone advise how to connect the dots between parsing the PMT and getting that data into the streams parameters  ?

Thanks !!!




More information about the ffmpeg-devel mailing list