Closed achriki closed 1 year ago
Hi I don't fully understand the issue report so I am making some guesses here.
I wonder if the difference on the Wireshark logs as that NodeJS is a single thread. When there RTP data is received, NodeJS will be writing to the file and I think the file write is taking place I assume NodeJS is not reading the TCP socket. NodeJS But in the top wireshark log, the Seq= number is incrementing. Re-sends at the TCP level would have the same Seq as that is the
As for ffmpeg, I don't know the cause of that error. As a test, if you let the .264 file finish being written, is ffmpeg able to read the whole file?
Hi
Maybe the issue in NodeJS
because his single threaded, but i tried to separate the steps into to steps, the first one is to let NodeJS
fill the .264
file with the RTP
data. and after that send it to ffmpeg
to read the .264
file but i could achieve that because when NodeJS
started writing the file he keep added the same RTP
data to the file, and that make the file contained an invalid data, even after the logs get back to the normal state as i seed, the NodeJS
is not going to stop writing the file it's like he didn't take the timestamp given in the playFrom
function in consideration, so i forced the NodeJS
server to stop running for not let the file consume a lot of storage.
I think that's why ffmpeg
display the error because he couldn't find any other frame to continue reading the file.
If you have any ideas that could help to solve this issue i'll be thankful.
You could try this... Make ffmpeg read bytes from a socket. In yellowstone, when you get the RTP data, write it to the socket
Hi
Thank you for the advice, I want to inform you that i fixed the timestamps issue in the playFrom
function by calling the function before the instantiation of the H264Transport
Object, and know NodeJs
can finish writing the h264
file without crushing.
But i found another issue when i tried to convert the h264
into mp4
using ffmpeg
command. ffmpeg
throw the Invalid NAL unit and No frame errors. it's seems to me that RTP Packet is not correct :
Note : if it's possible to give me the steps to bring the play back properly into my application maybe i arrange my code black in bad way Here is my code snippet :
If you have any ideas i'll be thankful.
Hello, I'm working o a playback project and i'm using
ONVIFClient
class alongside withH264Transport
to manage theRTSP
recording and writing it to theh264
file. and i useffmpeg
to read theh264
file and pipe it to the browser. After i run some tests to display the playback i found theffmpeg
keep throwing the same error in every test :Here is the code snippet that i use to write the recording data to
h264
file :After some code review i went to check the change between my local server and the
NVR
and i found a big issue in theTCP
acknowledgments, i saw that this there is an asynchrony between theRTP
data andTCP [ACK]
SoNVR
keep resending the same data waiting forTCP [ACK]
that's explainingffmpeg
crash because there is just one frame who sent byNVR
again and again.But After this asynchrony operation the change
RTP / TCP
back to normal as it was in the beginning.Please i want to know if this issue is related the
yellowstone
library or related to something else.