使用Red5和FFMpeg搭建在线Flash流媒体分享平台

最近视频的东西比较火,前些天我也稍微了解了一下使用开源软件建在线Flash流媒体播放平台的解决方案,还是有一些收获。

Red5是一款基于java的开源的Flash流媒体Server软件,可以作为取代Macromedia提供的商业版本FMS。Red5使用RSTP作为流媒体传输协议,内置了一些示例,这些示例实现了在线录制,flash流媒体播放,在线聊天,视频会议等一些基本的功能。由于系统本身是开源的,在碰到问题的时候也比较容易解决,大不了直接改代码,在成本方面也可以省下一笔不小的开销,为未来的功能扩展也提供了充分的空间。

如果仅仅是实现在线录制,在线播放,那么Red5也就差不多够了,但可能我们有时候还需要用户上传自己拍摄的视频文件,而要把这些视频文件转成可播放的flv文件就需要视频编码软件了。FFMpeg提供了录制,播放,视频流处理的完整解决方案。它自身也带了一个基于HTTP的流媒体广播程序以及其它几个实用的程序,但我们的重点还是它的视频转换程序,似乎Google Video也是用的它的程序作为视频转换工具。

我用FFMpeg转了几个视频,效果还可以,在声音上碰到了一些问题,在不添加参数的情况下,有一部分视频的声音会有问题,有的视频无论怎么添加参数,都出不来声音,报错提示的是不支持所带的声音采样格式,只支持几种固定的格式,我看了一下代码,确实是这样子,但理论上应该是能够解决的。FFMpeg自带的libavcodec是一套很牛的编码库,为了保证质量和性能,里面的很多codec都是从头开发的。

这两个加起来,实现一些简单的在线视频功能就差不多了。

PS:今天刚看到古永锵也开始做小视频分享网站:优酷。

Subscribe

Related articles

Interpreting Marriage in Dreams: Good or Bad

Dreaming of marriage can symbolize unity or commitment in waking life. It may reflect a desire for partnership or emotional fulfillment. However, it could also represent anxieties about commitment or fears of loss of freedom. Remember that dream interpretations are subjective and can vary based on personal beliefs and experiences.

Romantic NYC Date Ideas: 10 Perfect Spots to Impress Your Date

Looking for a special date idea in NYC? From picnics in Central Park to sunset cocktails in Brooklyn, there are countless romantic spots to explore with your special someone. Let's discover the best options for an unforgettable date night in the Big Apple.

Who Should Attend the Bridal Shower? Your Complete Guide

The bridal shower is a special occasion where the bride is surrounded by her close family and friends. Traditionally, the guest list includes the bridal party, close relatives, and female friends who will celebrate with the bride ahead of her big day.

Ultimate Bach Party Gifts for the Bride-to-Be

Are you looking for the perfect gifts to celebrate the bride-to-be at her bachelorette party? From personalized items to pampering sets, we have the top picks to make her feel special before her big day.

Unveiling the Mystery: What is a Promise Ring and Its Romantic Significance

A promise ring is a symbol of commitment between couples. It represents a promise to be faithful and to one day marry. It is a romantic gesture that signifies a deep and meaningful relationship.

Enchanting Veil Hairstyles to Complete Your Bridal Look

Discover the elegance and romance of veil hairstyles. From soft waves to intricate updos, veils can be the perfect addition to any bridal look.

Unveiling the Magic of a Day-of Coordinator

A day of coordinator is like a behind-the-scenes magician, ensuring that every detail of your special day runs smoothly. They orchestrate the events with grace and precision, so you can focus on the romance and joy of your wedding day.

Unveiling the Magic of a Bridal Shower: What You Need to Know

A bridal shower is a cherished pre-wedding tradition where the bride-to-be is showered with love, gifts, and well wishes from close friends and family. It's a time for celebration and laughter as the bride prepares for her big day.
spot_imgspot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here