-
Notifications
You must be signed in to change notification settings - Fork 114
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
Streaming frames from rendering #84
Comments
Hi @hrvthzs, Can you give us some details about that? Which browser are you using? I have a similar problem with Chrome on Windows. Also, If it is chrome can you disable hardware-accelerated decoding from |
I might be able to offer some insight here as I was just stepping through this troubleshooting a problem we're having. The example from our data is that we send a frame at a time of live video as it comes in. So the first frame is an I frame with SPS, PPS, and IDR frame. The feed function takes this and ends up putting the SPS and PPS in the slices variable leaving the IDR in left. The call to getVideoFrames obviously finds no frame in just the SPS, PPS data so the first call basically does nothing other than put the SPS, PPS in pendingUnits and the IDR in remainingData. The next time around we give it a non-IDR frame and this time the IDR is in slices so it gives it to getVideoFrames. Unfortunately getVideoFrames checks to see if it's a vcl is in pendingUnits THEN puts the IDR in units. Since there was no vcl in units prior to the IDR being added getVideoFrames again returns no chunks back. If the if statement was the last thing in that loop it would have pushed a frame sooner and only been 1 frame behind at this point. Instead we get to the 3rd frame our software passes through feed (another non-IDR). This time all the necessary information is in pendingUnits and it knows it has a vcl so when the 3rd frame gets passed into getVideoFrames it finally returns chunks and passes them to remux on the third frame. I know the original commenter said 4 frames. Perhaps there's another scenario where this could be 4 or perhaps there's another 1 frame delay somewhere after the muxing. I can certainly reproduce it not decoding the 1st frame until the 3rd frame is passed in. |
hi @jbrownsw, @samirkumardas @sanalpencere I am using NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY and NV_ENC_H264_PROFILE_BASELINE_GUID. |
Since you mentioned "4 frames" and Chrome may have a 4 frames buffer in non-live mode, the following may help to resolve this issue: https://stackoverflow.com/questions/36364943/frame-by-frame-decode-using-media-source-extension |
I am encoding raw h.264 frames using the NVidia Video Codec SDK on the server side and decoding them with jmuxer on the client side. Seems that, sent frames are not rendered immediately, they are always a 4 frames behind. This is very annoying when interacting with a 3D scene. Is there a there a way to encode and show the current frame immediately? Thanks :)
const jmuxer = new JMuxer({ node: "player", mode: "video", debug: true, flushingTime: 0 });
The text was updated successfully, but these errors were encountered: