Welcome Guest, Not a member yet? Register   Sign In
Get the length and thumbnail of a video?
#1

[eluser]Sky Warden[/eluser]
Sorry if it's not the thing CI does, but I wonder if you can get the length of a video or even maybe get the thumbnail with Code Igniter.

I've read the file uploading class and file helper in the documentation, but I found there's no array items related to video. We can get image information such as width, so I wonder if we can get the information of video file using Code Igniter. Maybe get a thumbnail of the video?

I'm sorry if CI isn't the thing you use for this need, but I really have no idea on how to do it. Smile
#2

[eluser]TheFuzzy0ne[/eluser]
CodeIgniter doesn't support this functionality natively, but you can extend it so it does. Image width and height is only supported when you upload an image.
#3

[eluser]Sky Warden[/eluser]
[quote author="TheFuzzy0ne" date="1364126203"]CodeIgniter doesn't support this functionality natively, but you can extend it so it does. Image width and height is only supported when you upload an image.[/quote]
Recently I decided to use FFmpeg to get the thumbnails, but it doesn't work.
Code:
$command = 'ffmpeg -itsoffset -7 -i video/test.mp4 -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 thumbnails/test.jpg';

exec($command);

That syntax works with terminal (I'm using Linux), but not in PHP. I think it's a PHP question, not Code Igniter. Maybe I need to a kind of load ffmpeg first before I can use it, but I have no idea.




Theme © iAndrew 2016 - Forum software by © MyBB