damus
damus copied to clipboard
Support MKV video files with multiple audio tracks (e.g. multiple languages)
User Story I
As a Damus user who is a content creator with a multi-lingual audience, I would like to be able to upload media with audio in multiple languages, so that I achieve localization of media in one upload.
acceptance criteria
Tbc
User Story II
As a Damus user who is a content creator with a multi-lingual audience, I would like damus users to be able to play media with audio in their preferred language, so that they can better understand the content I
acceptance criteria
Tbc
Describe alternatives you've considered Upload multiple videos, and maintain separate npubs and/or follow lists for each respective language of my aucience.
Additional context Via Ser sleepy. I asked for an example dual language dubbed video. @semisol advised iOS player should natively support Unsure if nostr.build supports this functionality
File type requested is MKV.
See https://matroska.org/index.html
Example event via sleepy
https://damus.io/nevent1qqs0glft582n06hrdczpjrn3n6jz0gs4de5c66r7re3gd68ulct2xlqprdmhxue69uhhyetvv9ujucnfw33k76twwpshy6ewvdhk6qgewaehxw309ac8junpd45kgtnxd9shg6npvchxxmmdqyg8wumn8ghj7vf5xqhxvdm69e5k7qgkwaehxw309an8yetwwvhxummnw3erztnrdaksda7456
https://archive.org/download/paprika-bd-2006-1080p-dual-audio_202112/Paprika%20BD%20%282006%29%20%5B1080p%5D%20%5BDUAL-AUDIO%5D.zip/Paprika%20BD%20%282006%29%20%5B1080p%5D%20%5BDUAL-AUDIO%5D.mkv
@fishcakeday ser 👀
Have yall considered MKV support? Is it a premium feature maybe for NB?
Current behavior view in damus
On interaction
@jb55 advises MKV is a wrapper, and not necessarily a widely adopted solution among multiple nostr or non-nostr apps.
Need research on figuring out what is the best standard?
According to gpt4 it might be possible to audio multi audio tracks to mp4, although player support is another question altogether
Creating an MP4 video file with multiple dubbed audio tracks can be done using various video editing and encoding software. Here’s a general step-by-step guide using a popular tool called FFmpeg, which is a powerful command-line utility for handling multimedia files:
Using FFmpeg
-
Install FFmpeg:
- Download and install FFmpeg from the official website or use a package manager if you're on Linux or macOS.
-
Prepare Your Files:
- Ensure you have your video file (e.g.,
video.mp4) and the audio files for each dubbed track (e.g.,audio_en.mp3,audio_es.mp3, etc.).
- Ensure you have your video file (e.g.,
-
Use FFmpeg Command:
- Open your command line interface (Terminal on macOS/Linux or Command Prompt on Windows).
- Use the following command to combine the video with multiple audio tracks:
ffmpeg -i video.mp4 -i audio_en.mp3 -i audio_es.mp3 -map 0:v -map 1:a -map 2:a -c:v copy -c:a aac -b:a 192k output.mp4- In this command:
-i video.mp4specifies the input video file.-i audio_en.mp3and-i audio_es.mp3specify the input audio files.-map 0:vmaps the video stream from the first input (the video).-map 1:aand-map 2:amap the audio streams from the second and third inputs (the audio tracks).-c:v copycopies the video codec without re-encoding.-c:a aacspecifies the audio codec for the output.-b:a 192ksets the audio bitrate.output.mp4is the name of the resulting file.
-
Check the Output:
- After running the command, you should have an
output.mp4file that contains the video and multiple audio tracks.
- After running the command, you should have an
Using Video Editing Software
If you prefer a graphical user interface, you can use video editing software like:
- Adobe Premiere Pro
- Final Cut Pro
- DaVinci Resolve
- Shotcut (free and open-source)
Steps in Video Editing Software:
- Import Video and Audio: Open your video editing software and import the video file and audio tracks.
- Add to Timeline: Place the video on the timeline and add each audio track to separate audio channels.
- Export Settings: When exporting, ensure you select the option to include multiple audio tracks.
- Export: Choose MP4 as the output format and export the file.
Conclusion
Using either FFmpeg or video editing software, you can create an MP4 file with multiple dubbed audio tracks. Make sure to test the output file in a compatible media player to ensure that all audio tracks are accessible.
@alltheseas MKV is just a container, and not the best one for the streaming purposes due to the lack of wide adoption and support. MP4 does support multiple tracks for sound and even subtitles. We do not have plans to support MKV, it also serves as deterrent from violation of our TOS, where we do not allow upload and sharing of media that you do not have copyrights to.