mpv icon indicating copy to clipboard operation
mpv copied to clipboard

M3U playlist misdetected as AMR-NB

Open sfan5 opened this issue 3 months ago • 10 comments

mpv Information

mpv v0.40.0-472-g23f9381b8 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Nov 29 2025 13:17:29
libplacebo version: v7.357.0 (v7.351.0-89-g06992a53)
FFmpeg version: n8.0
FFmpeg library versions:
   libavcodec      62.11.100
   libavdevice     62.1.100
   libavfilter     11.4.100
   libavformat     62.3.100
   libavutil       60.8.100
   libswresample   6.1.100
   libswscale      9.1.100

Important Information

- Platform version: Arch Linux x86_64
- GPU model, driver and version: -
- Source of mpv: self-compiled
- Latest known working version: -
- Issue started after the following happened: -

Reproduction Steps

  1. (echo '#EXTM3U'; for i in $(seq 1 102); do echo './aaaaaaa.00000..aaa'; done) >4.m3u
  2. mpv --no-config 4.m3u

Expected Behavior

  1. mpv reads the playlist contents

Actual Behavior

  1. audio playback

Log File

mpv_log.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • [x] I tested with the latest mpv version to validate that the issue is not already fixed.
  • [x] I provided all required information including system and mpv version.
  • [x] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • [x] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • [x] I attached the full, untruncated log file.
  • [x] I attached the backtrace in the case of a crash.

sfan5 avatar Nov 29 '25 12:11 sfan5

While it would be correct to blame the AMR demuxer in ffmpeg, I'm thinking shouldn't our playlist demuxer run before lavf?

Edit: ~~apparently #14555 changed this, but it's not obvious to me why. @kasper93?~~

sfan5 avatar Nov 29 '25 12:11 sfan5

Edit: apparently #14555 changed this, but it's not obvious to me why. @kasper93?

Changed what?

kasper93 avatar Nov 29 '25 12:11 kasper93

demuxer_desc_playlist being above demuxer_desc_lavf (c54ad6933b289a3ff70f11ba88fe980b7b92cfe8)

sfan5 avatar Nov 29 '25 12:11 sfan5

PR diff doesn't show this change. Move it if you feel it's better to ignore lavf detection.

kasper93 avatar Nov 29 '25 13:11 kasper93

demuxer_desc_playlist being above demuxer_desc_lavf (c54ad69)

This is actually reverting a change made by the previous commit. History for that PR is not clean, but the priority list hasn't changed as a result of that PR

llyyr avatar Nov 29 '25 14:11 llyyr

demuxer_desc_playlist being above demuxer_desc_lavf (c54ad69)

This is actually reverting a change made by the previous commit. History for that PR is not clean, but the priority list hasn't changed as a result of that PR

What is not clean? The fact you don't understand the history of those changes, doesn't make it "not clean".

kasper93 avatar Nov 29 '25 14:11 kasper93

demuxer_desc_playlist being above demuxer_desc_lavf (c54ad69)

This was wm4 in 8be9c49fcd8b23463199036eda5fc290ded6d078, so it has to be correct, right?

kasper93 avatar Nov 29 '25 14:11 kasper93

Move it if you feel it's better to ignore lavf detection.

As far as it looks the probing code for the different formats is robust and can be safely applied before lavf probing.

sfan5 avatar Nov 29 '25 16:11 sfan5

Move it if you feel it's better to ignore lavf detection.

As far as it looks the probing code for the different formats is robust and can be safely applied before lavf probing.

HLS works correctly? Because IIRC I needed to split directory and playlist demuxer, because using playlist demuxer first would load HLS as normal playlist instead of demuxing it in lavf.

kasper93 avatar Nov 29 '25 21:11 kasper93

~~I didn't try, but should work apparently? https://github.com/mpv-player/mpv/blob/c54ad6933b289a3ff70f11ba88fe980b7b92cfe8/demux/demux_playlist.c#L289-L290~~ You're right, that wouldn't work.

Either way I'll report this to ffmpeg first.

sfan5 avatar Nov 30 '25 11:11 sfan5