-
Notifications
You must be signed in to change notification settings - Fork 402
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
(Can't stream HLS) [error] hls: force fragment split #38
Comments
Hi @tincho, does these errors only appear after a few days as mentioned in the linked issue from |
Also, |
Hello! thanks for your answers |
Ah, okay. I wonder what is different about that build that doesn't have the errors. |
Another suggestion is to try using an older ffmpeg version, like https://github.com/alfg/docker-nginx-rtmp/blob/master/Dockerfile#L3
|
Closing. Feel free to re-open if you have any additional info using the latest build. Thanks! |
@alfg what is your ffmpeg command for transcoding? I found this issue happens when timestamps of audio and video diverge too much. Are you using -async 1 -vsync 1 or both? |
@mkrn Using neither. The ffmpeg commands are defined here: |
Thanks @alfg I investigated and debugged the issue, and nailed the cause, it's happening when timestamps of video and audio packets have a different start pts. In this case dts of audio and video are too far apart and HLS algo does not account for it. |
Great findings @mkrn! I can try adding those filters to ffmpeg commands. However, is there a way I can test to verify the fix? Are you seeing the errors mentioned in the original post? |
@alfg In some videos (presumably with very bad internet) I get a number of audio packets in a row with no video, and then a video packet with dts and pts of many seconds behind... This can possibly happen if a buffer starts sending frames after network congestion. I'm trying to mitigate this issue by ffmpeg settings to sync video and audio and force 30 fps (there are many settings related to it, vsync, -r, fps filter, so I'm still testing with some of them. |
I think we need -async 1 -vsync 1 here. |
Also ffmpeg is a bit wonky when it is low on resources. |
Hi there
I'm streaming from OBS , it seems to be working because in the console I see:
2019/11/30 00:05:04 [info] 6#6: *50 connect: app='stream' args='' flashver='' swf_url='' tc_url='rtmp://localhost:1935/stream' page_url='' acodecs=3191 vcodecs=252 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935
But when I open VLC and add the url: http://mysite.com/live/test.m3u8
The logs start to show many of these:
And of course VLC doesnt play anything
Tried building from source and same.
Tried this solution editing
Dockerfile
arut/nginx-rtmp-module#568 (comment)
but then build fails with the message:
ERROR: libass not found using pkg-config
The streaming works when using RTMP anyway, altough extremely laggy, but that's probably because of my bandwith
The text was updated successfully, but these errors were encountered: