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

DASH trick mode tracks #538

Closed
joeyparrish opened this issue Oct 5, 2016 · 8 comments
Closed

DASH trick mode tracks #538

joeyparrish opened this issue Oct 5, 2016 · 8 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@joeyparrish
Copy link
Member

joeyparrish commented Oct 5, 2016

Shaka Player has no knowledge of DASH trick mode tracks. According to DASH IOP v3.3, trick mode tracks should not be selected for normal playback.

Steps for us:

  1. find sample assets for trick mode so that we can properly test this feature
  2. ignore trick mode tracks, since we do not yet support them (we should get at least to this stage as soon as possible, for release in v2.1 or v2.0.1)
  3. use trick mode tracks when player.trickPlay() is used, limited to maxPlayoutRate from the manifest (this may take much longer to achieve, and may or may not make v2.1)

Here's the relevant text from IOP v3.3:

3.2.9. Trick Mode Support

Trick Modes are used by DASH clients in order to support fast forward, seek, rewind and other operations in which typically the media, especially video, is displayed in a speed other than the normal playout speed. In order to support such operations, it is recommended that the content author adds Representations at lower frame rates in order to support faster playout with the same decoding and rendering capabilities.

However, Representations targeted for trick modes are typically not be suitable for regular playout. If the content author wants to explicitly signal that a Representation is only suitable for trick mode cases, but not for regular playout, it the following is recommended:

  • add an Adaptation Set that that only contains trick modes Representations
  • annotate the Adaptation Set with an EssentialProperty descriptor or SupplementalProperty descriptor with URL "http://dashif.org/guidelines/trickmode" and the @value the value of @id attribute of the Adaptation Set to which these trick mode Representations belong. The trick mode Representations must be time-aligned with the Representations in the main Adaptation Set. The value may also be a white-space separated list of @id values. In this case the trick mode Adaptation Set is associated to all Adaptation Sets with the values of the @id.
  • signal the playout capabilities with the attribute @maxPlayoutRate for each Representation in order to indicate the accelerated playout that is enabled by the signaled codec profile and level.

If an Adaptation Set is annotated with the EssentialProperty descriptor with URI "http://dashif.org/guidelines/trickmode" then the DASH client shall not select any of the contained Representations for regular playout.

@joeyparrish joeyparrish added the type: enhancement New feature or request label Oct 5, 2016
@joeyparrish joeyparrish added this to the v2.1.0 milestone Oct 5, 2016
@joeyparrish
Copy link
Member Author

@maxPlayoutRate is not the only limiting factor for trick play rate. We should also make sure that the trick play track's bandwidth, multiplied by the trick play rate, does not exceed the user's estimated bandwidth.

For example, in this test clip from the DASH IF, the lowest bitrate normal stream is about 3x the bitrate of the trick play stream. For clients unable to play any but the lowest bitrate stream, the max trick play rate would be about 3.

Another way to look at it, which would still work for content without a trick play track, is to consider the current playback rate in track selection. Choose a track based on estimated bandwidth divided by current playback rate.

@joeyparrish
Copy link
Member Author

@joeyparrish
Copy link
Member Author

Finally, we should consider how reverse trick play works. Today, browsers do not support negative playback rates. It is unclear if they ever will. We currently use repeated seeking to simulate negative playback rates, but this is not a great experience.

Our forward trick play experience will be greatly improved by the use of special trick mode tracks, so we should look for a way to improve our reverse trick play experience as well. Perhaps having a special trick mode track will open up another possibility or allow us to refine the technique we use today.

@joeyparrish joeyparrish self-assigned this Oct 6, 2016
@joeyparrish
Copy link
Member Author

The above-referenced trick-play assets fail to decode in Chrome (except the trick play tracks themselves, ironically). So we'll need to find other trick play assets. Media logs (formatted via this script):

Timestamp Property Value
00:00:00 00 pipeline_state kCreated
00:00:00 00 event WEBMEDIAPLAYER_CREATED
00:00:00 00 url blob:http://localhost/6dd4de73-abdd-4c59-ae4f-1d4ec253bb26
00:00:00 00 pipeline_state kInitDemuxer
00:00:00 229 duration 654
00:00:00 425 info Audio codec: mp4a.40.2. Sampling frequency: 24000Hz. Sampling frequency(Extension): 48000Hz. Channel layout: 3.
00:00:00 425 found_audio_stream true
00:00:00 425 audio_codec_name aac
00:00:00 480 info Video codec: avc1.4D401F
00:00:00 480 found_video_stream true
00:00:00 480 video_codec_name h264
00:00:00 480 pipeline_state kInitRenderer
00:00:00 482 audio_dds false
00:00:00 482 audio_decoder FFmpegAudioDecoder
00:00:00 483 video_dds false
00:00:00 483 video_decoder FFmpegVideoDecoder
00:00:00 483 pipeline_state kPlaying
00:00:00 694 error video frame with PTS 0us has negative DTS -83333us after applying timestampOffset, handling any discontinuity, and filtering against append window
00:00:00 694 error Append: stream parsing failed. Data size=131072 append_window_start=0 append_window_end=654.04
00:00:00 698 pipeline_error chunk demuxer: append failed
00:00:00 698 pipeline_state kStopping
00:00:00 699 pipeline_state kStopped

shaka-bot pushed a commit that referenced this issue Oct 7, 2016
Issue #538

Change-Id: I47393ccdc189cf55b90e3a8e4239541e817618f9
@joeyparrish
Copy link
Member Author

Since the DASH-IF's test assets for trick play do not decode in Chrome, I will need to make a new one. I analyzed the trick play track from the manifest linked above, and I see only I-frames at 1 fps. The segment size is 2s, just as in the normal tracks. This will not be difficult to replicate.

joeyparrish added a commit that referenced this issue Oct 19, 2016
Issue #538

Change-Id: I47393ccdc189cf55b90e3a8e4239541e817618f9
@joeyparrish
Copy link
Member Author

@waqarz added new trick mode vectors here: http://testassets.dashif.org/#testvector/list

Thanks!

@joeyparrish
Copy link
Member Author

This is deferred until after some HLS-related refactoring is done. HLS work is higher priority and may conflict with this, since both affect the internal manifest representation. HLS work is tracked in #279.

@joeyparrish joeyparrish modified the milestones: v2.1.0, Backlog Dec 13, 2016
@joeyparrish
Copy link
Member Author

Refactoring for HLS is done, so we can now continue work on trick mode.

@joeyparrish joeyparrish modified the milestones: v2.1.0, Backlog Dec 28, 2016
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants