ffmpeg-debug-qp icon indicating copy to clipboard operation
ffmpeg-debug-qp copied to clipboard

Request: Parameter for selecting video stream in MPEG-TS

Open lars18th opened this issue 5 years ago • 3 comments

Hi,

I request if you can include a parameter for selecting the PID (I feel the most simple solution) to select a particular video stream in a MPTS.

Thank you for this interesting tool!

lars18th avatar Jan 27 '20 10:01 lars18th

You are welcome to create a PR to add this functionality.

slhck avatar Jan 27 '20 10:01 slhck

Hi,

I put this info here only as a reference to someone that has time to implement it:

  • An overview of the main solution is to change the function call avformat_find_stream_info() here https://github.com/slhck/ffmpeg-debug-qp/blob/master/ffmpeg_debug_qp.c#L172 with a call to av_find_best_stream() passing the corresponding parameters to select the user requested stream. See https://www.ffmpeg.org/doxygen/2.4/group__lavf__decoding.html#gaa6fa468c922ff5c60a6021dcac09aff9

Regards.

lars18th avatar Feb 25 '20 13:02 lars18th

Hi,

With the support of the input PIPEs implemented in #22 this functionality can be obtained indirectly if you interpose some TS filter tool that selects the program you want.

For example: ffmpeg -i INPUT.ts -map 0:p:1344 -f mpegts pipe:1 | ./extract.py - INPUT.ldjson or tsp -I file INPUT.ts -P zap 1344 | ./extract.py - INPUT.ldjson

I hope it helps! :wink:

lars18th avatar Mar 12 '20 12:03 lars18th