Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TV4 Play audio stream missing #1662

Closed
1 of 7 tasks
tedulrik opened this issue Dec 3, 2022 · 23 comments
Closed
1 of 7 tasks

TV4 Play audio stream missing #1662

tedulrik opened this issue Dec 3, 2022 · 23 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@tedulrik
Copy link

tedulrik commented Dec 3, 2022

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:

  • Android
  • iOS
  • Linux
  • OSX
  • Raspberry-Pi
  • Windows
  • Windows UWP

Used versions:

  • Kodi version: 19.3
  • Retrospect version: 5.5.11
@tedulrik tedulrik added the bug Something isn't working label Dec 3, 2022
@basrieter
Copy link
Collaborator

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

@tedulrik
Copy link
Author

tedulrik commented Dec 3, 2022

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.

@basrieter basrieter self-assigned this Dec 3, 2022
@create-issue-branch
Copy link

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

@basrieter
Copy link
Collaborator

@tedulrik
Copy link
Author

tedulrik commented Dec 4, 2022

@Sopor
Copy link
Contributor

Sopor commented Dec 9, 2022

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
Copy link
Collaborator

But did you use the zip from here?

@Sopor
Copy link
Contributor

Sopor commented Dec 9, 2022

Yes, i have installed bug-1662.zip

@krka
Copy link

krka commented Dec 9, 2022

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
Copy link

krka commented Dec 9, 2022

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
Copy link

krka commented Dec 9, 2022

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
Copy link

kaisto commented Dec 9, 2022

Have the same problem with no sound.

@kaisto
Copy link

kaisto commented Dec 9, 2022

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
Copy link
Collaborator

basrieter commented Dec 9, 2022

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
Copy link

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
Copy link
Collaborator

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
Copy link

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
Copy link
Collaborator

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

@basrieter
Copy link
Collaborator

@Espancor
Copy link

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
Copy link

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
Copy link

kaisto commented Dec 17, 2022

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

@matsarv
Copy link
Contributor

matsarv commented Dec 20, 2022

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.

@basrieter basrieter added this to the v5.5.12 milestone Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants