Bug #3291

Movian crashes on DVB subtitles

Added by Ivo Slavov over 3 years ago. Updated over 2 years ago.

Status:AcceptedStart date:04/27/2017
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

0%

Category:Subtitles
Target version:5.2
Found in version:4.8 Platform:PS3

Description

Hello, I've been using PS3 for games I wanted to watch some channels that I paid, installed the latest version of Movian, made an M3U playlist, but running one of the PS3 channels freezes and I need to turn it off. I went to a lower version of the program, the channels are running but does not show the subtitles that are in the video file. Please help. I am from Bulgaria. I tried to import fountains but did not help. I'm sending you an M3U playlist that I'm trying to load. Thank you in advance.

PS3.m3u (758 Bytes) Ivo Slavov, 04/27/2017 03:21 PM

IMG_20170427_182204.jpg (3.56 MB) Ivo Slavov, 04/28/2017 01:41 PM

IMG_20170427_182217.jpg (3.45 MB) Ivo Slavov, 04/28/2017 01:41 PM

IMG_20170427_182229.jpg (3.41 MB) Ivo Slavov, 04/28/2017 01:41 PM

wdr.ts (40.7 MB) Leonid Protasov, 02/02/2018 04:09 PM

wdr.JPG - Screenshot (177 KB) Dean Kasabow, 02/03/2018 10:57 AM


Related issues

Related to Bug #3234: Subtitle S_DVBSUB problem New 11/02/2016

History

#1 Updated by Ivo Slavov over 3 years ago

#3 Updated by Dean Kasabow over 3 years ago

The problem with DVB subtitles is from years. Movian (and showtime) always crashed when trying to play HTTP stream with embedded dvb subtitles. It crashes on RPi2, RPi3, PS3 and Android. Here is a log from just few mins ago (RPi3):

[code]
00:00:24.192: Video [DEBUG]:Starting playback of http://*.*.*.*/DaVinciLearning (mpegts)
00:00:24.193: Probe [DEBUG]: Stream #0: Video: mpeg2video [[2][0][0][0] / 0x0002]
00:00:24.193: none, tv
00:00:24.193: Probe [DEBUG]: Stream #1: Subtitle: dvb_subtitle
00:00:24.193: Probe [DEBUG]: Stream #2: Subtitle: dvb_subtitle
00:00:24.194: Probe [DEBUG]: Stream #3: Subtitle: dvb_subtitle
00:00:24.194: Probe [DEBUG]: Stream #4: Audio: mp2 [[4][0][0][0] / 0x0004]
00:00:24.194: 48000 Hz, 2 channels, s16p, 128 kb/s
00:00:24.195: media [DEBUG]:Selecting track libav:4, score -1
00:00:24.195: Media [DEBUG]:Switching to audio track libav:4
00:00:24.195: Video [DEBUG]: Stream #0: Video: mpeg2video [[2][0][0][0] / 0x0002]
00:00:24.195: none, tv
00:00:24.198: OMX [DEBUG]:Frame rate set to 25.000
00:00:24.205: Video [DEBUG]: Stream #0: Codec created
00:00:24.205: Video [DEBUG]: Stream #1: Subtitle: dvb_subtitle
00:00:24.206: Video [DEBUG]: Stream #1: Codec created
00:00:24.206: Video [DEBUG]: Stream #2: Subtitle: dvb_subtitle
00:00:24.207: Video [DEBUG]: Stream #2: Codec created
00:00:24.207: Video [DEBUG]: Stream #3: Subtitle: dvb_subtitle
00:00:24.209: Video [DEBUG]: Stream #3: Codec created
00:00:24.209: Video [DEBUG]: Stream #4: Audio: mp2 [[4][0][0][0] / 0x0004]
00:00:24.209: 48000 Hz, 2 channels, s16p, 128 kb/s
00:00:24.210: Video [DEBUG]: Stream #4: Codec created
00:00:24.213: CEC [INFO ]:>> source activated: Recorder 1 (1)
00:00:24.213: audio [DEBUG]:Codec changed to mp2 (0x15000)
00:00:24.213: CEC [INFO ]:Logical address 1 is active
00:00:24.220: RPI [DEBUG]:Opening audio output hdmi
00:00:24.238: Audio [DEBUG]:Converting from [stereo 48000Hz s16p] to [stereo 48000Hz s16]
00:00:24.242: GLW [DEBUG]:Screensaver inhibited
00:00:24.250: VideoCore [DEBUG]:Interlaced picture top-field-first
00:00:24.250: VideoCore [DEBUG]:Video decoder output port settings changed to MPEG2 720x576i (VideoCore) (SAR: 64:45)
00:00:24.396: CEC [INFO ]:<< Recorder 1 (1) -> broadcast (F): active source (1000)
00:00:39.161: Media [INFO ]:Switching to subtitle track libav:3
00:00:45.612: Media [INFO ]:Switching to subtitle track libav:1
00:00:47.710: CRASH [EMERG]:Signal: 11 in thread video decoder - PRG: Movian (5.0.488) EXE: /tmp/stos/mnt/showtime/bin/showtime, CWD: /
00:00:47.711: CRASH [EMERG]:Fault address (nil) (Address not mapped)
00:00:47.711: CRASH [EMERG]:Loaded libraries: linux-vdso.so.1 /usr/lib/libz.so.1 /usr/lib/libfreetype.so.6 /usr/lib/libgthread-2.0.so.0 /usr/lib/libglib-2.0.so.0 /usr/lib/libgio-2.0.so.0 /usr/lib/libgobject-2.0.so.0 /usr/lib/libavahi-common.so.3 /usr/lib/libavahi-client.so.3 /usr/lib/libbz2.so.1.0 /usr/lib/libvchostif.so /usr/lib/libopenmaxil.so /usr/lib/libGLESv2.so /usr/lib/libEGL.so /usr/lib/libvcos.so /usr/lib/libbcm_host.so /usr/lib/libvchiq_arm.so /lib/libpthread.so.0 /lib/librt.so.1 /lib/libdl.so.2 /usr/lib/libcec.so.3.0 /lib/libm.so.6 /lib/libgcc_s.so.1 /lib/libc.so.6 /usr/lib/libpcre.so.1 /usr/lib/libffi.so.6 /usr/lib/libgmodule-2.0.so.0 /lib/libresolv.so.2 /usr/lib/libdbus-1.so.3 /usr/lib/libvcfiled_check.so /usr/lib/libvcilcs.so /usr/lib/libkhrn_client.so /lib/ld-linux-armhf.so.3 /usr/lib/libplatform.so.1.0 /lib/libudev.so.1 /usr/lib/libstdc++.so.6
00:00:47.711: CRASH [EMERG]: trap_no = 0x0000000e
00:00:47.711: CRASH [EMERG]:error_code = 0x00000817
00:00:47.711: CRASH [EMERG]: oldmask = 0x00000000
00:00:47.711: CRASH [EMERG]: R0 = 0x00000000
00:00:47.711: CRASH [EMERG]: R1 = 0x75d22d60
00:00:47.712: CRASH [EMERG]: R2 = 0x000001e8
00:00:47.712: CRASH [EMERG]: R3 = 0x00000000
00:00:47.712: CRASH [EMERG]: R4 = 0x75d1f560
00:00:47.712: CRASH [EMERG]: R5 = 0x00000000
00:00:47.712: CRASH [EMERG]: R6 = 0x6dd36600
00:00:47.712: CRASH [EMERG]: R7 = 0x6bcfed08
00:00:47.712: CRASH [EMERG]: R8 = 0x00000000
00:00:47.712: CRASH [EMERG]: R9 = 0x6dd27276
00:00:47.712: CRASH [EMERG]: R10 = 0x75d1f400
00:00:47.712: CRASH [EMERG]: FP = 0x00ab10e4
00:00:47.713: CRASH [EMERG]: IP = 0x00000000
00:00:47.713: CRASH [EMERG]: SP = 0x6bcfec78
00:00:47.713: CRASH [EMERG]: LR = 0x007aa79c
00:00:47.713: CRASH [EMERG]: PC = 0x003b75bc
00:00:47.713: CRASH [EMERG]: CPSR = 0x60000010
00:00:47.713: CRASH [EMERG]:fault_addr = 0x00000000
00:00:47.713: CRASH [EMERG]:STACKTRACE (3 frames)
00:00:47.747: CRASH [EMERG]:traphandler.part.0+0x24
00:00:47.747: CRASH [EMERG]:traphandler+0x40
00:00:47.747: CRASH [EMERG]:fstat64+0x76114564
[/code]

#4 Updated by Dean Kasabow about 3 years ago

I did some more tests and it turns out that the problem is with LIBAVDECODE library. After the latest libav update in movian it broke DVBSUB decoding. I managed to get it to work with few tweaks in libav's dvbsubdec.c and movian's video_overlay.c.

Now DVB subtitles show properly for all video resolutions (properly centered/showing/clearing).

https://lists.libav.org/pipermail/libav-bugs/2017-March/005365.html

I used the approach in ffmpeg's code from here:

https://www.ffmpeg.org/doxygen/3.1/dvbsubdec_8c_source.html#l00242

866         for(i=0; i&lt;sub-&gt;num_rects; i++)
867 sub->rects[i] = av_mallocz(sizeof(*sub->rects[i]));

And in video_overlay.c I had to force "flush screen" before each dvb draw + setting the canvas_width/height to 720x576.

#5 Updated by Dean Kasabow about 3 years ago

Until there is an official fix here are the compiled 5.0.490 versions for RPi (ubuntu and STOS):

http://deanbg.com/public/rpi/movian/versions/20170902-490-DVBSUB/

#6 Updated by Rural Hunter about 3 years ago

where is the source for the change?

#7 Updated by Dean Kasabow about 3 years ago

in ext/libav/libavcodec/dvbsubdec.c: dvbsub_parse_display_definition_segment() and dvbsub_display_end_segment()
in src/subtitles/video_overlay.c: video_subtitles_lavc()

http://deanbg.com/public/rpi/movian/versions/20170902-490-DVBSUB/dvbsubdec.c

http://deanbg.com/public/rpi/movian/versions/20170902-490-DVBSUB/video_overlay.c

#8 Updated by Dean Kasabow about 3 years ago

Here is the updated Movian 5.0.490 with the DVB-SUBTITLES fix for Playstation3. It is also available from multiMAN's web column:

http://deanbg.com/public/rpi/movian_ps3/Movian_05.00.490_CEX_(FIXED_DVBSUB).pkg

#9 Updated by Rural Hunter about 3 years ago

Thanks Dean!

#10 Updated by Dean Kasabow about 3 years ago

Rural Hunter wrote:

Thanks Dean!

And if someone needs the NACL version (for Google Chrome - very useful for testing plugins) - with fixed DVB Subtitles:

http://deanbg.com/public/rpi/movian_nacl/Movian_5.0.490.zip

Unzip the file and follow the instructions after section 10) here:
https://movian.tv/boards/25/topics/10865

#11 Updated by Leonid Protasov almost 3 years ago

  • Status changed from New to Need feedback

Is the bug still reproducible?

#12 Updated by Bloody Face almost 3 years ago

Leonid Protasov wrote:

Is the bug still reproducible?

The bug of m3u playlist is still there with latest update (i dont talk about dvdsub) but about out of ram and unable to open cell.
Movian has difficulty to open cell abd buffering properly with m3u playlist we paid but the cell is opened if we isolate the tv channel from the m3u playlist to the bookmark on movian. The cell is open but still issue of out of ram

#13 Updated by Dean Kasabow almost 3 years ago

Can you do another test?

Install iptvEPG plugin and add your playlist in Settings and test. The playlist must be accessible via http.

#14 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

Can you do another test?

Install iptvEPG plugin and add your playlist in Settings and test. The playlist must be accessible via http.

Hi Dean

This is exactly what I started to do this morning and i was writing my feedback about your plugin that fixed the issue of open cell.

But the issue remaining is buffer usage

Indeed if i compare tv channels with AAC audio vs MP2 audio there is out of ram quickly
And also if I compare FHD tv vs HD tv channels vs SD channels, ram is out quickly with increase of of widh resolution

But in the case of SD channels even HD channels whatever the audio codec there is enough ram to play without freezing stutering although with AAc the remaining buffet is to low 5-10seconde

I think the issue is only buffer usage because with width resolution and AAC audio the remaining buffer is very low between 0 and 1seconde causing freezting and stuttering.

Any idea to increase this buffer (it is settup to max 64mb)?

#15 Updated by Dean Kasabow almost 3 years ago

You can put the video to PAUSE and let the buffer fill a bit and it won't stutter. But check my other post with video - I don't seem to have your issues.

#16 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

Can you do another test?

Install iptvEPG plugin and add your playlist in Settings and test. The playlist must be accessible via http.

To conclude:
-Internal player of movian doesnt open the cell exceptef if tv channel is bookmarked and launch from bookmark

-Tvonline plugin opens it but crashes movian quickly just after a message saying system in low memory available

-Iptvepg opens cell and playback m3u tv playlist

I will from now use Dean's plugin and watch SD ot HD channels because FHD get the ram out quickly

If there is a fix for better buffer usage I will be thankful

NB: sorry for all my messages and lengthy feedbacks; i tried to find where is the bug and it seems that plugin of Dean has the fix to open cell and no movian nor tvonline

Thank you Dean

#17 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

You can put the video to PAUSE and let the buffer fill a bit and it won't stutter. But check my other post with video - I don't seem to have your issues.

Which post please to have a look

Yes i do pause the videoas soon as I launch the tv channel until the buffer usage is full but I have to repeat when is empty . If the buffer usage can be at least a third of the bar it can solve my problem and watch tv properly

Thank u again for ur help

#18 Updated by Dean Kasabow almost 3 years ago

https://movian.tv/issues/3307#note-48

The buffer itself is not a problem. It fills with data from the http stream, but Movian doesn't pre-buffer enough at the start of the playback.

Although I cannot reproduce your issue it seems that the problem is with "fa_probe()" function which tries to determine the type/codec of the stream. In iptvEPG plugin Movian is always set to mpegts and doesn't "probe" the stream. My guess is that the memory leak happens somewhere in libav, but until I can reproduce the issue I can't suggest how to fix it.

#19 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

You can put the video to PAUSE and let the buffer fill a bit and it won't stutter. But check my other post with video - I don't seem to have your issues.

Just to let you know that by pausing a 1440x1080i tv channel (aac 4800Hz stereo h264 level 247.247 the plenty bar of buffer usage is empty in mess than one minute

I notice with other audio codec buffer is a little betterlike mp2 or ac3 but aac and mp3 is around 0 and 1seconde

#20 Updated by Dean Kasabow almost 3 years ago

I think I found the problem or at least how to replicate it.

I monitored the free memory and it decreases DRAMATICALLY with very large playlists.

The biggest playlist that doesn't cause issues is with 800 channels. If you have more than 800-850 channels movian grabs over 40MB of RAM and there is not enough memory (50MB) to open the cell decoder.

So the problem is with the functions that parse the .m3u file. I'll try to look and see if it can be fixed, but until then you'll have to select less than 800 channels and create a separate m3u playlist.

#21 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

I think I found the problem or at least how to replicate it.

I monitored the free memory and it decreases DRAMATICALLY with very large playlists.

The biggest playlist that doesn't cause issues is with 800 channels. If you have more than 800-850 channels movian grabs over 40MB of RAM and there is not enough memory (50MB) to open the cell decoder.

So the problem is with the functions that parse the .m3u file. I'll try to look and see if it can be fixed, but until then you'll have to select less than 800 channels and create a separate m3u playlist.

I wonder if what you said in your last message is related to the system free memory because I compared my playback with yours on your video ?

And I notice that system free memory is only 3800Kb on my ps3 when video is played whereas in your video system free memory os 26000 kb (by viewing info during playback)

#22 Updated by Bloody Face almost 3 years ago

Bloody Face wrote:

Dean Kasabow wrote:

I think I found the problem or at least how to replicate it.

I monitored the free memory and it decreases DRAMATICALLY with very large playlists.

The biggest playlist that doesn't cause issues is with 800 channels. If you have more than 800-850 channels movian grabs over 40MB of RAM and there is not enough memory (50MB) to open the cell decoder.

So the problem is with the functions that parse the .m3u file. I'll try to look and see if it can be fixed, but until then you'll have to select less than 800 channels and create a separate m3u playlist.

I wonder if what you said in your last message is related to the system free memory because I compared my playback with yours on your video ?

And I notice that system free memory is only 3800Kb on my ps3 when video is played whereas in your video system free memory os 26000 kb (by viewing info during playback)

#23 Updated by Bloody Face almost 3 years ago

I think i will reply to my last question and reply yes because indeed after bookmarked a tv channel hence only 1 instead of more 800 channels the system free memory is 45000kb instead of

i have to decrease the list but it is updated online daily so I have to make this personnal shortened list every day.

It will be nice if iptvepg can handle more than 800

I can bookmarked my channels with movian but not with iptvepg
Can you add this feature on your plugin Dear Dean it will shorten the list until i do it from m3u list

Thanks

#24 Updated by Dean Kasabow almost 3 years ago

iptvEPG is able to handle more than 800 channels and you shouldn't have problems with it.

#25 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

iptvEPG is able to handle more than 800 channels and you shouldn't have problems with it.

More than 800 but even 3300 lol? Because the iptv provider update daily nearly 3300 tv channels.

Like i said i compared the same channels than you did on your video and I noticed thus difference on system free memory decreased to 3700kb causing slow memory system with iptvepg

The only difference is maybe i have a fat ps3 and maybe the version of cfw habib 4.81 (i have the cobra 7.50 v1.02) but i dont think thoses details are related to this issue

I am now doing a shorten list and see if memry system is better within your plugin and I will let you know but I think your plugin has probably a limit and more than 3000 is too huge

#26 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

iptvEPG is able to handle more than 800 channels and you shouldn't have problems with it.

Dean Kasabow wrote:

iptvEPG is able to handle more than 800 channels and you shouldn't have problems with it.

My issue is fixed now i dont know how but after lunch i restart my ps3 ans iptvepg handle the all playlist (no need to shorten it and all system info is now correct and buffer is ok for full hd

Indeed without iptvepg movian plays properly a shortened itpv list ( mine was max 470) but it is not good for daily updated playlist

I can say that my issue is fixed but full hd has difficulty to have remaining buffer or buffer usage's bar to show any filling which freeze the playback and the same channel in hd give error of undhandled http response 403 i have to watch the sd version of this channels

I know the wifi is good enough but do you think that ethernet cable can fix this issue of buffering

NB: all the rest is back to normal excepted buffer for high resolution tv channels

#27 Updated by Dean Kasabow almost 3 years ago

Yes, you will have much less issues using Ethernet cable. PS3's wifi is just 54MBit, which is actually really unstable and slow for realtime video (IPTV).

#28 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

Yes, you will have much less issues using Ethernet cable. PS3's wifi is just 54MBit, which is actually really unstable and slow for realtime video (IPTV).

Thanks for your time to help me and for your plugin that fixed everything
The issue is that without your plugin movian cant handle lengthy playlist neither tvonline plugin
And when i used them the issue is unable to be solved even by using your plugin as if the issue if kept in memory lol

We have to delete all playlist and keep only your plugin and start movian (or ps3 itself maybe)

What about diff a/v showing meany milliseconde holding freezing the playback for a while.

Let's try with ethernet for this buffering issue (indeed the slow wifi and the fact i am far from the router , 1st floor lol)

But with a old tablet with also 54mb/s wifi, the video plays smoothly even on 1st floor with perfect player app or with my pc and kodi (all have wifi 54mbit).

Anyway thanks

#29 Updated by Bloody Face almost 3 years ago

Dean Kasabow wrote:

Yes, you will have much less issues using Ethernet cable. PS3's wifi is just 54MBit, which is actually really unstable and slow for realtime video (IPTV).

I tested my full iptv playlist with your plugin but on ps3 slim and seems there is no issue of buffering.

Remaining buffer is stable around 20s with full hd tv channel no freezing no stuttering.

Is there a reason why on fat ps3 the buffering is not as good as ps3 slim?
If someone has a fat ps3 and using iptvepg ; do you have this issue of buffering out of ram?

#30 Updated by Rob Koni almost 3 years ago

Dean Kasabow wrote:

Rural Hunter wrote:

Thanks Dean!

And if someone needs the NACL version (for Google Chrome - very useful for testing plugins) - with fixed DVB Subtitles:

http://deanbg.com/public/rpi/movian_nacl/Movian_5.0.490.zip

Unzip the file and follow the instructions after section 10) here:
https://movian.tv/boards/25/topics/10865

Thanks a lot. If you change the url to 5.0.494 (or later if uploaded). The latest version is downloaded.

#31 Updated by Rob Koni almost 3 years ago

@Dean the issue with hundreds or thousands of items is also present in:

#3053

and

#3209

#32 Updated by Bloody Face almost 3 years ago

Rob Koni wrote:

@Dean the issue with hundreds or thousands of items is also present in:

#3053

and

#3209

With iptvepg it is fixed bur sometime tvchannels show unhandled http response 403 (need to restart movian and plugin )

#33 Updated by Leonid Protasov almost 3 years ago

  • Subject changed from лю3U playlist problem to Movian crashes on DVB subtitles
  • Status changed from Need feedback to Accepted
  • Priority changed from Normal to High
  • Target version set to 5.2

#34 Updated by Leonid Protasov over 2 years ago

  • Related to Bug #3234: Subtitle S_DVBSUB problem added

#35 Updated by Leonid Protasov over 2 years ago

Attaching sample on which even fixed version hangs :(

#36 Updated by Dean Kasabow over 2 years ago

I tested the sample and it doesn't crash. DVB_TELETEXT subtitles are not supported anyway (which may lead to the crash at your end), but the DVB_SUBTITLES show properly (green text on top of black background).

#37 Updated by Dean Kasabow over 2 years ago

Dean Kasabow wrote:

I tested the sample and it doesn't crash. DVB_TELETEXT subtitles are not supported anyway (which may lead to the crash at your end), but the DVB_SUBTITLES show properly (green text on top of black background).

!!

#38 Updated by Leonid Protasov over 2 years ago

  • Priority changed from High to Normal

#39 Updated by Leonid Protasov over 2 years ago

Dean Kasabow wrote:

I tested the sample and it doesn't crash. DVB_TELETEXT subtitles are not supported anyway (which may lead to the crash at your end), but the DVB_SUBTITLES show properly (green text on top of black background).

Indeed, my fault it's working now, thanks!

Also available in: Atom PDF