FFMPEG HLS Multiple audio languages with var_stream_map - EXT-X-MEDIA:TYPE doesn't contain LANGUAGE
up vote
0
down vote
favorite
I have a question involving multiple audio languages on HLS with FFMPEG.
I'm currently using the following command to mux a transport stream with multiple audio languages into an HLS stream with a master playlist:
ffmpeg -re -i $INPUT_URL -map 0:v -c:v copy -map 0:a -c:a copy -f hls -hls_time 6 -hls_list_size 10 -hls_flags delete_segments+program_date_time -hls_segment_filename "$FULL_OUTPUT_FOLDER/stream_%v_%d.ts" -var_stream_map "v:0,agroup:groupname a:0,agroup:groupname a:1,agroup:groupname a:2,agroup:groupname a:3,agroup:groupname" -master_pl_name master.m3u8 $FULL_OUTPUT_FOLDER/stream-%v.m3u8
The output of this command looks like this:
ffmpeg version 4.0.3-1~16.04.york0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mpegts @ 0x55c8cb7fee40] start time for stream 5 is not set in estimate_timings_from_pts
[mpegts @ 0x55c8cb7fee40] start time for stream 6 is not set in estimate_timings_from_pts
[mpegts @ 0x55c8cb7fee40] start time for stream 7 is not set in estimate_timings_from_pts
Input #0, mpegts, from '/home/user/Videos/output/example.ts':
Duration: 00:37:50.26, start: 1.498667, bitrate: 1257 kb/s
Program 1
Metadata:
service_name : example
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 696x572 [SAR 64:45 DAR 3712:2145], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s
Stream #0:2[0x102](fra): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:3[0x103](ita): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:4[0x104](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:5[0x105](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:6[0x106](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:7[0x107](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_0_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_0.ts' for writing
[mpegts @ 0x55c8cb880380] frame size not set
[mpegts @ 0x55c8cb882040] frame size not set
[mpegts @ 0x55c8cb8837c0] frame size not set
[mpegts @ 0x55c8cb885280] frame size not set
Output #0, hls, to '/var/www/html/live/stream-%v.m3u8':
Metadata:
encoder : Lavf58.12.100
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 696x572 [SAR 64:45 DAR 3712:2145], q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s
Stream #0:2(fra): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:3(ita): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:4(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:3 -> #0:3 (copy)
Stream #0:4 -> #0:4 (copy)
Press [q] to stop, [?] for help
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-2.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-3.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-4.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-2.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-3.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-4.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_0_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-0.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/master.m3u8' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_3.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
The master playlist that's being output by this command looks like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-1.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-2.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-3.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-4.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=174900,RESOLUTION=696x572,AUDIO="group_groupname"
stream-0.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-1.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-2.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-3.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-4.m3u8
While this does seem to work with VLC, I need the EXT-X-MEDIA:TYPE tag to contain the LANGUAGE property. (the player I'm working with uses it to parse the audio tracks' language) I can't figure out how to do that based on the documentation I've found.
Could anyone help me with this?
Thanks!
ffmpeg
add a comment |
up vote
0
down vote
favorite
I have a question involving multiple audio languages on HLS with FFMPEG.
I'm currently using the following command to mux a transport stream with multiple audio languages into an HLS stream with a master playlist:
ffmpeg -re -i $INPUT_URL -map 0:v -c:v copy -map 0:a -c:a copy -f hls -hls_time 6 -hls_list_size 10 -hls_flags delete_segments+program_date_time -hls_segment_filename "$FULL_OUTPUT_FOLDER/stream_%v_%d.ts" -var_stream_map "v:0,agroup:groupname a:0,agroup:groupname a:1,agroup:groupname a:2,agroup:groupname a:3,agroup:groupname" -master_pl_name master.m3u8 $FULL_OUTPUT_FOLDER/stream-%v.m3u8
The output of this command looks like this:
ffmpeg version 4.0.3-1~16.04.york0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mpegts @ 0x55c8cb7fee40] start time for stream 5 is not set in estimate_timings_from_pts
[mpegts @ 0x55c8cb7fee40] start time for stream 6 is not set in estimate_timings_from_pts
[mpegts @ 0x55c8cb7fee40] start time for stream 7 is not set in estimate_timings_from_pts
Input #0, mpegts, from '/home/user/Videos/output/example.ts':
Duration: 00:37:50.26, start: 1.498667, bitrate: 1257 kb/s
Program 1
Metadata:
service_name : example
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 696x572 [SAR 64:45 DAR 3712:2145], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s
Stream #0:2[0x102](fra): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:3[0x103](ita): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:4[0x104](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:5[0x105](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:6[0x106](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:7[0x107](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_0_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_0.ts' for writing
[mpegts @ 0x55c8cb880380] frame size not set
[mpegts @ 0x55c8cb882040] frame size not set
[mpegts @ 0x55c8cb8837c0] frame size not set
[mpegts @ 0x55c8cb885280] frame size not set
Output #0, hls, to '/var/www/html/live/stream-%v.m3u8':
Metadata:
encoder : Lavf58.12.100
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 696x572 [SAR 64:45 DAR 3712:2145], q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s
Stream #0:2(fra): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:3(ita): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:4(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:3 -> #0:3 (copy)
Stream #0:4 -> #0:4 (copy)
Press [q] to stop, [?] for help
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-2.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-3.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-4.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-2.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-3.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-4.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_0_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-0.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/master.m3u8' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_3.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
The master playlist that's being output by this command looks like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-1.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-2.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-3.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-4.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=174900,RESOLUTION=696x572,AUDIO="group_groupname"
stream-0.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-1.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-2.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-3.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-4.m3u8
While this does seem to work with VLC, I need the EXT-X-MEDIA:TYPE tag to contain the LANGUAGE property. (the player I'm working with uses it to parse the audio tracks' language) I can't figure out how to do that based on the documentation I've found.
Could anyone help me with this?
Thanks!
ffmpeg
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a question involving multiple audio languages on HLS with FFMPEG.
I'm currently using the following command to mux a transport stream with multiple audio languages into an HLS stream with a master playlist:
ffmpeg -re -i $INPUT_URL -map 0:v -c:v copy -map 0:a -c:a copy -f hls -hls_time 6 -hls_list_size 10 -hls_flags delete_segments+program_date_time -hls_segment_filename "$FULL_OUTPUT_FOLDER/stream_%v_%d.ts" -var_stream_map "v:0,agroup:groupname a:0,agroup:groupname a:1,agroup:groupname a:2,agroup:groupname a:3,agroup:groupname" -master_pl_name master.m3u8 $FULL_OUTPUT_FOLDER/stream-%v.m3u8
The output of this command looks like this:
ffmpeg version 4.0.3-1~16.04.york0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mpegts @ 0x55c8cb7fee40] start time for stream 5 is not set in estimate_timings_from_pts
[mpegts @ 0x55c8cb7fee40] start time for stream 6 is not set in estimate_timings_from_pts
[mpegts @ 0x55c8cb7fee40] start time for stream 7 is not set in estimate_timings_from_pts
Input #0, mpegts, from '/home/user/Videos/output/example.ts':
Duration: 00:37:50.26, start: 1.498667, bitrate: 1257 kb/s
Program 1
Metadata:
service_name : example
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 696x572 [SAR 64:45 DAR 3712:2145], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s
Stream #0:2[0x102](fra): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:3[0x103](ita): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:4[0x104](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:5[0x105](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:6[0x106](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:7[0x107](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_0_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_0.ts' for writing
[mpegts @ 0x55c8cb880380] frame size not set
[mpegts @ 0x55c8cb882040] frame size not set
[mpegts @ 0x55c8cb8837c0] frame size not set
[mpegts @ 0x55c8cb885280] frame size not set
Output #0, hls, to '/var/www/html/live/stream-%v.m3u8':
Metadata:
encoder : Lavf58.12.100
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 696x572 [SAR 64:45 DAR 3712:2145], q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s
Stream #0:2(fra): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:3(ita): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:4(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:3 -> #0:3 (copy)
Stream #0:4 -> #0:4 (copy)
Press [q] to stop, [?] for help
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-2.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-3.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-4.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-2.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-3.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-4.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_0_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-0.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/master.m3u8' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_3.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
The master playlist that's being output by this command looks like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-1.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-2.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-3.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-4.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=174900,RESOLUTION=696x572,AUDIO="group_groupname"
stream-0.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-1.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-2.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-3.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-4.m3u8
While this does seem to work with VLC, I need the EXT-X-MEDIA:TYPE tag to contain the LANGUAGE property. (the player I'm working with uses it to parse the audio tracks' language) I can't figure out how to do that based on the documentation I've found.
Could anyone help me with this?
Thanks!
ffmpeg
I have a question involving multiple audio languages on HLS with FFMPEG.
I'm currently using the following command to mux a transport stream with multiple audio languages into an HLS stream with a master playlist:
ffmpeg -re -i $INPUT_URL -map 0:v -c:v copy -map 0:a -c:a copy -f hls -hls_time 6 -hls_list_size 10 -hls_flags delete_segments+program_date_time -hls_segment_filename "$FULL_OUTPUT_FOLDER/stream_%v_%d.ts" -var_stream_map "v:0,agroup:groupname a:0,agroup:groupname a:1,agroup:groupname a:2,agroup:groupname a:3,agroup:groupname" -master_pl_name master.m3u8 $FULL_OUTPUT_FOLDER/stream-%v.m3u8
The output of this command looks like this:
ffmpeg version 4.0.3-1~16.04.york0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mpegts @ 0x55c8cb7fee40] start time for stream 5 is not set in estimate_timings_from_pts
[mpegts @ 0x55c8cb7fee40] start time for stream 6 is not set in estimate_timings_from_pts
[mpegts @ 0x55c8cb7fee40] start time for stream 7 is not set in estimate_timings_from_pts
Input #0, mpegts, from '/home/user/Videos/output/example.ts':
Duration: 00:37:50.26, start: 1.498667, bitrate: 1257 kb/s
Program 1
Metadata:
service_name : example
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 696x572 [SAR 64:45 DAR 3712:2145], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s
Stream #0:2[0x102](fra): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:3[0x103](ita): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:4[0x104](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:5[0x105](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:6[0x106](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:7[0x107](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_0_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_0.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_0.ts' for writing
[mpegts @ 0x55c8cb880380] frame size not set
[mpegts @ 0x55c8cb882040] frame size not set
[mpegts @ 0x55c8cb8837c0] frame size not set
[mpegts @ 0x55c8cb885280] frame size not set
Output #0, hls, to '/var/www/html/live/stream-%v.m3u8':
Metadata:
encoder : Lavf58.12.100
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 696x572 [SAR 64:45 DAR 3712:2145], q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s
Stream #0:2(fra): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 126 kb/s
Stream #0:3(ita): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream #0:4(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:3 -> #0:3 (copy)
Stream #0:4 -> #0:4 (copy)
Press [q] to stop, [?] for help
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-2.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-3.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-4.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_2_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-2.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_3_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-3.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_4_2.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-4.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_0_1.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-0.m3u8.tmp' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/master.m3u8' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream_1_3.ts' for writing
[hls @ 0x55c8cb834980] Opening '/var/www/html/live/stream-1.m3u8.tmp' for writing
The master playlist that's being output by this command looks like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-1.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-2.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-3.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_groupname",NAME="audio_0",DEFAULT=YES,URI="stream-4.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=174900,RESOLUTION=696x572,AUDIO="group_groupname"
stream-0.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-1.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-2.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-3.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=174900,CODECS="mp4a.40.2",AUDIO="group_groupname"
stream-4.m3u8
While this does seem to work with VLC, I need the EXT-X-MEDIA:TYPE tag to contain the LANGUAGE property. (the player I'm working with uses it to parse the audio tracks' language) I can't figure out how to do that based on the documentation I've found.
Could anyone help me with this?
Thanks!
ffmpeg
ffmpeg
asked Nov 8 at 9:56
Moonsurfer_1
606
606
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
After looking at the source code, I found out that this is simply not supported (yet?)
In the code you can find the following functions:
[libavformat/hlsenc.c] create_master_playlist
[libavformat/hlsplaylist.c] ff_hls_write_audio_rendition
When looking at these implementations, you can see that the LANGUAGE attribute is never actually being output unfortunately.
So that means I'll have to find an alternative way to accomplish this.
1
File a report at trac.ffmpeg.org
– Gyan
Nov 8 at 11:10
Thanks for the suggestion. I've sent a patch to the mailing list to implement it. I hope it'll be accepted.
– Moonsurfer_1
yesterday
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
After looking at the source code, I found out that this is simply not supported (yet?)
In the code you can find the following functions:
[libavformat/hlsenc.c] create_master_playlist
[libavformat/hlsplaylist.c] ff_hls_write_audio_rendition
When looking at these implementations, you can see that the LANGUAGE attribute is never actually being output unfortunately.
So that means I'll have to find an alternative way to accomplish this.
1
File a report at trac.ffmpeg.org
– Gyan
Nov 8 at 11:10
Thanks for the suggestion. I've sent a patch to the mailing list to implement it. I hope it'll be accepted.
– Moonsurfer_1
yesterday
add a comment |
up vote
0
down vote
accepted
After looking at the source code, I found out that this is simply not supported (yet?)
In the code you can find the following functions:
[libavformat/hlsenc.c] create_master_playlist
[libavformat/hlsplaylist.c] ff_hls_write_audio_rendition
When looking at these implementations, you can see that the LANGUAGE attribute is never actually being output unfortunately.
So that means I'll have to find an alternative way to accomplish this.
1
File a report at trac.ffmpeg.org
– Gyan
Nov 8 at 11:10
Thanks for the suggestion. I've sent a patch to the mailing list to implement it. I hope it'll be accepted.
– Moonsurfer_1
yesterday
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
After looking at the source code, I found out that this is simply not supported (yet?)
In the code you can find the following functions:
[libavformat/hlsenc.c] create_master_playlist
[libavformat/hlsplaylist.c] ff_hls_write_audio_rendition
When looking at these implementations, you can see that the LANGUAGE attribute is never actually being output unfortunately.
So that means I'll have to find an alternative way to accomplish this.
After looking at the source code, I found out that this is simply not supported (yet?)
In the code you can find the following functions:
[libavformat/hlsenc.c] create_master_playlist
[libavformat/hlsplaylist.c] ff_hls_write_audio_rendition
When looking at these implementations, you can see that the LANGUAGE attribute is never actually being output unfortunately.
So that means I'll have to find an alternative way to accomplish this.
answered Nov 8 at 11:06
Moonsurfer_1
606
606
1
File a report at trac.ffmpeg.org
– Gyan
Nov 8 at 11:10
Thanks for the suggestion. I've sent a patch to the mailing list to implement it. I hope it'll be accepted.
– Moonsurfer_1
yesterday
add a comment |
1
File a report at trac.ffmpeg.org
– Gyan
Nov 8 at 11:10
Thanks for the suggestion. I've sent a patch to the mailing list to implement it. I hope it'll be accepted.
– Moonsurfer_1
yesterday
1
1
File a report at trac.ffmpeg.org
– Gyan
Nov 8 at 11:10
File a report at trac.ffmpeg.org
– Gyan
Nov 8 at 11:10
Thanks for the suggestion. I've sent a patch to the mailing list to implement it. I hope it'll be accepted.
– Moonsurfer_1
yesterday
Thanks for the suggestion. I've sent a patch to the mailing list to implement it. I hope it'll be accepted.
– Moonsurfer_1
yesterday
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205283%2fffmpeg-hls-multiple-audio-languages-with-var-stream-map-ext-x-mediatype-doesn%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password