dss和vlc和mp4creator,自己搭建rtp的cs框架

最近在研究RTSP协议,因此,基于Ubuntu系统,利用Darwin Streaming Server搭建了一个RTSP服务器。其实很简单。

1、将DarwinStreamingSrvr5.5.5-Linux.tar.gz解压缩:

tarx zvf DarwinStreamingSrvr5.5.5-Linux.tar.gz

2、在DarwinStreamingSrvrlinux-Linux目录下运行./Install,在安装过程中提示设置admin账号以及密码,使用这个帐号可以通过网页对DSS的配置进行管理

3、安装完之后通过http://<IPaddress>:1220可以访问DSS的配置页面,Streaming的文件默认位于server/usr/local/movies目录下


测试可以使用它自带的测试文件。把文件拷贝到/usr/local/movies下面。

可以利用vlc打开"网络串流"测试一下服务器能否正常工作:

rtsp://192.168.56.128/java.mp4


开始打开失败,wireshark抓包发现是rstp(vlc(windows上)和Dss(linux上) 之间)协商失败,错误码是415:Media type not supported.


网上所搜索发现是缺少对视频文件java.mp4进行"后处理"

下载mp4creator-win32-1.6.1e-pre.zip,解压得到MP4creator.exe,将这个文件拷贝到c:\windows路径下面.

开启windows的cmd


E:\install_software>mp4creator -v //检查MP4creator的可用性
usage: mp4creator  <options> <mp4-file>
  Options:
  -aac-old-file-format    Use old file format with 58 bit adts headers
  -aac-profile=[2|4]      Force AAC to mpeg2 or mpeg4 profile
  -allow-avi-files        Allow avi files
  -calcH263Bitrates       Calculate and add bitrate information
  -create=<input-file>    Create track from <input-file>
    input files can be of type: .263 .aac .ac3 .amr .mp3 .divx .mp4v .m4v .cmp .
xvid .chap
  -encrypt[=<track-id>]   Encrypt a track, also -E
  -extract=<track-id>     Extract a track
  -delete=<track-id>      Delete a track
  -force3GPCompliance     Force making the file 3GP compliant. This disables ISM
A compliance.
  -forceH263Profile=<profile> Force using H.263 Profile <profile> (default is 0)


  -forceH263Level=<level>     Force using H.263 level <level> (default is 10)
  -H263CbrTolerance=<value>   Define H.263 CBR tolerance of [value] (default: 10
%)
  -hint[=<track-id>]      Create hint track, also -H
  -interleave             Use interleaved audio payload format, also -I
  -list                   List tracks in mp4 file
  -make-isma-10-compliant Insert bifs and od tracks required for some ISMA playe
rs (also -i)
  -mpeg4-video-profile=<level> Mpeg4 video profile override
  -mtu=<size>             Maximum Payload size for RTP packets in hint track
  -optimize               Optimize mp4 file layout
  -payload=<payload>      Rtp payload type
                          (use 3119 or mpa-robust for mp3 rfc 3119 support)
  -rate=<fps>             Video frame rate, e.g. 30 or 29.97
  -qth=<height>           Set a new height for QuickTime display
  -qtw=<width>            Set a new width for QuickTime display
  -timescale=<ticks>      Time scale (ticks per second)
  -use64bits              Use for large files
  -use64bitstime          Use for 64 Bit times (not QT player compatible)
  -variable-frame-rate    Enable variable frame rate for mpeg4 video
  -verbose[=[1-5]]        Enable debug messages
  -version                Display version information




E:\install_software>mp4creator -list java.mp4// 查看原来的文件信息
Track   Type    Info
1       video   H264 Baseline@3.1, 421.166 secs, 397 kbps, 1024x768 @ 30.000047
fps
2       audio   MPEG-4 AAC LC, 421.209 secs, 126 kbps, 44100 Hz


E:\install_software>mp4creator -hint=1 java.mp4// hint 1
MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.trak[0].mdia.min
f.stbl.stsd.*.esds.decConfigDescr.objectTypeId
MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.trak[2].mdia.min
f.stbl.stsd.*.esds.decConfigDescr.objectTypeId


E:\install_software>mp4creator -hint=2 java.mp4 // hint 2
MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.trak[0].mdia.min
f.stbl.stsd.*.esds.decConfigDescr.objectTypeId
MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.trak[2].mdia.min
f.stbl.stsd.*.esds.decConfigDescr.objectTypeId
MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.trak[3].mdia.min
f.stbl.stsd.*.esds.decConfigDescr.objectTypeId


E:\install_software>mp4creator -list java.mp4 // 虽然前面两次hint都报错了,但是还是发现文件多了两个track,大功告成
Track   Type    Info
1       video   H264 Baseline@3.1, 421.166 secs, 397 kbps, 1024x768 @ 30.000047
fps
2       audio   MPEG-4 AAC LC, 421.209 secs, 126 kbps, 44100 Hz
3       hint    Payload H264 for track 1
4       hint    Payload mpeg4-generic for track 2


E:\install_software>

