How to correctly encode .mp4 files for streaming
生活随笔
收集整理的這篇文章主要介紹了
How to correctly encode .mp4 files for streaming
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近為了在ubuntu上搭建流媒體服務器,目的是為了在ipad上觀看電腦上的視頻并且不用將視頻文件下載到本地,這是找到的編碼相關的資料~
For HTTP pseudo-streaming to iPhones, and RTSP streaming to other mobiles, .mp4 files need to be correctly encoded.?
Normally a .mp4 file has its data information included at the end which, if streamed, would require the entire video to be downloaded before playback can begin.?
Videos can be correctly encoded using ffmpeg but for a less stressful process, using a graphical interface, install Handbrake. Unfortunately there is no longer .deb package available for Ubuntu, but the?PPA?may be added to Synaptic:?
deb http://ppa.launchpad.net/stebbins/handbrake-snapshots/ubuntu lucid main
deb-src http://ppa.launchpad.net/stebbins/handbrake-snapshots/ubuntu lucid main?
with the signing key: 1024R/816950D8?
Or use:?
~$ sudo add-apt-repository ppa:stebbins/handbrake-snapshots?
Update the package list:?
~$ sudo aptitude update?
and install Handbrake?
~$ sudo aptitude install handbrake?
Handbrake will now be available in “Applications > Sound & Video > HandBrake”?
Choose the output format that you require, making sure to select the “Web Optimized” box as well.?
To complete the encoding time data must now be added to the .mp4 file. Install MP4Box using:?
~$ sudo aptitude install gpac?
and run:?
~$ MP4Box -hint YOURFILENAME.mp4?
The .mp4 file can now be uploaded to the server for streaming??
If you are using HTTP streaming, for instance to an iPhone, ensure that your server does not have the Apache module “mod_h264_streaming” enabled as this interferes with HTTP progressive block requests.
轉載于:https://www.cnblogs.com/gigbit/archive/2013/05/04/3059735.html
總結
以上是生活随笔為你收集整理的How to correctly encode .mp4 files for streaming的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OpenCV条码(6)简单实现
- 下一篇: javascript省市三层联动,修改