Modify video/audio PID

Hello, I am running ShotCut on Mac Sierra. Is there any way via config file, command line, or “other” export file settings to modify the video and audio PID when using mpegts export format? I am creating some short clips for an actual over the air broadcaster with specific Vid/Aud PID requirements and would rather not have to trans-code my files. I did some searches but came up empty. Thanks!

The only thing you can do is set the starting PID for the audio/video elementary streams by adding mpegts_start_pid=<N> to the Other tab. It defaults to 256, and there is not individual control. This is a FFmpeg limitation. Run ffmpeg -h muxer=mpegts to see other transport stream options and convert the “-name value” syntax to “name=value” for MLT/Shotcut.

Thank you sir. Will give this a try.

Hello, your suggested use of [mpegts_start_pid=] worked as described. Thank you!

After searching further into ffmpeg documentation i discovered the following parameter option:

-streamid output-stream-index:new-value (output)

Assign a new stream-id value to an output stream. This option should be specified prior to the output filename to which it applies. For the situation where multiple output files exist, a streamid may be reassigned to a different value.

For example, to set the stream 0 PID to 33 and the stream 1 PID to 36 for an output mpegts file:

ffmpeg -i inurl -streamid 0:33 -streamid 1:36 out.ts

In the Other tab, I tried multiple variations of converting [-streamid 0:33 -streamid 1:36] to “streamid=0:33”, “mpegts_streamid=0:33”, etc. but the commands are ignored in all cases. Is there another syntax structure i could try?

Thank you.

Shotcut and MLT only support FFmpeg AVOptions, which is a subset of the ffmpeg command line tool’s option set. streamid is a command line option and not an AVOption. So, it cannot be used here. Instead, you would have to remux the file (not transcode) afterwards by something like:
ffmpeg -i in.ts -c copy -streamid 0:33 -streamid 1:36 out.ts

Very clear explanation. Thanks again.

This topic was automatically closed after 90 days. New replies are no longer allowed.