-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
VideoPlayer set_stream_position()
doesn't work (seeking is not implemented)
#14430
Comments
What kind of VideoStream are you playing? This bug report doesn't provide enough information, please try to be more specific. |
|
i am just looking around to see how to add seek to ogg. looks pretty complicated http://blog.pearce.org.nz/2009/05/video-seeking-improvements.html i am debating whether or not to try to fix it since i kinda want to understand how ogg works |
@hungrymonkey would it be easier to implement for webm? |
@blurymind probably somewhat the same difficulty. you have to seek to find keyframes. The code doesnt really separate grabbing frames and finding the keyframe. |
I would like to give this problem a push. |
godot 3.1.1 same bug |
I do not think libsimplewebm supports seeking. |
@akien-mga I attempted to implement ogg theora seek support but I do not understand why the video just waits for the full seek as if the player wants to catch up although I submitted zero frames. |
First Ogg Theora Seek Attempt Ogg Tidbits Ogg lacks a seek table. Timestamp exists on the ogg page with the closing packet stream. Ogg_page_packets can discern which page has a timestamp. Keyframes exist in pages with ogg_pages_packets(&og) == 1 Proposal Split the file into BUFFERSIZE segments for binary searching and backtracking. Algorithm Binary Search Ogg Page Timestamps Backtrack to Keyframe Catch up to Seek Section 1: This section is implemented as nested loops. The inner loops finds an unprocessed buffer segment and retrieves the first ogg_page even if it spans across buffer segments. The outer loop compares the ogg_page into an iterative binary search. Since ogg_page_packets can discern the granulepos or time stamp, no ogg_packet is inspected. Section 2: The section is implemented as a buffer sync step to combine all ogg_pages into one ogg_packet. Section 3: Submit the frames into the theora decoder and advance the video forward until the buffer catches up to the seek time. Modified Implemented Seek Added BUFFERSIZE and remove the hard coded 4096 Known Bugs Seek cannot find subsequent ogg_pages in the buffer segment. When a buffer section has two ogg_pages and the keyframe is encoded in the latter ogg_page. Seek will not find it. VideoTheoraStreak is littered with time resets. Currently, seek only works during play mode. Seek 0 does not work Links https://www.theora.org/doc/libtheora-1.0/group__decfuncs.html https://xiph.org/oggz/doc/group__basics.html Issue godotengine#14430
First Ogg Theora Seek Attempt Ogg Tidbits Ogg lacks a seek table. Timestamp exists on the ogg page with the closing packet stream. Ogg_page_packets can discern which page has a timestamp. Keyframes exist in pages with ogg_pages_packets(&og) == 1 Proposal Split the file into BUFFERSIZE segments for binary searching and backtracking. Algorithm Binary Search Ogg Page Timestamps Backtrack to Keyframe Catch up to Seek Section 1: This section is implemented as nested loops. The inner loops finds an unprocessed buffer segment and retrieves the first ogg_page even if it spans across buffer segments. The outer loop compares the ogg_page into an iterative binary search. Since ogg_page_packets can discern the granulepos or time stamp, no ogg_packet is inspected. Section 2: The section is implemented as a buffer sync step to combine all ogg_pages into one ogg_packet. Section 3: Submit the frames into the theora decoder and advance the video forward until the buffer catches up to the seek time. Modified Implemented Seek Added BUFFERSIZE and remove the hard coded 4096 Known Bugs Seek cannot find subsequent ogg_pages in the buffer segment. When a buffer section has two ogg_pages and the keyframe is encoded in the latter ogg_page. Seek will not find it. VideoTheoraStreak is littered with time resets. Currently, seek only works during play mode. Seek 0 does not work Links https://www.theora.org/doc/libtheora-1.0/group__decfuncs.html https://xiph.org/oggz/doc/group__basics.html Issue godotengine#14430
I never realize force pushing would lead to such spam. Opps. |
set_stream_position method is still not functioning in Godot 3.2 beta 4 |
@CrimsonZA Godot already have a ffmpeg decoder for all codecs |
seems like Godot isn't ready to play video on Android, at least not on an Oculus Go, definitely not for immersive vide using the built in vide player node or godot-videodecoder |
@CrimsonZA You can try my seek theora branch which might end up in Godot 4.0. You have to compile in support for it. Tell me if I have any bugs. |
Does it support seek function? |
@arsen-ch Seek function looks empty? https://github.com/kidrigger/godot-videodecoder/blob/master/src/gdnative_videodecoder.c#L693 |
How about removing this property until the seek functions are implemented? |
@Tooniis Removing properties is technically a breaking change (even if they were never working well in the first place), so we can't do it in the |
set_stream_position()
doesn't work
Will this ever be implemented? |
https://github.com/kidrigger/godot-videodecoder/blob/master/src/gdnative_videodecoder.c#L1083 @heyimyunyl Upstream official position is to use kidrigger's gdnative plugin. I made an ogg-theora seek implementation but upstream broke a few things within their ogg theora so I cant commit it. |
set_stream_position()
doesn't workset_stream_position()
doesn't work (seeking is not implemented)
Closing in favor of godotengine/godot-proposals#2945, as feature proposals are now tracked on the Godot proposals repository. |
For those interested, there is a PR for webm seek() support: #57744 |
Operating system or device, Godot version, GPU Model and driver (if graphics related):
Ubuntu 16.04, Godot 3.0 beta 1
Steps to reproduce:
set_stream_position(20.0)
The text was updated successfully, but these errors were encountered: