Reputation: 75
I have some .ts
files as part of an hls audio stream. Can I use the cat
command to append them and get the .mp3 file. I'm curious what ffmpeg
does to create the mp3 from .ts
or .m3u8
files so that I can implement it in a node server
Upvotes: 2
Views: 469
Reputation: 1080
No. If you just concatenate them the result is still a MPEG-TS container file, i.e. basically a sequence of 188-byte TS packets. What you need is a MPEG-TS demuxer which would turn (decapsulate) the TS into a sequence of MP3 audio frames [1], more generally speaking the audio elementary stream.
[1] http://www.mp3-tech.org/programmer/frame_header.html
Upvotes: 5