开发者

Using FFMPEG for online video hosting

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)


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


Your question can be much more clear. To my extent, FFmpeg can be used for .flv conversion. Also you are able to get the time duration, thumbnail for the videos and can be saved to your database. For instance:

C:> ffmpeg -i myvideo.mp4 -ar 22050 myvideo.flv

From FFMpeg video hosting, you are able to fetch the meta data of your videos too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