popcornmix / omxplayer

omxplayer
GNU General Public License v2.0
1.01k stars 334 forks source link

Abort on GetUseExternalSubtitles() m_open assertion if the directory contains subtitle files #736

Open blacklight opened 5 years ago

blacklight commented 5 years ago

Environment

omxplayer - Commandline multimedia player for the Raspberry Pi
        Build date: Thu, 01 Aug 2019 12:50:43 +0000
        Version   : f543a0d [master]
        Repository: https://github.com/popcornmix/omxplayer.git

Issue

When I play a video from a folder that contains an .srt subtitles file omxplayer breaks on an assertion on GetUseExternalSubtitles:

$ ls
movie.mp4
movie.srt
$ omxplayer ./movie.mp4
Video codec omx-h264 width 1920 height 1040 profile 100 fps 24.000000
Audio codec aac channels 2 samplerate 48000 bitspersample 16
omxplayer.bin: OMXPlayerSubtitles.h:86: bool OMXPlayerSubtitles::GetUseExternalSubtitles(): Assertion `m_open' failed.
/usr/bin/omxplayer: line 67:  5948 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"

If I move the srt file out of the folder everything works fine. Note that this has started happening only after the latest apt-get upgrade.

mobluse commented 5 years ago

I get this error also when I use --subtitles no matter where the subtitles file is located. It seems there is no way to view subtitles from srt files.

gkreidl commented 5 years ago

OSD is completely disabled at the moment, but omxplayer should simply ignore subtitles and not break. So this is really a nasty bug.

mobluse commented 4 years ago

I still have this problem in most updated Raspbian Buster on Raspberry Pi 4B. The options that are mentioned in https://github.com/vicwomg/pikaraoke/issues/3 doesn't exist in the Raspbian version.

Hartebee5t commented 4 years ago

@mobluse

... The options that are mentioned in vicwomg/pikaraoke#3 doesn't exist in the Raspbian version.

Those aren't options for the omxplayer command-line. They are options for the pikaraoke application itself, which merely calls omxplayer as a service. The options are passed into the (pikaraoke) python scripts to suppress the use of subtitles at the point that omxplayer is invoked.

asnando commented 4 years ago

Getting the same error here:

omxplayer.bin: OMXPlayerSubtitles.h:86: bool OMXPlayerSubtitles::GetUseExternalSubtitles(): Assertion `m_open' failed.
/usr/bin/omxplayer: line 67:  5948 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"

Running with fake-KMS Driver and with --subtitles option or with subtitle in the same location/filename as the video.

Is there any alternative to run video with subtitles with fake-KMS enabled(I really need this for a project)?

Thank you guys!

blacklight commented 4 years ago

Is anyone still maintaining this repo, or shall I fork it and solve the issue myself?

gkreidl commented 4 years ago

Could you rewrite the whole OSD part to use Dispmanx instead of OpenVG? This would make it possible to use OSD (including subtitles) on the RPi 4. Popcornmix already started it, but currently doesn't have the time to complete it.

asnando commented 4 years ago

Migrating to vlc after testing it. It supports subtitles with fake-KMS enabled.

Thanks anyway!