-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
No audio on Tizen 3 with very large timestamps #1610
Comments
Confirmed. I get no audio on Tizen 2017. |
The container is audio/mp4, codec mp4a.40.2. According to the support test page, this combination is supported by the device. There's no obvious reason for this not to work. Without a clear way to debug at the JS level on the device, this will be tricky to track down. |
I do get audio playback on other content. |
Debug logs show that audio has been selected and is being fed to the device. There's nothing obvious that the player is doing wrong in this case. I'm not sure how this audio differs from the audio in our content, but ours plays and yours does not. I suspect something about it is incompatible with the Tizen decoders, but that's only a guess. I don't have any data yet. |
When combining logtoscreen and noinput parameters, put the logs over the video, to make sure they can be read on-screen. This makes debugging easier on smart TVs. Issue #1610 Change-Id: I34fc8da6119b4fc3fe49bd0c6a5723d0d80bab36
@joeyparrish , have you found something that may help find the problem? |
Not yet. Something is going wrong inside the black box that is the Tizen media stack. The only approach we have so far is to figure out how your content is encoded or packaged differently from ours, so that we could come up with a workaround you could apply on the encoding side. So far, we don't know how your content is different. If you have any ideas, please let us know. |
@joeyparrish , can you share the commands (ffmepg and shaka-packager) used to generate https://storage.googleapis.com/shaka-live-assets/player-source.mpd ? We are investigating the issue with Edgeware and i think that it can help. Thanks! |
When combining logtoscreen and noinput parameters, put the logs over the video, to make sure they can be read on-screen. This makes debugging easier on smart TVs. Issue #1610 Change-Id: I34fc8da6119b4fc3fe49bd0c6a5723d0d80bab36
Here are the ffmpeg and Shaka Packager settings we use in our live stream. First, we create an AAC audio loop and pipe it to UDP. ffmpeg \
-re -stream_loop -1 -i audio_loop.flac \
-c:a aac -b:a 128k -f mpegts \
udp://127.0.0.1:30000 Then, in another process, we encode video and put it together with the UDP audio loop without transcoding the audio. We're ingesting images from Gource via stdin for the video input. ffmpeg \
-probesize 32 -analyzeduration 0 -flags low_delay \
\
-thread_queue_size 2048 -fflags +genpts \
-i udp://127.0.0.1:30000?overrun_nonfatal=1&fifo_size=1000000 \
\
-thread_queue_size 4096 -fflags +genpts+nobuffer -r 25 -f image2pipe -vcodec ppm -i - \
\
-c:a copy -f mpegts -vn -b:a 128k udp://127.0.0.1:40000 \
\
-c:v h264 -f mpegts -an -bf 0 -flags +cgop -g 100 -pix_fmt yuv420p \
-b:v 2200k -vf pad=1280:720:20:20 udp://127.0.0.1:42000 \
\
-c:v h264 -f mpegts -an -bf 0 -flags +cgop -g 100 -pix_fmt yuv420p \
-b:v 1000k -vf pad=1280:720:20:20,scale=768:432 udp://127.0.0.1:43000 The Packager is running in another process to ingest the UDP output from the second ffmpeg command and package it. packager \
'input=udp://127.0.0.1:40000,stream=audio,init_segment=player-source/audio-init.mp4,segment_template=player-source/audio-$Number$.mp4,bandwidth=128000,playlist_name=player-source-aac.m3u8,hls_group_id=aac' \
'input=udp://127.0.0.1:42000,stream=video,init_segment=player-source/720-init.mp4,segment_template=player-source/720-video-$Number$.mp4,bandwidth=2200000,playlist_name=player-source-720-h264.m3u8' \
'input=udp://127.0.0.1:43000,stream=video,init_segment=player-source/480-init.mp4,segment_template=player-source/480-video-$Number$.mp4,bandwidth=1000000,playlist_name=player-source-480-h264.m3u8' \
--segment_duration 4 \
--fragment_duration 4 \
--minimum_update_period 4 \
--suggested_presentation_delay 30 \
--preserved_segments_outside_live_window 75 \
--time_shift_buffer_depth $(( 15 * 60 + 30 )) \
--mpd_output player-source.mpd \
--hls_master_playlist_output player-source.m3u8 \
--hls_playlist_type LIVE |
Thanks @joeyparrish ! |
By using the possibility to change the availabilityStartTime (AST) of the DASH-IF live-source-simulator, it was possible to pinpoint that there is no audio playout when AST is older than 49.7 days. The URLs look like https://livesim.dashif.org/livesim/segtimeline_1/start_1538352000/testpic_2s/Manifest.mpd or https://livesim.dashif.org/livesim/start_1538352000/testpic_2s/Manifest.mpd where 1538352000 is the number of seconds since epoch start (1970-01-01) (in this case it corresponds to 2018-10-01T00:00:00Z which is too old). The 49.7days is very close to 2**32 milliseconds, so it is likely that there is an overflow bug in the player. This bug means that no DASH live server can have a continuous working service for more than 49.7 days since the AST value is not allowed to change during a DASH session. In any case, I think we can exclude that this issue is due to a bug in Shaka-player. |
@TobbeEdgeware, thank you for your assistance and your analysis. Can you please clarify one point for me? If there is an overflow issue, do you believe that it is in Shaka Player? Or in the Tizen media stack? If it's in the Tizen media stack, might it be possible to work around it in the player by adjusting |
@joeyparrish It must be in the Tizen media stack. My guess is that the media time (time in DASH segments relative to AST) is converted into milliseconds in the media stack (although the timescale in the media itself is 48000 or similar). I agree with you that it may be worth to see if one can shift the If that does not work, it should be possible to do a corresponding shift in the You may then want to add the offset back when reporting the playback progress in order to report the correct DASH media time. |
Playing with |
@avelad, looking again at the timestamps, these are about 9 years away from reaching 2**53, which will be more than the integer accuracy of JavaScript's Number type and will cause failures related to the So even though I am going to try to workaround this issue on Tizen, please be aware of that broader limitation in JavaScript and consider reducing your timestamp values anyway. |
@joeyparrish , the stream posted previously (https://cdn.digital.com.bo/__cl/cg:default/__c/BOLIVIATV/__op/dash-default/__f/manifest.mpd) is from Edgeware (@TobbeEdgeware ) . The previous analysis indicate that the stream only works if AST less than 49.7 days, I think that it's not possible works with these value in a production environment. Please, tell us if it is possible to carry out the solution proposed by Tobbe. Note: the same stream works in Opera, Chrome, Firefox, Safari, Edge and WebOS. |
I tried making changes in the DASH parser that would adjust timestamps artificially to work around Tizen's bug, but I was unsuccessful. Those changes in the DASH parser (effectively lying about the media timestamps) triggered a cascade of other problems in PresentationTimeline, StreamingEngine, Playhead, etc. My suggestion at this point would be to file a bug against Tizen and see if they can issue a patch to correct their support of large audio timestamps ( > 2**32 ms ). |
@joeyparrish Thanks for your efforts. It seems to be too much trouble to make a consistent behaviour when shifting the timestamps, so it should better be fixed in Tizen. We have a newer segmenter where we can change the AST to an arbitrary value, which should make it possible to run the service with unpatched Tizen for at least a month before changing AST. Regarding your comment about 53-bit Javascript integer precision, we are aware that it is an issue when using the 10,000,000 timescale of SmoothStreaming. That is the reason that we use 2000-01-01 as AST instead of 1970-01-01. With the 2000-01-01 AST, the source plays nicely in Shaka-player on other platforms. |
@joeyparrish you mentioned earlier "Without a clear way to debug at the JS level on the device, this will be tricky to track down." Have you been able to deploy a Tizen application running a Chrome debugger? It is possible. I think I previously wrote a guide on how to set this up, I can dig it up if it would be helpful. |
@avelad Are your streams still available for testing? My team is looking at this issue as well and we are hoping to get Samsung to follow up. If your streams are up, they can probably use them for testing too. |
Thank you, @avelad. We have this issue as well but, curiously, we only see the problem on 2018 TV's with our streams. Our 2017 TV's are apparently unaffected. Are you able to confirm what model year TV you are using? My understanding of the situation is that Samsung is aware of the problem and a fix is planned for a future firmware update (which I think happen roughly quarterly). |
@chrisfillmore |
Woohoo! Wonderful news! |
@joeyparrish I'm still experiencing this issue on Samsung 2017 televisions with latest firmware. My client can't change the stream AvailabilityStarttime sadly. You mentioned a potential artificial offset, is that something you can give some pointers to that I can work on myself as a local experiment? |
No one from Shaka's team is going to work on this. If anyone is interested please create a PR, otherwise the issue will be closed in 7 days. |
Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including |
Have you read the FAQ and checked for duplicate open issues?:
What version of Shaka Player are you using?: 2.5.0-beta
Can you reproduce the issue with our latest release version?: Yes
Can you reproduce the issue with the latest code from
master
?: yesAre you using the demo app or your own custom app?: Both
If custom app, can you reproduce the issue using our demo app?: yes
What browser and OS are you using?:
Tizen 3.0
What are the manifest and license server URIs?:
https://cdn.digital.com.bo/__cl/cg:default/__c/BOLIVIATV/__op/dash-default/__f/manifest.mpd
What did you do?
Load the previous stream
What did you expect to happen?
There are audio and video
What actually happened?
There are video but no audio.
Note: in Chrome, Firefox, Opera and Edge the stream works.
The text was updated successfully, but these errors were encountered: