It seems easy to SET the video/audio PIDs when transcoding with ffprobe, or to get only streams with a specific PID - all that is in the manual.
But I want to GET them from the stream. You can see them if you have text output, it is the hex code in square brackets at the start of the stream information of an actual ts segment. e.g.
Input #0, mpegts, from '/Users/development/Movies/OC3.demo.ts':
Duration: 00:09:32.72, start: 0.040000, bitrate: 13239 kb/s
Program 1
Metadata:
service_name : Avalpa1: MPEG2 MHP
service_provider: Avalpa
Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], 2600 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
here [0x810]
Is there any way to get this videoPID in the programs
or streams
array entry of a probe of the master manifest? (when using the -show_programs
and -print_format json
options)
question from:
https://stackoverflow.com/questions/66049132/get-the-video-and-audio-pids-for-streams-with-ffprobe 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…