media icon indicating copy to clipboard operation
media copied to clipboard

Vobsub subtitles not working with mp4 files

Open bennettpeter opened this issue 7 months ago • 2 comments

Version

Media3 1.6.1

More version details

vobsub subtitles work perfectly with mkv files but exoplayer does not recognize the subtitle track in mp4 files. The mp4 files are created with HandBrakeCLI. The vobsub subtitles are recognized and display when playing the video with VLC.

Devices that reproduce the issue

Android Studio emulator Television (1080p) API 34 onn 4K streaming box Amazon fire stick 4K

Devices that do not reproduce the issue

None

Reproducible in the demo app?

Yes

Reproduction steps

Play the media in the demo app. Arrow up a few times Select SELECT TRACKS

Expected result

Video, Audio and Text tracks available. 2 text tracks, English and Spanish

Actual result

Only Video and Audio tracks available. No text tracks

Media

https://drive.google.com/file/d/1CicUvxkKT5IZIHzy_ZsNqFsI_9tLt74K/view?usp=sharing

Bug Report

  • [x] You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

bennettpeter avatar Jun 05 '25 20:06 bennettpeter

Please can you link to or otherwise provide a reference to the spec which defines how VobSub subtitles should be carried in an MP4 container?

That will help us understand how this support should be added to ExoPlayer.

("handbrake produces files that look like X" isn't a spec :))

icbaker avatar Jun 06 '25 15:06 icbaker

I did not mean to create an enhancement request. I thought a bug was causing it to fail on mp4's.

I could not find a standard for vobsub on mp4. Perhaps there is no official standard for it. There is a method that handbrake uses and VLC understands. ffmpeg understans the vobsub subtitles and it is used by both handbrake and VLC.

I will look at the code myself and if I can figure out an easy way to support this I will create a pull request.

bennettpeter avatar Jun 06 '25 19:06 bennettpeter

This is now fixed with pull request #2531

bennettpeter avatar Jul 02 '25 12:07 bennettpeter

Thank You.

Ass-xxx avatar Jul 19 '25 21:07 Ass-xxx