mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.55k stars 2.92k forks source link

BDMV / M2TS / MPLS #9402

Closed Obegg closed 2 years ago

Obegg commented 3 years ago

Important Information

Reproduction steps

1) Buy (or download) any BDMV that has multiple stream files and playlists (such as any TV Series Bluray). 2) Open MovieObject.bdmv

Expected behavior

MPV plays the first stream (episode). MPV adds the rest of the streams (episodes) to the playlist.

Actual behavior

MPV ONLY plays the first stream (episode). MPV DOESN'T add the rest of the streams (episodes) to the playlist.

Log file

BDMV log.txt

Sample files

Cannot provide sample files due to large file sizes.

More information

1) Even if it's a Movie BDMV (single stream) or a TV Series BDMV (multiple streams), there are always the following errors:

[   0.054][d][ffmpeg/demuxer] mpegts: parser not found for codec hdmv_pgs_subtitle, packets or times may be invalid.
[   0.054][d][ffmpeg/demuxer] mpegts: parser not found for codec hdmv_pgs_subtitle, packets or times may be invalid.
[   0.082][w][ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
[   0.082][w][ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[   0.082][w][ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
[   0.082][w][ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

How do I fix those errors? Even when those errors show up, the video, audio, and subtitles are working.

2) When using DTS-HD Master Audio tracks there are always the following errors:

[   0.365][e][ffmpeg/audio] dca: Residual encoded channels are present without core
[   0.365][e][ad] Error decoding audio.

How do I fix those errors? Even when those errors show up, the video, audio, and subtitles are working.

3) MPV does detect multiple playlists:

[   0.033][i][bdmv/bluray] BDMV detected. Redirecting to bluray://
[   0.039][i][bdmv/bluray] List of available titles:
[   0.039][i][bdmv/bluray] idx:   0 duration: 00:00:21 (playlist: 00001.mpls)
[   0.039][i][bdmv/bluray] idx:   1 duration: 00:00:00 (playlist: 00002.mpls)
[   0.039][i][bdmv/bluray] idx:   2 duration: 00:27:09 (playlist: 00005.mpls)
[   0.040][i][bdmv/bluray] idx:   3 duration: 00:24:59 (playlist: 00006.mpls)
[   0.040][i][bdmv/bluray] idx:   4 duration: 00:24:59 (playlist: 00007.mpls)
[   0.040][i][bdmv/bluray] idx:   5 duration: 00:24:59 (playlist: 00008.mpls)
[   0.041][i][bdmv/bluray] idx:   6 duration: 00:26:17 (playlist: 00009.mpls)
[   0.041][i][bdmv/bluray] idx:   7 duration: 00:24:59 (playlist: 00010.mpls)
[   0.041][i][bdmv/bluray] idx:   8 duration: 00:24:44 (playlist: 00011.mpls)
[   0.041][i][bdmv/bluray] idx:   9 duration: 00:24:44 (playlist: 00012.mpls)
[   0.042][i][bdmv/bluray] idx:  10 duration: 00:24:44 (playlist: 00013.mpls)
[   0.042][i][bdmv/bluray] idx:  11 duration: 00:27:09 (playlist: 00015.mpls)
[   0.042][i][bdmv/bluray] idx:  12 duration: 00:24:59 (playlist: 00016.mpls)
[   0.042][i][bdmv/bluray] idx:  13 duration: 00:24:59 (playlist: 00017.mpls)
[   0.042][i][bdmv/bluray] idx:  14 duration: 00:24:59 (playlist: 00018.mpls)
[   0.042][i][bdmv/bluray] idx:  15 duration: 00:26:17 (playlist: 00019.mpls)
[   0.043][i][bdmv/bluray] idx:  16 duration: 00:24:59 (playlist: 00020.mpls)
[   0.043][i][bdmv/bluray] idx:  17 duration: 00:24:44 (playlist: 00021.mpls)
[   0.043][i][bdmv/bluray] idx:  18 duration: 00:24:44 (playlist: 00022.mpls)
[   0.043][i][bdmv/bluray] idx:  19 duration: 00:24:44 (playlist: 00023.mpls)
[   0.043][i][bdmv/bluray] idx:  20 duration: 00:00:17 (playlist: 00053.mpls)
[   0.043][i][bdmv/bluray] idx:  21 duration: 00:00:00 (playlist: 00054.mpls)
[   0.043][i][bdmv/bluray] idx:  22 duration: 00:00:16 (playlist: 00071.mpls)
[   0.044][i][bdmv/bluray] idx:  23 duration: 00:00:11 (playlist: 00072.mpls)
[   0.044][v][bdmv/bluray] Blu-ray successfully opened.
[   0.044][d][bdmv/bluray] resize stream to 131072 bytes, drop 0 bytes
[   0.044][d][bdmv/bluray] Stream opened successfully.

So why does it only plays a single stream (episode)? Is it possible to switch between playlists?

4) In order to play different streams (episodes) from the BDMV using MPV, I found a temporary solution, which itself introduces another issue: Manually navigating to the STREAM folder and searching the right episode. This "solution" will work, but won't provide the proper MediaInfo such as:

5) MPV doesn't open MPLS files:

8627

1982

625

6) MPV BDMV Playback:

9397

Obegg commented 2 years ago

Closing this issue since I learned a bit about m2ts

MPV DOESN'T add the rest of the streams (episodes) to the playlist

I solved it by adding this script (autoload.lua) with the modification of adding m2ts to the extensions (see pull request: https://github.com/mpv-player/mpv/pull/9404)

Manually navigating to the STREAM folder and searching the right episode. This "solution" will work, but won't provide the proper MediaInfo such as:

Yes, that is correct since m2ts has no index, there's no way to counter this issue and it's not mpv fault. Unless I remux it to mkv, but I rather not.

Regarding those errors:

[ 0.054][d][ffmpeg/demuxer] mpegts: parser not found for codec hdmv_pgs_subtitle, packets or times may be invalid. [ 0.054][d][ffmpeg/demuxer] mpegts: parser not found for codec hdmv_pgs_subtitle, packets or times may be invalid. [ 0.082][w][ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size [ 0.082][w][ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [ 0.082][w][ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size [ 0.082][w][ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

I did change the values to their maximum:

demuxer-lavf-probe-info=yes
demuxer-lavf-probescore=100
demuxer-lavf-probesize=999999999
demuxer-lavf-analyzeduration=3600

It does seem the solve the errors, but for some files, it doesn't solve it

Also this error:

[ 0.365][e][ffmpeg/audio] dca: Residual encoded channels are present without core [ 0.365][e][ad] Error decoding audio.

Can't figure out how to solve it, probably FFmpeg fault...