Darwin Streaming Server中mp4文件点播失败,通过抓包发现服务器返回”415 Unsupported Media Type“错误,如下:

RTSP/1.0  Unsupported Media Type

Server: DSS/6.0. (Build/526.3; Platform/Linux; Release/Darwin Streaming Server; State/Development; )

Cseq: 

Connection: Close

解决方案如下:

用mp4box来hint文件

yingc@yingc:~/media/video$ MP4Box  h.mp4 -info
* Movie Info *
Timescale - Duration ::35.062
Fragmented File no - track(s)
File Brand mp42 - version
Created: GMT Sun Jul :: File has root IOD ( bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: ISO Reserved Profile (0x7f)
Audio PL: High Quality Audio Profile @ Level (0x0f)
No streams included in root OD iTunes Info:
Encoder Software: tv.sohu.com v3.3.0 Track # Info - TrackID - TimeScale - Duration ::34.920
Media Info: Language "Undetermined" - Type "vide:avc1" - samples
Visual Track layout: x= y= width= height=
MPEG- Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size x
AVC Info: SPS - PPS - Profile Main @ Level
NAL Unit length bits: yingc@yingc:~/media/video$ MP4Box h.mp4 -hint
Hinting file with Path-MTU Bytes
Hinting track ID - Type "avc1:avc1" (H264) - BW kbps
Hinting track ID - Type "mp4a:mp4a" (mpeg4-generic) - BW kbps
Saving h.mp4: 0.500 secs Interleaving yingc@yingc:~/media/video$ ffprobe h.mp4
ffprobe version 2.2. Copyright (c) - the FFmpeg developers
built on Apr :: with gcc 4.6 (Ubuntu/Linaro 4.6.-1ubuntu5)
configuration: --prefix=/home/yingc/git/thirdparty/av/ffmpeg/output/ffmpeg_build/ --bindir=/home/yingc/git/thirdparty/av/ffmpeg/output/bin --extra-cflags=' -I/home/yingc/git/thirdparty/av/ffmpeg/output/ffmpeg_build/include' --extra-ldflags=-L/home/yingc/git/thirdparty/av/ffmpeg/output/ffmpeg_build/lib --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab --disable-stripping --enable-extra-warnings --disable-optimizations --enable-openssl --enable-static --enable-debug=
libavutil . 66.100 / . 66.100
libavcodec . 52.102 / . 52.102
libavformat . 33.100 / . 33.100
libavdevice . 10.100 / . 10.100
libavfilter . 2.100 / . 2.100
libswscale . 5.102 / . 5.102
libswresample . 18.100 / . 18.100
libpostproc . 3.100 / . 3.100
Input #, mov,mp4,m4a,3gp,3g2,mj2, from 'h.mp4':
Metadata:
major_brand : mp42
minor_version :
compatible_brands: mp42isomavc1
creation_time : -- ::
encoder : tv.sohu.com v3.3.0
Duration: ::35.16, start: 0.000000, bitrate: kb/s
Stream #:(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x368, kb/s, fps, tbr, 90k tbn, tbc (default)
Metadata:
creation_time : -- ::
Stream #:(und): Audio: aac (mp4a / 0x6134706D), Hz, stereo, fltp, kb/s (default)
Metadata:
creation_time : -- ::
Stream #:(und): Data: none (rtp / 0x20707472), kb/s (default)
Metadata:
creation_time : -- ::
handler_name : GPAC ISO Hint Handler
Stream #:(und): Data: none (rtp / 0x20707472), kb/s (default)
Metadata:
creation_time : -- ::
handler_name : GPAC ISO Hint Handler
Unsupported codec with id for input stream
Unsupported codec with id for input stream

unhint文件:

yingc@yingc:~/media/video$ MP4Box  h.mp4 -unhint
Removing hint track ID
Removing hint track ID
Saving h.mp4: 0.500 secs Interleaving yingc@yingc:~/media/video$ ffprobe h.mp4
ffprobe version 2.2. Copyright (c) - the FFmpeg developers
built on Apr :: with gcc 4.6 (Ubuntu/Linaro 4.6.-1ubuntu5)
configuration: --prefix=/home/yingc/git/thirdparty/av/ffmpeg/output/ffmpeg_build/ --bindir=/home/yingc/git/thirdparty/av/ffmpeg/output/bin --extra-cflags=' -I/home/yingc/git/thirdparty/av/ffmpeg/output/ffmpeg_build/include' --extra-ldflags=-L/home/yingc/git/thirdparty/av/ffmpeg/output/ffmpeg_build/lib --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab --disable-stripping --enable-extra-warnings --disable-optimizations --enable-openssl --enable-static --enable-debug=
libavutil . 66.100 / . 66.100
libavcodec . 52.102 / . 52.102
libavformat . 33.100 / . 33.100
libavdevice . 10.100 / . 10.100
libavfilter . 2.100 / . 2.100
libswscale . 5.102 / . 5.102
libswresample . 18.100 / . 18.100
libpostproc . 3.100 / . 3.100
Input #, mov,mp4,m4a,3gp,3g2,mj2, from 'h.mp4':
Metadata:
major_brand : mp42
minor_version :
compatible_brands: mp42isomavc1
creation_time : -- ::
encoder : tv.sohu.com v3.3.0
Duration: ::35.02, start: 0.000000, bitrate: kb/s
Stream #:(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x368, kb/s, fps, tbr, 90k tbn, tbc (default)
Metadata:
creation_time : -- ::
Stream #:(und): Audio: aac (mp4a / 0x6134706D), Hz, stereo, fltp, kb/s (default)
Metadata:
creation_time : -- ::

参考:

用mp4box来hint文件的操作很简单

Darwin Streaming Server服务器mp4文件点播返回”415 Unsupported Media Type“错误的更多相关文章

  1. request 报错The remote server returned an error: (415) Unsupported Media Type.

    开发时遇到个问题,程序访问数据库数据,给服务器发送请求时,老是报错,返回的错误页面是: HTTP Status 415 - Unsupported Media Type type Status rep ...

  2. System.Net.WebException : The remote server returned an error: (415) UNSUPPORTED MEDIA TYPE

    I am having problems with a bit of code that accesses a restful web service. Running this code, it e ...

  3. (转)CentOS6.5安装Darwin Streaming Server搭建RTSP流媒体服务器

    参考: 1,CentOS6.5安装Darwin Streaming Server搭建RTSP流媒体服务器 http://www.yimiju.com/articles/567.html

  4. Darwin Streaming Server 简介

    Darwin Streaming Server     概要 Darwin Streaming Server简称DSS.DSS是Apple公司提供的开源实时流媒体播放服务器程序.整个程序使用C++编写 ...

  5. Darwin Streaming Server 核心代码分析

    基本概念 首先,我针对的代码是Darwin Streaming Server 6.0.3未经任何改动的版本. Darwin Streaming Server从设计模式上看,采用了Reactor的并发服 ...

  6. Darwin Streaming Server 安裝操作備忘

    Darwin Streaming Server 安裝操作 Darwin Streaming Server是蘋果公司推出的開放源碼.跨平台多媒體串流伺服器, 提供音樂 (mp3) 與影音 (3gp.mp ...

  7. Linux编译安装Darwin Streaming Server 6.0.3

    买回来VPS后就一直想在上面搭建一个流媒体服务,在网上搜索了很多资料,大部分都是介绍Linux中安装Darwin Streaming Server 5.5.5版本,因为这个版本提供了针对linux的安 ...

  8. Darwin Streaming Server Relay Setting

    安装完Darwin Streaming Server,就可以使用VLC通过RTSP协议播放流媒体文件了.但是我现在有一个需求,需要将一台DSS(假设为A机)上的媒体文件发送到另一台DSS(假设为B机) ...

  9. Linux编译安装Darwin Streaming Server 6.0.3。。。

    目前主流的流媒体服务器有微软的windows media server.RealNetworks的Helixserver和苹果公司的Darwin Streaming Server. 微软的window ...

随机推荐

  1. List接口相对于Collection接口的特有方法

    [添加功能] 1 void add(int index,Object element); // 在指定位置添加一个元素. [获取功能] 1 Object get(int index); // 获取指定 ...

  2. Date类的使用

    [构造方法] 1)Date():无参构造 [代码] Date date = new Date(); System.out.println(date); 2)Date(long time):带参构造 [ ...

  3. 利用Flume将MySQL表数据准实时抽取到HDFS

    转自:http://blog.csdn.net/wzy0623/article/details/73650053 一.为什么要用到Flume 在以前搭建HAWQ数据仓库实验环境时,我使用Sqoop抽取 ...

  4. Web服务API

    Web服务API     内容 [ 隐藏 ]  1 概述 2个 services.php 3 详细教程 4 例子 5 另见 概观 Web服务API允许您将插件的功能(通常是外部函数)公开为Web服务. ...

  5. SPOJ RPLN (模板题)(ST算法)【RMQ】

    <题目链接> 题目大意:给你一段序列,进行q次区间查询,每次都输出询问区间内的最小值. 解题分析: RMQ模板题,下面用在线算法——ST算法求解.不懂ST算法的可以看这篇博客  >& ...

  6. poj 2502 Subway【Dijkstra】

    <题目链接> 题目大意: 某学生从家到学校之间有N(<200)条地铁,这个学生可以在任意站点上下车,无论何时都能赶上地铁,可以从一条地铁的任意一站到另一条地跌的任意一站,学生步行速度 ...

  7. Mysql:数据库导入导出

    Mysql:数据库导入导出 Mysql数据库导出 mysqldump -h IP -u 用户名 -p 数据库名 > 导出的文件名 1.mysqldump是在cmd下的命令,需要在linux命令行 ...

  8. js小函数工具

    突然想到建一片文章关于自己所学到的一些小函数,今后需要的时候可以直接当工具使用. 1.获取当前时间小程序. function showTime(){ var show_day=new Array('星 ...

  9. padding和margin设置成百分比

    Margin和Padding是我们在网页设计经常使用到的CSS样式,他们分别是间距和填充,一个作用于盒子外面,一个作用于盒子里面,默认的情况下,这些属性的值都会被计算在盒子的面积里面,在网页开发中的流 ...

  10. php5.4以下,json_encode不转义实现方法

    function json_encode($input){ // 从 PHP 5.4.0 起, 增加了这个选项. if(defined('JSON_UNESCAPED_UNICODE')){ retu ...