Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[videoplayer] [bluray] Fix playback of disc with truehd tracks in menu mode. #14382

Merged
merged 2 commits into from Sep 7, 2018

Conversation

Projects
None yet
3 participants
@ace20022
Copy link
Member

commented Sep 2, 2018

The problem is that ffmpeg finds a truehd core ac3 stream on some Blu-rays with the same pid as the truehd stream, but libbluray does not. Therefore our videoplayer (rapidly) opens each of the two streams in turns. This leads to a stall.

The following output is from ffmpeg, stream 0:2 and 0:3 have the same pid:

Debug Print: ffmpeg[4370]:     Stream #0:0[0x1011]: Video: vc1 (Advanced) (VC-1 / 0x312D4356), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Debug Print: ffmpeg[4370]:     Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Debug Print: ffmpeg[4370]:     Stream #0:2[0x1101]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), s32 (24 bit)
Debug Print: ffmpeg[4370]:     Stream #0:3[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Debug Print: ffmpeg[4370]:     Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
Debug Print: ffmpeg[4370]:     Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Debug Print: ffmpeg[4370]:     Stream #0:6[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Debug Print: ffmpeg[4370]:     Stream #0:7[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Debug Print: ffmpeg[4370]:     Stream #0:8[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s

But, according to libbluray, the current clip has the following audio streams:

Debug Print: audio stream idx: 0 pid: 1100, type: 129, lang: eng
Debug Print: audio stream idx: 1 pid: 1101, type: 131, lang: eng
Debug Print: audio stream idx: 2 pid: 1102, type: 129, lang: eng
Debug Print: audio stream idx: 3 pid: 1103, type: 129, lang: fra
Debug Print: audio stream idx: 4 pid: 1105, type: 129, lang: deu
Debug Print: audio stream idx: 5 pid: 1104, type: 129, lang: ita
Debug Print: audio stream idx: 6 pid: 1106, type: 129, lang: spa

I'm not sure about the second commit, but without it the function gets called quite often at the start of the playback.

@ace20022

This comment has been minimized.

Copy link
Member Author

commented Sep 6, 2018

@FernetMenta maybe it's less intrusive to mark such demuxstreams disabled instead of discarding the avstream. And then to filter/not add disabled streams to the selectionstreams in vp?

@FernetMenta

This comment has been minimized.

Copy link
Member

commented Sep 7, 2018

Better use discard for now. I intend to rework (maybe drop) the disable logic

@ace20022 ace20022 merged commit ef47f46 into xbmc:master Sep 7, 2018

1 check passed

default You're awesome. Have a cookie
Details

@ace20022 ace20022 deleted the ace20022:bd_fix_truehd branch Sep 7, 2018

@Rechi Rechi added this to the Leia 18.0-beta2 milestone Sep 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.