-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Some freezes with static files #23
Comments
Did you try it with and without |
Yes, I don't have the same problem but ffmpeg generates TS files with different duration |
I removed |
But that would evenutally disable seeking functionality. Since length of the segments is not known anymore. And we cannot determine, if segment have been transcoded or if it overlaps with existing. |
but do you think ffprobe is generating incorrectly? do you have the same problem? is skip_frame nokey the problem? |
What do you think about fixed segment time? |
When not using keyframes, then they are not generated by ffprobe. Just by an algorithm, so that all chunk times are known. I did not see problems with video I tested with, but there might be different encoding causing different problems. Maybe adding
I don't see how it should be different to just telling ffmpeg where to split the video explicitly. |
ffprobe generated this:
When I started to play, I found the command:
I'm missing something? why the the force_key_frames and segment_times is a little different from ffprobe? when a I'm looking inside from playlist, it's generated like a fixed time 3.498:
am i looking and calculating wrong? I found this document: |
By default, usage of keyframes is disabled: That means, video is not split by keyframes, but in fixed time 3.498. Only if you enable it in config, that ffprobe will be executed, keyframe times will be generated (and cached if wanted) and used in splitting videos. go-transcode/hlsvod/manager.go Lines 122 to 123 in 14e1d91
|
I try to enable the
Only ffprobe running is: |
Thanks for reporting, I missed that one to pass down from config file to the transcoding backend. Could you please try again? |
Yes, the problem with the tag was fixed. The output is something like this:
When I play, I found this command too: But I have a question, Should the -SS match with the first force_key_frames? |
Segments are 3.50s long, but with offset 1.25s. That means, the shortest segment length can be 2.25s, longest can be 4.75s. go-transcode/hlsvod/manager.go Lines 60 to 61 in b3af116
An algorithm takes all key frames and tries to use most of them. That means, segment length should average 3.50s, but if there is key frames 1.25s earlier or later in the stream, it would be taken. If there are multiple key frames in this timespan, only one is taken. Lines 11 to 58 in b3af116
Minimum buffer length is 3 segments, and maximum is 5. That means, maximum 5 segments are transcoded at the same time and minimum 3 of them are always available. That means, initially there are 5 segments transcoded, and after 2 segments, another 5 segments are transcoded, and offset is controlled by go-transcode/hlsvod/manager.go Lines 62 to 63 in b3af116
|
Ok, I changed some values to work better:
3º I changed the playlist generator to ignore the first result (0.00000) // playlist segments
for i := 2; i < len(m.breakpoints); i++ {
playlist = append(playlist,
fmt.Sprintf("#EXTINF:%.3f, no desc", m.breakpoints[i]-m.breakpoints[i-1]),
m.getSegmentName(i-1),
)
} Now it's working much better, thanks |
I applied this fix in recent commit. Thinking about passing other values as configs. |
Fixed, thank you \o/ |
sorry, but your fix to segment is making the ffmpeg to start after sometime, the skip is only in the segment generator. |
Hmm, so that mean we miss first seconds of the stream? It should be removed only from playlist? I'll look into it today again. Thanks for letting me know. |
yes, the zero number should be removed only from playlist segment. |
Fixed. |
The start value is correct, but the ts is wrong, the segment should start with 00001. The calculation time of the 720p-00001.ts is from 0 and the next keyframe.
|
because this I added "-1" in the segment name: I don't know if this will create a problem without keyframe. |
I didn't notice that, sorry, my mistake! |
The profile-0001 segment is a m3u8 |
It looks like it returns manifest only if the transcoding did not start yet. When i request second segment, then even first one works. UPDATE: Even after re-requesting first manifest it returns it correctly. |
Usecase of requesting segments before manifests was not considered, that is why it fails. The initialization request was expected to be manifest. That means, the first request to any segment ot playlist returns playlist. But this is unexpected behaviour. |
I'm have a problem with static files, sometimes the screen freezes for while
I believe that probleme is: "force_key_frames"
The text was updated successfully, but these errors were encountered: