retrospect-addon / plugin.video.retrospect

Retrospect is a Kodi video add-on which allows you to watch streams of a number of free and publicly available online TV stream sites.
https://www.rieter.net/content/
GNU General Public License v3.0
110 stars 36 forks source link

TV4 Play audio stream missing #1662

Closed tedulrik closed 1 year ago

tedulrik commented 1 year ago

Bug report

Describe the bug

The short video clips from TV4 Play have no audio when I play them in Retrospect.

Expected Behavior

Actual Behavior

Possible Fix

To Reproduce

Steps to reproduce the behavior:

Debuglog

The debug retrospect.log can be found here: https://paste.kodi.tv/ofucujeyib

Screenshots

Additional context or screenshots (if appropriate)

Your Environment

Used Operating system:

Used versions:

basrieter commented 1 year ago

From the logs it seems all ok. What video are you trying to play? Do you have link to the web-version?

tedulrik commented 1 year ago

URL to the video I'm trying to play:

https://www.tv4play.se/program/nyhetsmorgon/bj%C3%B6rn-ulvaeus-om-v%C3%A4nnen-svenne-hedlunds-d%C3%B6d-v%C3%A4ldigt-tungt/13806035

The full show plays with audio:

https://www.tv4play.se/program/nyhetsmorgon/nyhetsmorgon-3-december-s%C3%A4song-2/13764577

Another example that has no audio in Retrospect:

https://www.tv4play.se/program/idol/erik-elias-ta-mig/13802818

But the full show plays fine:

https://www.tv4play.se/program/idol/del-27-s%C3%A4song-2022/13757278

This issue began a few days ago. When I check the audio settings while the video is playing, it says Audio stream: none. Normally, when the audio works, it says "AAC stereo" for TV4 Play.

create-issue-branch[bot] commented 1 year ago

Branch bug-1662 was created for issue: "TV4 Play audio stream missing"

basrieter commented 1 year ago

Please try this one: https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1662.zip

tedulrik commented 1 year ago

Please try this one: https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1662.zip

Works fine, thanks!

Sopor commented 1 year ago

I have the same issue with: https://www.tv4play.se/program/mystery-road/del-2-the-flare-s%C3%A4song-2/12582242 but episode 3 works fine: https://www.tv4play.se/program/mystery-road/del-3-artefacts-s%C3%A4song-2/12582247

I have tried with the above fix, but it won't help.

If i play episode 2 in the web browser i do have audio.

I don't know if this is the same issue or not, but here is Retrospect debug log

Windows 10 Kodi 19.4

basrieter commented 1 year ago

But did you use the zip from here?

Sopor commented 1 year ago

Yes, i have installed bug-1662.zip

krka commented 1 year ago

I can confirm the problem that @Sopor reported before applying the fix. Episode 2 has no sound, and the subtitles have an extra line under them with a long number. Episode 3 works.

I see the exact same behavior after applying the fix from bug-1662.zip.

When I looked at the fix, it seems to only target clips. I suspect the problem might be more general than that.

Perhaps TV4 have started releasing some of their content with slightly different configuration or metadata.

krka commented 1 year ago

I also grabbed a kodi log, gist here: https://gist.github.com/krka/5c00d39e6cd36179c4b113753466cd78

Start broken video at 2022-12-09 19:38:45.505 Start correct video at 2022-12-09 19:39:01.704

Broken:

2022-12-09 19:38:47.640 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]: Input #0, hls, from 'https://vod.streaming.a2d.tv/ce687aeb-b22c-4e11-b429-bc29ff35e23b/66a92080-6055-11ed-a3b0-0108b9248171_20338375.ism/66a92080-6055-11ed-a3b0-0108b9248171_20338375-audio=128000-video=6500000.m3u8':
2022-12-09 19:38:47.641 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:   Duration: 00:56:58.00, start: 0.080000, bitrate: 0 kb/s
2022-12-09 19:38:47.641 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:   Program 0 
2022-12-09 19:38:47.641 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:     Metadata:
2022-12-09 19:38:47.641 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:       variant_bitrate : 0
2022-12-09 19:38:47.642 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:     Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4337 kb/s, 600 fps, 25 tbr, 600 tbn, 50 tbc
2022-12-09 19:38:47.642 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:     Metadata:
2022-12-09 19:38:47.642 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:       variant_bitrate : 0
2022-12-09 19:38:47.642 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:       major_brand     : iso6
2022-12-09 19:38:47.642 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:       minor_version   : 0
2022-12-09 19:38:47.642 T:22326    INFO <general>: ffmpeg[0x25d742f8b0X]:       compatible_brands: iso6cmfcdash
2022-12-09 19:38:47.643 T:22326   DEBUG <general>: CDVDDemuxFFmpeg::AddStream ID: 0
2022-12-09 19:38:47.643 T:22326    INFO <general>: Opening stream: 0 source: 256
2022-12-09 19:38:47.643 T:22326    INFO <general>: Creating video codec with codec id: 27
2022-12-09 19:38:47.643 T:22326   DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open hints: Width 1920 x Height 1080, Fpsrate 25 / Fpsscale 1, CodecID 27, Level 40, Profile 100, PTS_invalid 0, Tag 828601953, Extradata-Size: 47

Correct:

2022-12-09 19:39:03.989 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]: Input #0, hls, from 'https://lbs-usp-hls-vod.cmore.se/vod/720de/45qpp1hyslt(12582247_ISMUSP).ism/45qpp1hyslt(12582247_ISMUSP)-audio=128000-video=3112965.m3u8':
2022-12-09 19:39:03.989 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:   Duration: 00:52:09.00, start: 10.000000, bitrate: 0 kb/s
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:   Program 0 
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:     Metadata:
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:       variant_bitrate : 0
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:     Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:     Metadata:
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:       variant_bitrate : 0
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:     Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 50 tbc
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:     Metadata:
2022-12-09 19:39:03.990 T:22435    INFO <general>: ffmpeg[0x25d73831a0X]:       variant_bitrate : 0
krka commented 1 year ago

I don't fully understand how this works, but I tried downloading the two different files:

  1. https://lbs-usp-hls-vod.cmore.se/vod/720de/45qpp1hyslt(12582247_ISMUSP).ism/45qpp1hyslt(12582247_ISMUSP)-audio=128000-video=3112965.m3u8
  2. https://vod.streaming.a2d.tv/ce687aeb-b22c-4e11-b429-bc29ff35e23b/66a92080-6055-11ed-a3b0-0108b9248171_20338375.ism/66a92080-6055-11ed-a3b0-0108b9248171_20338375-audio=128000-video=6500000.m3u8

and they look similar but with some differences:

#EXTM3U
#EXT-X-VERSION:6
## Created with Unified Streaming Platform (version=1.11.20-26889)
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:7
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z
#EXT-X-MAP:URI="hls/66a92080-6055-11ed-a3b0-0108b9248171_20338375-audio=128000-video=6500000.m4s"
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z

vs

#EXTM3U
#EXT-X-VERSION:4
## Created with Unified Streaming Platform(version=1.9.5)
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:4
#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z

I think this means that some of the content is now released in a form that is not fully compatible with retrospect somehow.

kaisto commented 1 year ago

Have the same problem with no sound.

kaisto commented 1 year ago

Agree with former comment. Seems to be problem with newer content. From 2021 and forward. Also the subtiles has a funny string of numbers when the sound is not working

basrieter commented 1 year ago

I can confirm the problem that @Sopor reported before applying the fix. Episode 2 has no sound, and the subtitles have an extra line under them with a long number. Episode 3 works.

I see the exact same behavior after applying the fix from bug-1662.zip.

When I looked at the fix, it seems to only target clips. I suspect the problem might be more general than that.

Perhaps TV4 have started releasing some of their content with slightly different configuration or metadata.

Ok, if the problem is more general, then we are required to use the InputStream adaptive for all streams as this solves the issue. HOWEVER, the older streams will then not stop playing (See #1657) at the end of the stream if we use InputStream adaptive. So this leaves no real 100% options.

Espancor commented 1 year ago

Hi! I still have problem with the audio, it´s just me? I used the zip-file but it still not working for me. What am I doing wrong? I had been trying to work with the inputStream and see what happens. Thanks!!

basrieter commented 1 year ago

It is still there. I need to start using the InputStream Adaptive add-on for playback to fix the audio, but that will basically stop streams from automatically stopping at the end. I guess that is the only way?

Espancor commented 1 year ago

It is still there. I need to start using the InputStream Adaptive add-on for playback to fix the audio, but that will basically stop streams from automatically stopping at the end. I guess that is the only way?

Ok, I don´t really know how to use the InputStream Adaptive add-on. I have been testing things in the settings of the InputStream but nothing happens. Sorry

basrieter commented 1 year ago

I know that. I need to enable it in Retrospect for TV4.

basrieter commented 1 year ago

Please try https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1662.zip again.

Espancor commented 1 year ago

Please try https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1662.zip again.

I did use the file and now the audio is back but video is not working.

Espancor commented 1 year ago

Yes! Now is working fine! I forgot to fix back the settings on the inputStream addon and when I did it then everything was working just fine

kaisto commented 1 year ago

Tried out the latest release and got it working. Thanks a lot for once again saving the day

matsarv commented 1 year ago

I've been running TV4Play with the latest changes and everything seems to work ok except for a few numbers that sometimes appear on the last line of the subtitles. The length of the numbers varies between 7-10 digits.

The subtitle shows a row of digits sometimes

#### Subtitle srt file. ``` 1699702138 1 00:00:10,840 --> 00:00:12,480 Nej, nej...! 445910491 2 00:00:16,720 --> 00:00:19,040 -Vad händer? -Ett sabotageprogram. 3 00:00:19,200 --> 00:00:21,760 -Använd verktyget. -Nu hängde den sig. 2982169880 4 00:00:21,920 --> 00:00:28,240 -Försök belastningsutjämna. -Vi får inte förlora vårt arbete! 1396817266 5 00:00:28,400 --> 00:00:30,080 -Vad händer? -Vi blir hackade. ``` aso.

Tested with this fix

File: resources/lib/helpers/subtitlehelper.py def __convert_web_vtt_to_srt(webvvt): After (279-280): elif Regexer.do_regex("^[0-9a-f]{8}-?([0-9a-f]{4}-?){3}[0-9a-f]{12}", line): continue Insert (281-288): elif Regexer.do_regex("^[0-9]{10}", line): continue elif Regexer.do_regex("^[0-9]{9}", line): continue elif Regexer.do_regex("^[0-9]{8}", line): continue elif Regexer.do_regex("^[0-9]{7}", line): continue

After the above test fix, I haven't seen any numbers in the subtitles any more.