Open eacharya opened 7 years ago
@eacharya For the clips, how are length, frame_number_start, frame_number_end defined?
I would suggest that we set:
length: 60 1000 = 60000 frame_number_start = 0 frame_number_end = 25 60 = 1500
During inference, we decode the video at a per-frame level. During that time, we can update these database entries.
On Mon, Jun 5, 2017 at 7:40 PM, DeepakZigvu notifications@github.com wrote:
@eacharya https://github.com/eacharya For the clips, how are length, frame_number_start, frame_number_end defined?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zigvu/rasbari/issues/10#issuecomment-306365527, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOdgIGnTcXlHjKs4sY-hE3keJK5hZ_aks5sBLwMgaJpZM4NM1f8 .
@eachary How is the split mp4 file associated with the clip? Video::Clip does not seem to have any value for the file. Is it based on frame start time relative to the first clip in 60 second interval?
@eacharya Are the clips renamed based on id assigned by rails/MySQL in the folder streams/streamId/clipId/? Is created_at date value for clips used to find the order of the clips?
For this rake task, here is the hierarchy of video:
We create the hierarchy through database IDs.
Clip path names are according to stream id / capture id / clip id
What is the mechanism to untar the file in the destination? I am sending the tar.gz file directly using storageClient.saveFile
Rake task for ingesting clip is implemented. Command for calling rake task from rasbari folder:
rake ingest_clip:ingest stream_id=<ID> clip_file=<clip_file_location>
ID : ID of the stream clip_file_location: Location of the mp4 file.
Downloading video using youtube-dl
youtube-dl -f mp4 <video-url>
-f mp4: format mp4
@eacharya Output framerate of 25 specified for ffmpeg clip generation task
Tested with >30min Youtube videos and clips are correctly being generated. One of the videos used is showing millisecond timer to test correct clip boundaries. Most difference I saw at these boundaries is 67ms, which is higher than 40ms expected for 25fps, but due to key frame positions, likely ok. Othewise, looking good so far.
@DeepakZigvu - I made a few comments on the commit for this issue. There is some clean up required and bug we need to fix: https://github.com/zigvu/rasbari/commit/98b22e9701f4b68f6ef6b73e485d1c908217403
Let me know if you have any questions.
Objective
The current capture mechanism was designed with the view of capturing anything that can be played in a web browser. We need a simpler mechanism for ingesting videos that are already available as a stand-alone file.
Video is stored in Rasbari using the following model hierarchy:
stream -> capture -> clip
. Each clip is ~1 minute long and has an associated thumbnail. Capture has multiple clips that are collected in a sequential fashion. A stream has multiple captures that have been collected at different times.Let us say that we want to run a detector model across 100 videos stored in youtube. In that scenario, we would:
This issue assumes 1 and 2 has been done and creates code for doing 3 through 5.
Coding suggestion
ffmpeg
to extract clips in a temporary folder and onceffmpeg
exists, associate the clips with a new capture for the stream. Also, as new clip ids are created send clip file to storage server.Rasbari server probably doesn't yet have
ffmpeg
- an apt install might be necessary.For
ffmpeg
command, please refer to existing nimki code. Most likely,video->clip
conversion command will be a variation of:FFMpeg website has great tutorials and it might be necessary to also use
ffprobe
as you write this code.