What is the codec of the RTMP live stream ?
CompletedWhich codec is used for live stream over RTMP ? I want the following to work, can you help me ?
ffmpeg -f live_flv -listen 1 -i rtmp://0.0.0.0:1935/live/ output.mkv
I get tons of errors:
[h264 @ 0x10530b0c0] missing picture in access unit with size 56
[h264 @ 0x10530b0c0] missing picture in access unit with size 56
[h264 @ 0x10530b0c0] missing picture in access unit with size 189
[h264 @ 0x10530b0c0] missing picture in access unit with size 56
[h264 @ 0x10530b0c0] missing picture in access unit with size 138
[h264 @ 0x10530b0c0] missing picture in access unit with size 56
[h264 @ 0x10530b0c0] missing picture in access unit with size 56
[h264 @ 0x105905aa0] no frame!
[h264 @ 0x105905aa0] no frame!
-
So I found (using Wireshark) that there is some JSON that is present in the RTMP stream, specifically:
{"list":[],"time":1722871867870,"version":"1.0"}
WTF
Note that this is in a message that is explicitely marked as being video (message type 0x09).
This seems to explain the errors in FFmpeg and also make some clients drop the connection. Is there a way to disable this behavior ?
-
Dear Developer, Hello and thank you for reaching out to DJI Innovations. The error message "missing picture in access unit with size" typically indicates that FFmpeg is not receiving any data from the stream source, suggesting that the stream source is not pulling any data from the server. Here are some steps you can follow to troubleshoot this issue: 1. **Check the Connection Between the Controller and the Server**: Ensure that there is no connection failure between the controller and the server. 2. **Verify the Media Server**: Confirm that a media server is running on the server. 3. **Firewall Settings**: Check the firewall settings to ensure they are not blocking the connection. 4. **Host Address and Port**: Verify the host address and port number being used for the connection. 5. **Network Connectivity**: Test the overall network connectivity. By following these steps, you should be able to identify and resolve the issue causing the missing stream data. We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Thanks for the response. Yeah the connection and the network is working, but to be more precise:
1. connection working, I get some images of the video (and can display them)
2. FFmpeg IS the server, the RC Pro is connecting to it
3. there is no firewall
4. host address/port is correct
5. connectivity is correctI found the problem to be these weird JSON messages that are embedded in the RTMP stream. How can I disable them ?
-
Dear Developer, Hello and thank you for reaching out to DJI Innovations. Could you please provide the model numbers of your remote controller and drone, as well as the firmware versions you are using? We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. The firmware appears to be outdated. You can try updating the firmware and then retry. We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Dear Developer, Hello and thank you for reaching out to DJI Innovations. Are you using the demo1.10 code? Can you start the live stream directly from the remote control? We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
It is not the demo 1.10, this is a standard/reference RTMP server (ffmpeg), I just set the RC to push video to it and save it to a file. I tried with the demo but could not make it work.
My diagnostic for now: the stream that is sent by the DJI RC Pro is corrupted (see last screenshot), can you escalate this to your internal development team ?
Thank you very much
-
Dear Developer, Hello and thank you for reaching out to DJI Innovations. When using ffmpeg or VideoCapture to extract video frames, you may encounter errors such as "missing picture in access unit with size 56". These errors can be ignored. They indicate that an expected video frame was not obtained. Unprocessable data is discarded, and thus it does not affect the playback or extraction of video frames. If you need to extract video frames -- I'm sorry, but this goes beyond our scope of work. The live stream uses standard H264 format data. You may want to refer to tutorials on ffmpeg or OpenCV for guidance. We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team -
Hello,
These errors indeed say that there was no video frame, but the problem is that this seems to perturb the decoder. The unprocessable data is not discarded cleanly, with consequences:
- opening the stream can take a very long time,
- multiple video artifacts appear
- some frames are even dropped, leading to stutteringI can wait for a future firmware update, but can you fix this bug ? Thank you very much.
-
Dear Developer, Hello and thank you for reaching out to DJI Innovations. If using RTMP results in constant lagging and frame drops, it's recommended to check if the network environment is stable and if there's sufficient bandwidth. If the issue persists even after improving the environment, consider switching to Agora's push-pull streaming:上云API直播推送的视频流码率是多少? We hope that our solution meets your needs satisfactorily. We appreciate your email and wish you a wonderful day! Best Regards, DJI Innovations SDK Technical Support Team
Please sign in to leave a comment.
Comments
12 comments