Opened 18 years ago
Closed 12 years ago
Last modified 12 years ago
#3260 closed Bug Report - General (Won't Fix)
Internal player chooses wrong audio track for default playback
Reported by: | Owned by: | stuartm | |
---|---|---|---|
Priority: | major | Milestone: | 0.26.1 |
Component: | MythTV - DVD Playback | Version: | 0.20 |
Severity: | medium | Keywords: | internal player audio tracks |
Cc: | Ticket locked: | no |
Description
I use 0.20-fixes. I have an AVI rip of a DVD of a movie with two audio tracks. The first track is the soundtrack and the second is a commentary. The movie was filmed in the early 1960s and so has glorious mono sound. The commentary was done recently in stereo. Because the commentary track has more sound channels than the actual soundtrack the internal player picks it as the default audio track to play, which of course isn't the desired behavior.
I suggest that the following decision tree be followed:
- Play the first available 5.1 track. (It's unlikely a commentary will done in surround sound.) Else . . .
- Play the first audio track, regardless of whether a later track has more channels.
If the above is too cumbersome, I suppose that a simple
- Play the first audio track by default
will still be an improvement over the current arrangement, which is too smart for its own good.
PS - Although I listed this under MythVideo?, apparently the issue exists with MythDVD as well.
Attachments (6)
Change History (46)
comment:1 Changed 18 years ago by
Owner: | changed from Anduin Withers to skamithi |
---|
comment:3 Changed 18 years ago by
Replying to skamithi:
please attach the "mythfrontend -v playback" output from the time the movie starts to the time you exit the video.
OK, log attached. Looking it over, I'm puzzled and surprised by the
2007-03-24 17:35:53.959 Dec: Selecting first track 2007-03-24 17:35:53.959 Dec: Selected track #1 in the Unknown language(0)
because that's definitely not what I see; the internal player always insists on playing the second track (as seen in Menu|Select Audio Track) by default when playback starts.
comment:4 Changed 18 years ago by
Oops disregard that first attachment, I forgot I had bookmarks enabled on that one so the DVD probably just selected the audio track I had going the last time.
In the OSD menu, the commentary track appears first in the list. This doesn't seem right as mplayer and vlc both show the main audio track appearing first. However, xine shows the commentary track first as well, although it auto-selects the main track properly. Interestingly enough, using the DVD's own audio/language menu in Myth causes the commentary track to play when I select the main audio track and vice versa.
comment:5 Changed 18 years ago by
I'm in the UK using the ATrpms 'Bleeding' trunk_r13045 build on FC5. Mytharchive creates mp2 audio by default (Don't re-encode from DVB-T). All DVDs created like this are silent in the internal player until the alternative audio track is selected. The OSD identifies the tracks as (1 Unknown AC3 2Ch) and (2 Unknown MP2 1Ch)- although I think I'm getting stereo.
A DVD that I created using the standard re-encoding (to go from an unusual transmitted 544*576 resolution to DVD-standards-compliant 720*576) has ac3 audio. This is seen as the only audio track and plays immediately. The same recording, burned without re-encoding, plays ok but needs the usual selection of the alternative track.
comment:6 Changed 18 years ago by
I've just found that navigation using the number/arrow combination from the keyboard will often lock up the internal player; it doesn't seem to happen with the mouse roller. With normal frontend evocation I then get continuous reports of prebuffering pause; with the -v playback option the report is: 2007-03-26 16:21:12.295 DVDNAV_CELL_CHANGE: pg_length == 86367600, pgc_length == 691516800, cell_start == 0, pg_start == 0, title == 1, part == 1 titleParts 8 2007-03-26 16:21:12.295 DVDNAV_SPU_CLUT_CHANGE happened. 2007-03-26 16:21:12.295 DVDNAV_SPU_STREAM_CHANGE: physical_wide==-1, physical_letterbox==-1, physical_pan_scan==-1, logical==1081472
repeated indefinitely. Maybe it doesn't belong on this ticket ? - but it's happening :-)
comment:7 Changed 18 years ago by
Milestone: | unknown → 0.21 |
---|---|
Status: | new → assigned |
comment:8 Changed 18 years ago by
Summary: | Internal player chooses wrong audio track for default playback → Internal dvd player chooses wrong audio track for default playback |
---|
Changed 18 years ago by
Attachment: | mythdvd_fix_for_ticket_3260.diff added |
---|
remove qbubblesort for audio tracks. its meant for the subtitle tracks since they are sometimes not sorted when parsed by AVformatdecoder::scanstreams. Audio tracks look sorted already and the qbubblesort doesn't take into account audio streams of different codecs.
comment:9 Changed 18 years ago by
please note that the problem i'm addressing only relates to files flagged as dvds.
comment:10 Changed 18 years ago by
comment:11 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:12 follow-up: 14 Changed 18 years ago by
comment:13 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Sorry I didn't respond earlier. I'm now running trunk_r13228, so the changes above should be in place. I still have the same behaviour, with mp2 audio not selected by default. ffmpeg -i doesn't find any other audio streams. Input #0, mpeg, from 'VTS_01_1.VOB':
Duration: 01:02:17.4, start: 0.120000, bitrate: 2298 kb/s Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576, 15000 kb/s, 25.00 fps(r) Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 160 kb/s
Applies to both internal DVD player and the Mytharchive 'play iso image'. And jump forward from the keyboard still hangs... Reopening to get it flagged up.
comment:14 Changed 18 years ago by
comment:15 Changed 18 years ago by
Summary: | Internal dvd player chooses wrong audio track for default playback → Internal player chooses wrong audio track for default playback |
---|
Changed 18 years ago by
Attachment: | dont_apply_audio_autoselect_on_videos.diff added |
---|
patch prevents the audio autoselection code from executing if you play a file flagged as a video (non-dvd). Shouldn't affect regular recordings.
comment:16 Changed 18 years ago by
I am pleased to report that Stanley Kamithi's most-recent patch has taken care of my wrong audio-track in-AVI issue. Thank you!
comment:17 Changed 18 years ago by
comment:18 Changed 18 years ago by
comment:19 Changed 18 years ago by
It seems that my 'problem' here is not precisely the one described in the current title. It is that the player does not play as default the *only* audio track present in the main VOB files if the audio track in the menu had a different format. I can still play the audio by selecting the 'other' track that the player says it has found, so the effect is not as serious as misidentification in mythtranscode, which leads after two iterations to complete loss of the wanted stream. All this refers only to DVDs created by Mytharchive. It does seem that wiping the slate clean between playing menu and playing content is what is needed to get the expected behaviour.
Changed 18 years ago by
Attachment: | remove_audio_streams.diff added |
---|
remove audio streams from the stream list during title transitions. resolves problem mentioned problem but sometimes during the transition audio is disabled and never reenabled. still testing patch.
comment:20 Changed 18 years ago by
(In [13427]) Refs #3260. commit log for [13426]. accidentally commited without commit log. internal dvd player: refresh audio track list from the context during dvd title transitions. some dvds have ac3 track in the dvd menu and mp2 track only in the title. refreshing the audio list makes it play the right track at the right time. let me know if this causes audio problems for others. tested it for a couple of weeks with no problem.
comment:21 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:22 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Just checked and it's not yet fixed. I realise the rental DVD from last night asked for the audio language up front so it wasn't auto-selected.
Log with -v playback, audio attached.
comment:23 Changed 18 years ago by
Now using ATrpms trunk_r13460, Mythburn iso image with ac3 for menu and mp2 stereo in chapters.
Still mute on changeover from menu to content. '+' key unmutes but now repeating this does *not* affect the sound, and no 'change audio channel' item appears in the menu - ie, no phantom channels now. In the chapter menu some chapters usually start with sound, some don't.
Here's a brief log extract on initial entry and title selection:
[mpeg2video @ 0x7bf8284]00 motion_type at 2 34
[mpeg2video @ 0x7bf8284]00 motion_type at 1 35
2007-05-22 23:27:02.342 AFD: Warning, video codec 0xbecddc0 id(MPEG2VIDEO) type (Video) already open.
2007-05-22 23:27:02.343 AFD: Opened codec 0xc2331f0, id(AC3) type(Audio)
2007-05-22 23:27:04.534 WriteAudio?: buffer underrun
2007-05-22 23:27:05.337 WriteAudio?: buffer underrun
2007-05-22 23:27:11.496 AFD: Warning, audio codec 0xc2331f0 id(AC3) type (Audio) already open, leaving it alone.
2007-05-22 23:27:11.503 AFD: Warning, video codec 0xbecddc0 id(MPEG2VIDEO) type (Video) already open.
2007-05-22 23:27:11.503 AFD: Warning, audio codec 0xc2331f0 id(AC3) type (Audio) already open, leaving it alone.
2007-05-22 23:27:11.504 AFD: Opened codec 0xcbe0900, id(MP2) type(Audio)
2007-05-22 23:27:11.509 NVP: Disabling Audio, params(0,-1,-1)
2007-05-22 23:27:11.516 AFD: Warning, video codec 0xbecddc0 id(MPEG2VIDEO) type (Video) already open.
2007-05-22 23:27:11.516 AFD: Opened codec 0xc235ce0, id(MP2) type(Audio)
2007-05-22 23:27:11.517 NVP: Disabling Audio, params(16,2,0)
[mpeg2video @ 0x7bf8284]00 motion_type at 7 7
[mpeg2video @ 0x7bf8284]slice mismatch
[mpeg2video @ 0x7bf8284]ac-tex damaged at 2 9
and on hitting the + key
mpeg2video @ 0x7bf8284]00 motion_type at 7 34
[mpeg2video @ 0x7bf8284]00 motion_type at 4 35
2007-05-22 23:27:12.403 GetNextFreeFrame?() served a busy frame D. Dropping. UUUuLUUuUuUUUUUUUuUuUUUUUUUuUuU
2007-05-22 23:28:38.651 Opening ALSA audio device 'default'.
2007-05-22 23:28:38.660 NVP: Enabling Audio
2007-05-22 23:31:36.598 AFD: Warning, audio codec 0xc235ce0 id(MP2) type (Audio) already open, leaving it alone.
[mpeg2video @ 0x7bf8284]00 motion_type at 2 4
[mpeg2video @ 0x7bf8284]00 motion_type at 1 5
comment:24 Changed 18 years ago by
Milestone: | 0.21 → unknown |
---|
comment:25 Changed 18 years ago by
I noticed that this problem still exists in the 0.21 branch, any idea when the patches will be rolled into there?
comment:26 Changed 18 years ago by
for all those who reported wrong dvd audio track selection, please test the latest patch. it'll hopefully resolve all remaining scenarios of this problem.
comment:27 Changed 18 years ago by
Milestone: | unknown → 0.21 |
---|
Changed 18 years ago by
Attachment: | audio_track_final_fix.diff added |
---|
created a qmap in DVDRingPriv that maps streamids to dvd track numbers. this map is used to ensure that the proper audio tracks are in the AFD audio table and that it is in the right order.
Changed 18 years ago by
Attachment: | audio_track_final_fix_v2.diff added |
---|
audio_track_final patch with some bugfixes. found some problems with it on the jet li heros dvd.
comment:28 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:29 Changed 18 years ago by
comment:30 Changed 17 years ago by
comment:31 Changed 12 years ago by
Hello, 5 1/2 years later I regret to report that this bug was never fixed despite being closed, or it returned some time ago. With 0.24 and 0.25 (possibly earlier too), the internal player still plays the wrong audio track by default in the situation that I describe in the original ticket, and as in comment 3 mythfrontend's log still erroneously says it chose the first track when it did not.
In addition to the original movie, I have a second DVD rip that exhibits the same issue. It also has two tracks, with the first being the original mono soundtrack and the second being a modern stereo commentary.
comment:32 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
comment:33 Changed 12 years ago by
Component: | mythvideo → MythTV - DVD Playback |
---|---|
Milestone: | 0.21 → 0.26.1 |
Owner: | changed from skamithi to stuartm |
Priority: | minor → major |
Status: | new → accepted |
Type: | defect → Bug Report - General |
comment:34 Changed 12 years ago by
This change in priority is welcome but makes me nervous. I now have a large collection of DVDs with a single mp2 stereo track in both menu and programme sections. They play on all the systems I have. I'd like it to stay that way. Thanks!
comment:35 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:38 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
comment:39 Changed 12 years ago by
I'm re-closing this as "Won't Fix" instead of fixed. As Yeechang has pointed out this was a little different from the other 'wrong DVD track' tickets because it involves rips of DVDs without preserving the audio track metadata. It's therefore neither fixed nor fixable within MythTV.
The suggestion of simply going with the first audio track or the first multi-channel audio just won't work, it can't work since many broadcast videos place AD or commentary tracks as the first track. Those tracks are also sometimes multi-channel and in several cases (e.g. Chuck Series 5 DVDs) the commentary track is 5.1 while the main audio is stereo. The audio track auto-selection code exists because we used to just use the first track and that consistently resulted in the wrong audio being played for many.
What I've recently implemented in Master (0.27pre) for videos and 0.25/0.26 for DVDs is filtering of commentary (et al) tracks when performing auto-selection for containers where this information is stored. This has been tested as working with mpegts (broadcast) and DVDs, and in theory other containers such as Matroska should be supported so long as ffmpeg supports reading of those attributes.
I would suggest re-ripping the DVDs in question to another more modern container with a ripping application that will preserve the metadata. Or failing that ISOs should work correctly.
comment:40 Changed 12 years ago by
Resolution: | → Won't Fix |
---|---|
Status: | new → closed |
Oops, actually close the ticket
please attach the "mythfrontend -v playback" output from the time the movie starts to the time you exit the video. Only play the video for 1 minute or until the problem starts.