-
Notifications
You must be signed in to change notification settings - Fork 14
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
Thumbnail time is completly wrong. #28
Comments
@edemir206 the time is the time into the segment the thumbnail was generated from. E.g. If you know that each of your segments is exactly 10 seconds long then to get the real time you would add The reason they are relative to the segment is because for a live stream there is no fixed starting point. Let me know if you get something working with Clappr. I was actually planning on updating the thumbnails plugin to support this but never got around to it. |
Hi @tjenkinson I understand now. But even using Below is my updated code:
|
@edemir206 what type of stream is it? LIVE, VOD or EVENT? If all the segments are 10 seconds and it is VOD or EVENT it should work. It would be more accurate though, and work for LIVE, to get the segment start times from hls.js/clappr. |
@tjenkinson it is a LIVE stream. I'm using the exec_push nginx rtmp directive to convert the stream to a lower bitrate using ffmpeg, below is my nginx application
|
Ah right. Yes you will need more logic in the player to get the start time of the segments in the media element (MSE buffer). The following can happen:
This means |
@tjenkinson I followed your instructions, started from segment 8, but even this way there's a problem with time syncing. The thumbs represets video time up to 10 min, but after that everything gets messed up that's really weird. I don't know what else to do I think i'm just gonna give up. |
Hi,
I've been trying to use your solution, but for some reason thumbnails "time" seems to be messed up. I've been trying to import the thumbs using clappr thumbnails plugin using the following code:
This is part of my generated thumbnails.json:
"segments":[{"sn":0,"thumbnails":[{"time":0,"name":"283ec_recordall-0-0.jpg"}]},{"sn":1,"thumbnails":[{"time":12.134,"name":"283ec_recordall-1-0.jpg"}]},{"sn":2,"thumbnails":[{"time":3.432000000000002,"name":"283ec_recordall-2-0.jpg"}]},{"sn":4,"thumbnails":[{"time":0,"name":"283ec_recordall-4-0.jpg"}]},
Well, as you can see the time is not continuous, it start with 0, then 12 and the next is 3.43.
I'm using NGINX + RTMP plugin to generate the HLS and pointing the .m3u8 as intended.
In my nginx application the hls_fragment is set to 10s
These are the options (in nginx.conf) i'm using to generate the thumbs:
exec bash -c "hls-live-thumbnails http://nginx/app/hls/$name/index.m3u8 --interval 30 --targetThumbnailCount 30 --outputDir /data/app/thumbs/$name --outputNamePrefix $name";
What am I doing wrong ? Am I misunderstanding how your plugin works ?
The text was updated successfully, but these errors were encountered: