celluloid icon indicating copy to clipboard operation
celluloid copied to clipboard

Show codec name and channels for audio tracks without name (MKV, possibly other formats)

Open smithfred opened this issue 7 years ago • 2 comments

Playing around with MKV stream metadata, I noticed that gnome-mpv shows "Unknown (eng)" or similar for any streams without a "name" attribute.

Especially for audio tracks, it would be very useful to show the codec and channels in this case (and even additionally when there is a name present). MKV, at least, has specific codec ID, codec name and audio channels that could be used for this.

So, e.g., instead of Unknown (eng), something like DTS-HD MA 7.1 (eng) could be shown, and instead of Primary (eng), something like Primary (eng, DTS-HD MA 7.1) could be shown (to disambiguate tracks that differ only by their codec).

smithfred avatar Aug 24 '18 16:08 smithfred

(from #722) If you point me in the right direction, I'd be willing to implement the change.

Right now, the tracks get loaded by from mpv's track-list property. This is done in update_track_list() defined in celluloid-player.c. The data returned from the property gets converted into a GPtrArray of CelluloidTracks (defined in celluloid-common.h) and exported as a GLib property. CelluloidView then uses this property to build menus.

If you want to implement this, the first thing you'd need to do would be to extend CelluloidTrack so that it can store the extra info you need. Then, update update_track_list() to extract the extra info. After that, update build_menu_from_track_list() (defined in celluloid-menu.c) so that it uses the new info.

gnome-mpv avatar Dec 20 '21 21:12 gnome-mpv

I'd also like to use the language itself. 'English' for 'eng', for example, instead of 'Unknown'.

OdinVex avatar Dec 01 '22 10:12 OdinVex