imatge-upc / egocentric-2016-saliency

Research on the prediction of visual saliency in egocentric vision.
http://imatge-upc.github.io/egocentric-2016-saliency/
6 stars 3 forks source link

Extract frames from the Tobi video #7

Open xavigiro opened 8 years ago

xavigiro commented 8 years ago

Learn how to conveniently extract frames from the video sequence providede by Tobi glasses. Check Sergi Imedio's thesis as well as 'srun' command to be used in GPI servers.

monicachs commented 8 years ago

This is the command to extract frame each 30 seconds:

ffmpeg -i (input_video) -vf fps=1/30 (output_images)

xavigiro commented 8 years ago

In today's meeting we agreed that we would sample videos at 1 frame per second. This should bring us to a total amount of 18,000 frames, which are comparable to the 20,000 frames used by Kevin McGuinness to train SaliNet on the SALICON dataset.

monicachs commented 8 years ago

I am using the next command for extract frames of a video. With an example that I have, the command works but with this video it doesn't work.

srun -w c8 --pty --gres=gpu:1 ffmpeg -i truita.avi -vf fps=3 frame_%05d.png

The error that appears is:

ffmpeg version 2.2 Copyright (c) 2000-2014 the FFmpeg developers built on Apr 1 2014 16:41:12 with gcc 4.7 (Debian 4.7.2-5) configuration: --prefix=/usr/local --enable-gpl --disable-yasm --enable-shared --enable-libv4l2 --enable-libx264 --enable-x11grab libavutil 52. 66.100 / 52. 66.100 libavcodec 55. 52.102 / 55. 52.102 libavformat 55. 33.100 / 55. 33.100 libavdevice 55. 10.100 / 55. 10.100 libavfilter 4. 2.100 / 4. 2.100 libswscale 2. 5.102 / 2. 5.102 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 [avi @ 0x255d940] Could not find codec parameters for stream 0 (Video: none (TGVD / 0x44564754), 640x480): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options truita.avi: could not find codec parameters srun: error: c8: task 0: Exited with exit code 1

agilmor commented 8 years ago

Hi Mònica,

It seems a pure ffmpeg problem, totally unrelated to srun, right? In fact, to run this command you can just this way:

>> srun --pty ffmpeg -i truita.avi -vf fps=3 frame_%05d.png

Anyway, the important part of the error is: [avi @ 0x255d940] Could not find codec parameters for stream 0 (Video: none (TGVD / 0x44564754), 640x480): unknown codec. There are several option for this kind of error:

I'm not sure what is your case... But please ensure that the file name is correct, check that the file size is an expected size, try ffmpeg with other well known avi files... and if everything is ok, then let's google for this specific codec for ffmpeg...?

Albert

PS: I still think that this kind of issues are better handled in our internal trac?

xavigiro commented 8 years ago

Hi Monica,

please check the source code and scripts from Sergi Imedio. He extracted these frames with ffmpeg on our machines and from videos generated from these glasses.

Do you have those scripts or maybe you do not know where to find them ?