在把处理过的java.mp4拷贝到linux的 /usr/local/movies目录下,,,在vlc(windows )中可以播放了...


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MP4Creator Version 1.6.1e-pre - by Crypto/DVBPortal 01-Jan-2009 --------------------------------------------------------------------------- This release includes the following components, in the indicated folders: mp4creator.exe - the muxer component readme.txt - the file you are just reading COPYING - the copying license AUTHORS - the original authors --------------------------------------------------------------------------- About this release: MP4Creator is the command line mp4 multiplexer tool from the mpeg4ip project. Since the mpeg4ip projects has stopped in Sep-2007, several community patches have been created for mp4creator. This project consolidates all patches to the original project files, to have the latest version which includes all features developed so far. Wich are: Nero and Quicktime chapters patch By: Ullrich Poll鋒ne (pollaehne) - 2007-10-03 11:22 contains infos from HandBrake and gpac to create/delete/convert Nero and Quicktime(iTunes/iPod) chapter markers in MP4 files Support for QuickTime Display Aspect Ratio patch By: Mark T (tuber99) - 2007-10-22 15:46 There are two new command-line params when adding a video track: -qth=xxx and -qtw=xxx Fix for "Video track has no data size" patch By: Crypto - 2008-05-25 16:38 Encodes containing B-frames need a edts/elst box combination Fix for missing C++ 2005 Runtime Libs SP1 By: Crypto - 2008-07-06 11:52 Project settings changed for statically linked C++ runtime Feature added for AC-3 support as of ISO/IEC 14496-12 Annex F By: Crypto - 2008-10-02 11:52 allows to multiplex AC-3 multi channel tracks conforming to the newly released ISO/IEC 14496-12 Annex F Fix for track name display (AC-3 track) By: Crypto - 2009-01-01 12:48 AC-3 tracks shown now as "surround" Fix for garbled compressor name display in Quicktime (MAC-Version) By: Crypto - 2009-01-01 12:48 AVC video tracks show now as H.264 --------------------------------------------------------------------------- Installation: No installation required. Copy all files to a directory of your choice. All included binary files made by Crypto/DVBPortal are digitally signed. You should verify the signature before installing them, for your own protection against forgery. --------------------------------------------------------------------------- Usage: This is the command line mp4 multiplexer tool from the mpeg4ip project. It is used to multiplex streams to the MP4 container -or - to demultiplex streams from an existing MP4 file. The updated mp4creator project home is located here: http://sourceforge.net/projects/mp4creator The original mp4creator is part of the mpeg4ip project located here: http://sourceforge.net/projects/mpeg4ip Please make sure to check out the full-featured GUI mp4muxer for mp4creator located here: http://www.dvbportal.de/projects/mp4muxer Enjoy! --------------------------------------------------------------------------- History: 01-Jan-2009 Fix for track name display (AC-3 track) Fix for garbled compressor name display in Quicktime (MAC-Version) 02-Oct-2008 AC-3 support as of ISO/IEC 14496-12 Annex F added 06-Jul-2008 Version 1.6.1c Fix for missing C++ 2005 Runtime Libs SP1 30-Jun-2008 Version 1.6.1b Nero and Quicktime chapters patch Support for QuickTime Display Aspect Ratio patch 05-Jun-2008 Initial branch release Version 1.6.1a Fix for "Video track has no data size" patch Any comments and feature requests are welcome. Please use our forum http://dvbportal.dyn1.de/forum ###
流媒体添加索引 usage: MP4Creator <options> <mp4-file> Options: -aac-old-file-format Use old file format with 58 bit adts headers -aac-profile=[2|4] Force AAC to mpeg2 or mpeg4 profile -allow-avi-files Allow avi files -calcH263Bitrates Calculate and add bitrate information -create=<input-file> Create track from <input-file> input files can be of type: .263 .aac .amr .mp3 .divx .mp4v .m4v .cmp .xvid -encrypt[=<track-id>] Encrypt a track, also -E -extract=<track-id> Extract a track -delete=<track-id> Delete a track -force3GPCompliance Force making the file 3GP compliant. This disables ISM A compliance. -forceH263Profile=<profile> Force using H.263 Profile <profile> (default is 0) -forceH263Level=<level> Force using H.263 level <level> (default is 10) -H263CbrTolerance=<value> Define H.263 CBR tolerance of [value] (default: 10 %) -hint[=<track-id>] Create hint track, also -H -interleave Use interleaved audio payload format, also -I -list List tracks in mp4 file -make-isma-10-compliant Insert bifs and od tracks required for some ISMA playe rs (also -i) -mpeg4-video-profile=<level> Mpeg4 video profile override -mtu=<size> Maximum Payload size for RTP packets in hint track -optimize Optimize mp4 file layout -payload=<payload> Rtp payload type (use 3119 or mpa-robust for mp3 rfc 3119 support) -rate=<fps> Video frame rate, e.g. 30 or 29.97 -timescale=<ticks> Time scale (ticks per second) -use64bits Use for large files -use64bitstime Use for 64 Bit times (not QT player compatible) -variable-frame-rate Enable variable frame rate for mpeg4 video -verbose[=[1-5]] Enable debug messages -version Display version information
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值