Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using FFMPEG for online video hosting

Tags:

html

php

ffmpeg

I've been looking around for using FFMPEG and PHP. I've noticed you can use FFMPEG with HTML5. I've read the documentation of the FFMPEG's website and it's far beyond my knowledge. I have an open source document of a 'premade' .php file that stores the information to the database and tells it to execute to the ffmpeg function. However, they use mp4box and FLVtool2.

The array's of video size, frame rates, etc. are quite easy to understand. When designing this from scratch I really have not idea where to start.

I've defined the variables that will be recorded once the file is uploaded, thereafter, checking to see if the file exists and recording it the database.

The real question is using mp4box and flvtool2 to convert all videos right to .flv so you can use flowplayer or jwplayer then telling to convert.

EDIT: Sorry to edit, I've seen many posts about the same question but they all relate to old versions of the software, will the php carry over to newer versions (probably could find out on their website if they had a more in depth HOWTO for website streaming)

like image 359
Kyle Monti Avatar asked Nov 05 '22 06:11

Kyle Monti


1 Answers

I'm not sure I completely understand your question but I'll do my best to give you useful information.

I've noticed you can use FFMPEG with HTML5. I've read the documentation of the FFMPEG's website and it's far beyond my knowledge

HTML5 enabled browsers have a <video> tag that you can use to play a video on your site, the encoding depends on the browser, until now it was mainly H.264 but recently Google, Mozilla and others joined efforts on the WebM Project with the new VP8 codec.

The real question is using mp4box and flvtool2 to convert all videos right to .flv so you can use flowplayer or jwplayer then telling to convert.

flowplayer and other flash based video streaming players use the FLV format, which has (at least on latest flash players) as underlying encoding the same H.264.

  • FFMPEG can convert videos to FLV so you can use it along side with flowplayer.
  • flvtool2 is for reading and writing FLV metadata (duration and others) from and to the file.

So, you can use this tools to create your videos an stream them through flowplayer.

More info on FFMPEG and x264 and on Converting to FLV with FFMPEG

like image 53
dcestari Avatar answered Nov 09 '22 03:11

dcestari