Closed hellovertex closed 1 year ago
We tried -g 1
flag with ffmpeg, as your documentation on Seeking suggested, to seek directly for iframes, but it would not let us:
Codec AVOption g (set the group of picture (GOP) size) specified for input file #0 (FILENAME) is not a decoding option.
Which Video API are you using (Media Foundation, DirectShow or WinRT)? Have you tried different test streams from other sources (https://www.renderheads.com/content/docs/AVProVideo/articles/feature-streaming.html#test-streams)?
Which Video API are you using (Media Foundation, DirectShow or WinRT)? Have you tried different test streams from other sources (https://www.renderheads.com/content/docs/AVProVideo/articles/feature-streaming.html#test-streams)?
Sorry for the delay, due to internal requirements, we built an in-house solution using a custom framebuffer that is sufficient for our purposes. In case you might still want the information: We used Media Foundation. If I get the time to test different streams, I will re-open, but that depends on whether we get funding. Thanks for your quick help though!
Hello, I am using
mediaPlayer.OpenMedia()
on a HLS Url and process each frame individually using mediaPlayer.ExtractFrame() method.I now want to provide a Rewind button to go back two seconds. In my
Update()
function, I callmediaPlayer.ExtractFrame()
. So when the button is clicked, successiveUpdate()
calls should return the video-frames starting from the seeked position two seoncds ago, for further processing.The issue is with when the button is clicked multiple times: Repeatedly calling
Seek()
, keeps seeking to almost the same time. So I can not get further past a certain image, even if it is well within seeking range: I expect successive calls toSeek()
to "add on to each other" (minus the time passed between two consecutive clicks)My Setup:
This is the code of the corresponding OnClick function that triggers the rewind and produced above screenshot.
For completeness the class that calls ExtractsFrame:
Note: I think I can not use
mediaPlayer.ExtractFrame(timeSeconds)
because on subsequent calls, I wouldnt knowtimeSeconds
-offset, because of the blocking frame processing procedure.Do you have an idea what might be wrong? Any pointer would be much appreciated.
If it helps, the hls stream is produced via
gst-launch-1.0 rtspsrc location=$RTSP_URL short-header=TRUE ! rtph264depay ! video/x-h264, width=1920, height=1080, framerate=30, format=avc,alignment=au ! kvssink stream-name=$STREAM_NAME storage-size=512 access-key=$AWS_ACCESS_KEY_ID secret-key=$AWS_SECRET_ACCESS_KEY aws-region=$AWS_REGION
andffmpeg -re -stream_loop -1 -i $VIDEOFILE_PATH -c copy -f rtsp rtsp://localhost:8554/mystream
. I could ask to change these too, if needed.