axiomatic-systems / Bento4

Full-featured MP4 format, MPEG DASH, HLS, CMAF SDK and tools

Home Page:http://www.bento4.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HLS with multiple audio channels: mp4hls creates additional "random" audio channels. Why is that?

ministry-of-code opened this issue · comments

Hello,

I try to create a HLS from an MP4 video input file as well as 1-n audio tracks (AAC) by calling this command

mp4hls --output-dir=/tmp/123 [type=audio,+label=audio,+language_name=eins,+language=eins]audio-1.mp4 dev_sample_video_1280x720_1mb.mp4

The file master.m3u8 that is being generated from this command contains an "Audio" section that contains an unspecified language name "Unknown" and language "und". How can this be? I did not specify this audio & language. Where does it come from?

# Audio
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_aac",NAME="eins",LANGUAGE="eins",AUTOSELECT=YES,DEFAULT=YES,URI="audio/aac/eins/stream.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_aac",NAME="Unknown",LANGUAGE="und",AUTOSELECT=YES,URI="audio/aac/und/stream.m3u8"

For other video files that I used, I see additional audio channels like "Ger" and "Eng" that I did not specify as well. I don't know where this comes from and wonder why these information are being added automatically by mp4hls.

Has anyone an idea what the problem could be?

With this command line, you are telling the packager to use the audio track from the file audio-1.mp4 ([type=audio] is a filter), as well as all the tracks from dev_sample_video_1280x720_1mb.mp4 (no filter).
Is it possible that dev_sample_video_1280x720_1mb.mp4 contains both video and audio tracks? (you can use the mp4info tool to list all the tracks in the file).
If that's the case, you can tell the packager to only use the video track from that file, by prefixing it with [type=video]. (in this case, it would be: [type=video]dev_sample_video_1280x720_1mb.mp4).

Hello @barbibulle, thank you for your reply. Yes, the video file contains audio and what you said was my assumption as well. Thanks for the clarification - I could not find any information regarding this in the documentation. I'll try to add a filter for the video as you suggested.