[FFmpeg-user] ffmpeg command required to convert MPEG TS to HLS with transcoding to aac
Mahesh Velankar
mvelanka at gmail.com
Sat Dec 10 20:53:17 EET 2022
I have a transport stream file with following details (given by ffprobe)
Input #0, mpegts, from 'f-13324-ccrtpa_before_tc_1669374838.ts':
Duration: 00:04:23.44, start: 8879.809433, bitrate: 2373 kb/s
Program 3
Stream #0:0[0x31]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
yuv420p(tv, bt709, progressive), 856x480 [SAR 320:321 DAR 16:9], Closed
Captions, 30 fps, 29.97 tbr, 90k tbn, 60 tbc
Stream #0:1[0x34](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
5.1(side), fltp, 320 kb/s
Stream #0:2[0x35](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
stereo, fltp, 192 kb/s (visual impaired)
Stream #0:3[0x36]: Data: klv (KLVA / 0x41564C4B)
I want to convert this into HLS playlists and segments. The requirements
are as follows
There will be two playlists
playlist 1 will have a listing of TS segments. Each such segment will have
1. Video stream (Stream #0:0) from the above input (h264) and
2. Audio stream 1 (Stream #0:1) from the above input (ac3 5.1) .... but
converted to aac format
playlist 2 will have a listing of TS segments. Each such segment will have
1. Video stream (Stream #0:0) from the above input (h264) and
2. Audio stream 2 (Stream #0:2) from the above input (ac3 stereo) .... but
converted to aac format
In short the output segments will have one video and one audio stream.
Since there are two audio streams I need to convert it into two different
playlists ... each having video and one of the audio streams
ac3 to aac conversion is mandatory, as it has to be played in the browser.
How can I achieve this with the ffmpeg command line? Please help or point
me to any such recipe if already available.
Thanks
More information about the ffmpeg-user
mailing list