[FFmpeg-user] ffmpeg command required to convert MPEG TS to HLS with transcoding to aac
Robin van der Linden
linden at venom.one
Sat Dec 10 21:38:51 EET 2022
Hello,
ffmpeg can do this, at least some parts. It will create the segments and a master.m3u8 file for each track by itself. Still you will need to create master.m3u8 File wich references all the tracks master.m3u8 yourself. My Script is about 3500 lines long, so be prepared that you have to code lot yourself.
Im currently on the go, but I will try to provide you some more advice. Are you about to encode a single Video or do you need a full implemented rapackaging process for many vidz?
Kind regards,
Robin
________________________________
Von: Mahesh Velankar <mvelanka at gmail.com>
Gesendet: Samstag, 10. Dezember 2022 19:53
An: ffmpeg-user at ffmpeg.org
Betreff: [FFmpeg-user] ffmpeg command required to convert MPEG TS to HLS with transcoding to aac
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
_______________________________________________
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