Bug 382546 - Support multi-audio videos
Summary: Support multi-audio videos
Status: RESOLVED FIXED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (show other bugs)
Version: 2.0.16-2
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-20 17:36 UTC by Patrick Silva
Modified: 2019-03-08 23:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Kaffeine with the language selection for a multi-track mp4 (907.37 KB, image/png)
2019-03-07 00:33 UTC, Mauro Carvalho Chehab
Details
tracks names are not entirely readable (223.74 KB, image/png)
2019-03-08 23:44 UTC, Patrick Silva
Details
apparently the dropdown is empty (655.75 KB, image/png)
2019-03-08 23:47 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2017-07-20 17:36:35 UTC
I can't change the audio track of multi-audio videos (mkv, avi, mp4). Can kaffeine devs give us this feature please? Thanks.
Comment 1 Patrick Silva 2019-03-02 16:04:06 UTC
It's still impossible to change the audio track of multi-audio videos. :(
Comment 2 Mauro Carvalho Chehab 2019-03-07 00:33:17 UTC
Created attachment 118611 [details]
Kaffeine with the language selection for a multi-track mp4

Kaffeine does support multi-audio track mp4.

You should notice that language selection for multi-audio videos is at the bottom of the window. See the image. It is the box I painted with green.

There was however a bug with Vlc (maybe due to some changes at the library?): it was not allowing to change the language back. I'm pushing a fixup.
Comment 3 Mauro Carvalho Chehab 2019-03-07 00:34:57 UTC
Git commit 9c3746e69ede5579ffd113ce80df14361ee26a73 by Mauro Carvalho Chehab.
Committed on 07/03/2019 at 00:34.
Pushed by mauroc into branch 'master'.

backend-vlc: store current audio stream

Store the new current audio stream after a change. Without
that, it is not possible to change back to the first audio
channel.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

M  +4    -2    src/backend-vlc/vlcmediawidget.cpp

https://commits.kde.org/kaffeine/9c3746e69ede5579ffd113ce80df14361ee26a73
Comment 4 Patrick Silva 2019-03-07 00:45:04 UTC
Weird. The box painted in green is greyed out here on Arch Linux.
Tested avi, mp4 and mkv multi-audio videos.
Comment 5 Mauro Carvalho Chehab 2019-03-07 01:07:26 UTC
(In reply to Patrick Silva from comment #4)
> Weird. The box painted in green is greyed out here on Arch Linux.
> Tested avi, mp4 and mkv multi-audio videos.

Kaffeine strongly relies on libVlc to be able to detect multi-track videos. It could be due to some differences between the version you're using for vlc or because the track encoding is using something that libvlc won't properly detect.

In my case, I'm using the open source Elefants Dream video from:

   https://www.youtube.com/watch?v=TLkA0RELQ1g

As this video has only English, I downloaded also the Spanish version from:

   https://www.youtube.com/watch?v=B1L20Svw6sQ

Extracted its audio channel and merged it to the main video with:

   $ ffmpeg -i Elephants_Dream_\(2006\).webm -i spanish.mp3 -map 0 -map 1 -metadata:s:a:1 language=spa elephants_dream.mp4
Comment 6 Mauro Carvalho Chehab 2019-03-08 22:00:16 UTC
(In reply to Patrick Silva from comment #4)
> Weird. The box painted in green is greyed out here on Arch Linux.
> Tested avi, mp4 and mkv multi-audio videos.

While addressing another bug, I found one issue at the logic that updates the metadata. Basically, up to 2.0.16, the audio channels are updated only for the first video.

There are still some small things to work with, but I pushed some patches that should fix the issue. Please test.
Comment 7 Patrick Silva 2019-03-08 23:43:29 UTC
I have just installed kaffeine-git on Arch Linux.
Now i can select the audio track \o/

I noticed two issues:
  sometimes the tracks names are not entirely readable even when the dropdown is open;
  sometimes the dropdown seems empty when I open a file, despite the tracks are listed when I 
  open the dropdwn and kaffeine plays the first track correctly

I will post screenshots.
Thanks Mauro.
Comment 8 Patrick Silva 2019-03-08 23:44:24 UTC
Created attachment 118656 [details]
tracks names are not entirely readable
Comment 9 Patrick Silva 2019-03-08 23:47:14 UTC
Created attachment 118657 [details]
apparently the dropdown is empty