[FFmpeg-trac] #4228(undetermined:new): MPEG-TS (from DVB) with PAT + PMT causes ffmpeg to try analyzing all streams of a program (max analyzeduration used), no way to exclude streams

FFmpeg trac at avcodec.org
Mon Jan 5 23:13:56 CET 2015


#4228: MPEG-TS (from DVB) with PAT + PMT causes ffmpeg to try analyzing all
streams of a program (max analyzeduration used), no way to exclude streams
-------------------------------------+-------------------------------------
             Reporter:  olifre       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Not sure whether this is more a "wish" than a defect - feel free to demote
 as needed.

 I have a MPEG-TS recording with PMT, PAT, SDT, EIT and all audio + video +
 teletext + subtitle PIDs recorded (I am just reworking the DVB-S/2
 implementation in mpv).

 On probe'ing that, ffmpeg looks into the PAT to find all stream PIDs which
 belong to the recorded program.
 This causes ffmpeg to also "see" additional streams, such as HbbTV-data,
 even though these are not in the recording (I do not add them to the
 TS_TAP device) nor are they interesting to / understood by ffmpeg.

 The problem is that these streams cause {{{avformat_find_stream_info()}}}
 to make use of the full probesize / analyzeduration. For a live-stream,
 this is not really useful (channel switch taking 5 seconds etc.). Of
 course I could just reduce the analyzeduration, but I would feel much more
 comfortable at being able to tell ffmpeg a "whitelist" of stream-ids it
 should look at, i.e. it should just ignore the additional PIDs (if user
 requests that).

 The PAT-parsing happens in {{{pat_cb()}}} in {{{mpegts.c}}}, the PIDs are
 added in {{{add_pid_to_pmt}}}.

 If there would be a way to specify such a whitelist (maybe it's already
 there, and I just missed it?) I would gladly use it.

 Attached is a sample recording. I chose a very small filesize to be able
 to attach to the bugtracker, so I also had to reduce the analyzeduration
 to 1 s to show the described behaviour. With a larger file, the problem
 also happens with 5 s duration (if you want, I can upload one).

 If you want a file with a TS of a full transponder recorded (i.e. also
 really including these HbbTV streams), I can also upload something like
 this (i.e. ffmpeg could of course also identify + ignore those streams, if
 this is the preferred solution - although then, I would also have to parse
 the full PAT in mpv and add those streams to the TS to give them to
 ffmpeg, that's why I believe the whitelist would be more appropriate).

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4228>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list