Skip to content

Initial (audio) track not set since mpv process refactoring #1220

@basicmaster

Description

@basicmaster

Describe the bug
It seems that the current audio track ID is not initialized during playback start, to refer to the first audio track and currently instead keeps the value -1000 (aka MediaSettings::NoneSelected). This probably also affects the selection of video tracks and subtitle tracks likewise (I only tested with audio).

Thus the (default) shortcuts to switch the audio track to the next (k) or previous (Shift+k) one no longer have an effect. Also in the Audio -> Track submenu, none of the items is marked as active when playback is started.

This affects version v24.5.0.10323 (or newer). In contrast version v24.5.0.10283 (or older) is not affected. Due to the in-between commits, I guess the reason is the newly written mpv process handling.

To Reproduce
Steps to reproduce the behavior:

  1. Open a video file that has multiple audio tracks
  2. Press k to change to the next audio track
  3. Nothing happens

Expected behavior
SMPlayer switches to the next audio track and displays a corresponding OSD message.

Your Enviroment

  • SMPlayer version: 25.6.0 (Revision 10386)
  • OS: Debian 12
  • Multimedia engine you're using with SMPlayer (preferences -> general): MPV (version 0.35.1)

Logs

Affected version

[10:53:42:282] Core::nextAudio
[10:53:42:283] WARNING: Core::nextAudio: audio ID -1000 not found!

Unaffected version

[11:19:39:743] Core::nextAudio
[11:19:39:744] Core::nextAudio: numItems: 3, item: 0
[11:19:39:744] Core::nextAudio: item: 1, ID: 2
[11:19:39:744] Core::changeAudio: ID: 2, allow_restart: 1
[11:19:39:744] changeAudio: ID: 2
[11:19:39:744] MPVProcess::sendCommand: " set aid 2"
[11:19:39:744] Core::updateWidgets
[11:19:39:745] DefaultGui::updateWidgets
[11:19:39:745] BaseGuiPlus::updateWidgets
[11:19:39:745] BaseGui::updateWidgets
[11:19:39:745] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[11:19:39:745] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[11:19:39:746] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[11:19:39:770] MPVProcess::parseLine: "Track switched:"
[11:19:39:770] MPVProcess::parseLine: " (+) Video --vid=1 (hevc 1920x1080 50.000fps)"
[11:19:39:771] MPVProcess::parseLine: "     Audio --aid=1 --alang=deu (aac_latm 2ch 48000Hz)"
[11:19:39:771] MPVProcess::parseLine: audio id: 1 lang: "deu" name: ""
[11:19:39:771] MPVProcess::updateAudioTrack: ID: 1
[11:19:39:772] MPVProcess::parseLine: " (+) Audio --aid=2 --alang=deu 'visual impaired' (aac_latm 2ch 48000Hz)"
[11:19:39:772] MPVProcess::parseLine: audio id: 2 lang: "deu" name: "visual impaired"
[11:19:39:772] MPVProcess::updateAudioTrack: ID: 2
[11:19:39:773] MPVProcess::parseLine: "     Audio --aid=3 --alang=qks 'hearing impaired' (aac_latm 2ch 48000Hz)"
[11:19:39:773] MPVProcess::parseLine: audio id: 3 lang: "qks" name: "hearing impaired"
[11:19:39:773] MPVProcess::updateAudioTrack: ID: 3

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions