-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 with DJI GO to SRS, RTMP playback is normal, but HLS cannot be played. #635
Comments
Open ATC mode, use SRS RTMP dump to record a segment of FLV, and upload the logs and files to take a look.
|
[2016-12-08 10:26:36.416][trace][13946][227] dvr stream wifiwx-85 to file /storage/live_data/live/wifiwx-85.1481163996416.flv |
It must be the non-standard NALU inside the 264. Find time to check if it can be compatible. Garbage encoders usually like to send strange streams.
|
Your file, ffmpeg, also has some issues:
|
The file recorded by srs rtmp dump (the original stream without modified data) can be found here: wifiwx-85.1481163996416.flv.zip. Push to SRS:
Server logs:
Logs were generated around the time of slicing.
The sliced ts files cannot be played in VLC, only showing green screen and gray screen. However, RTMP can be played. VLC can directly play FLV files as well.
|
I always feel that the H.264 in this FLV file is not in Annex B format, but rather in MP4 format with H.264 encapsulation. Will there be any issues?
|
Analyze its SPS/PPS, which is sent as the first frame of the video. The content is as follows:
The encapsulation is correct, and it can enter the function
The data of SPS is as follows:
The data of PPS is as follows:
It seems that SPS and PPS do not have any special features. The parsed SPS information is also correct:
Comparing with FFMPEG's information:
|
The first frame should be an IDR frame, and the data is as follows:
Or, to put it another way, it contains several NALUs, each in the ibmf format with size+data:
The sum of several NALUs is
There are 4 NALUs (samples) parsed out.
These several NALUs are as follows:
AUD, 2 bytes (09 30)
If SRS does not have IDR, it will not insert SPS and PPS, resulting in screen flickering and error messages.
|
Video frame data sent. The data of SPS is as follows:
The data of PPS is as follows:
First frame:
Second frame:
Third frame:
Currently, it can be determined that the data sent by DJI is NonIDR open gop data, which is usually preceded by IDR frames in closed gop. It is necessary to correctly handle this type of data.
|
It is said that the latest FFMPEG can handle this stream correctly.
|
In summary:
Under the SRS documentation, the sample video of Avatar has the following NALU sequence:
The sequence of open-gop recommended by DJI is as follows:
|
Finally, NonIDR and IDR were unified. The strategy for writing HLS in SRS is:
|
The streaming address I wrote is rtmp://192.168.1.130:1935/live/livestream, but it keeps showing "connecting". Can you please explain the reason for this?
|
I am using the DJI Cloud API to push live streams from the M300. The HLS playback is working fine, but the live stream fails to play in Chrome using the FLV player. Additionally, the FLV file recorded by the DVR cannot be played, although it can be played using VLC player after downloading. It seems that there is an issue with the format provided by DJI. How can this problem be resolved?
|
Using the "DJI GO" app (for DJI drones), streaming to SRS and playing through RTMP works fine. However, HLS playback is not possible as the video appears pixelated. At the same time, when testing streaming to a wowza server, the HLS playback generated on wowza is normal. Can you please explain the reason for this?
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: