ffmpeg-debug-qp
                                
                                
                                
                                    ffmpeg-debug-qp copied to clipboard
                            
                            
                            
                        Request: Parameter for selecting video stream in MPEG-TS
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!
You are welcome to create a PR to add this functionality.
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 toav_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.
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: