[FFmpeg-user] Extract HLS from TS
EnoSat
enosat at yahoo.com
Fri Aug 16 14:46:00 EEST 2024
stream is defined as:
Program 1001 Metadata: service_name : OTT 1 service_provider: intechmedia.net Stream #0:44[0x385]: Unknown: none ([13][0][0][0] / 0x000D)
complet TS:
https://mega.nz/file/tE0nFa6C#ngfLLXIpx8Ue3R99MgTAW3ttIp10kfF1zsdjxLvNXiU
piatok 16. augusta 2024 o 12:45:38 SELČ používateľ Oliver Fromme <oliver at fromme.com> napísal:
EnoSat via ffmpeg-user wrote:
> Is it possible to extract streams from a TS file if a stream is stored on a certain pide?
> e.g:pid 900
I'm not sure if I understand your question corrently, but you can
select a stream from an MPEG TS file by PID (program ID) using the
"#pid" or "i:pid" syntax. See the section "stream specifier" in
the documentation.
For example, the following will extract the stream with PID 1234
from the input TS file and copy it into an MKV container:
ffmpeg -i input.ts -map 0:i:1234 -c copy output.mkv
(Alternatively ``-map 0:#1234'', but the "#" character has special
meaning to some UNIX shells, so you might have to escape or quote
it. Therefore I recommend to use the "i:" syntax.)
Note that FFmpeg supports both decimal (like 1234) and hexadecimal
values (0x12ab) for the PID. If you use a decimal PID, avoid
leading zeroes (like (0765) because this might be interpreted as
an octal expression. I haven't checked this, though, but typically
programs use a function of the strtol() family with base 0, so it
handles decimal, hexadecimal and octal values automatically.
Therefore, in general, it's better to avoid leading zeroes when
specifying decimal numbers.
Best regards
-- Oliver
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list