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. 012 pandas与matplotlib结合制图

    这里以后再补充. 1.折线图

  2. Python做性能测试-1、Locust基础篇

    前言:说起性能测试,大家想到的基本上都是工具jmeter和loadrunner多少也对执行性能测试的方式有一点认识,这些工具基本都实现了请求-响应-结果统计分析这样完整的测试链路,用户方面只需组织这些 ...

  3. 一个完整的Java程序示例

    (1) 第一个程序HelloWorld: package mypack; //相当于一个目录 public class HelloWorld{ public static void main(Stri ...

  4. SpringBoot使用Jsp

    本文是简单总结一下SpringBoot使用Jsp的Demo. 前言 在早期做项目的时候,JSP是我们经常使用的java服务器页面,其实就是一个简化servlet的设计,在本文开始之前,回顾一下jsp的 ...

  5. javascript 伪数组和转化为标准数组

    1: 什么是伪数组 伪数组是一个含有length属性的json对象, 它是按照索引的方式存储数据, 它并不具有数组的一些方法,只能能通过Array.prototype.slice转换为真正的数组,并且 ...

  6. [UOJ282]长度测量鸡

    思路: 数学归纳. 设最少所需刻度数为$s$,则$n和s$的关系为: $n=1,s=0;$ $n=2,s=1;$ $n=3,s=3;$ ... 观察发现$s=n(n-1)/2$,得到$sn$时,满足条 ...

  7. BZOJ4912 : [Sdoi2017]天才黑客

    建立新图,原图中每条边在新图中是点,点权为$w_i$,边权为两个字符串的LCP. 对字典树进行DFS,将每个点周围一圈边对应的字符串按DFS序从小到大排序. 根据后缀数组利用height数组求LCP的 ...

  8. BZOJ4076 : [Wf2014]Maze Reduction

    设$f[i][j][k]$表示从房间$j$的第$k$扇门进去探索不超过$i$步的情况. 对于$0$步的情况,可以用每个房间的度数来表示. 否则可以绕着那个房间走一圈,将所有情况依次hash来表示. 最 ...

  9. 暗之的锁链 [COGS2434] [树上差分]

    Description 无向图中有N个节点和两类边,一类边被称为主要边,而另一类被称为附加边.Dark有N – 1条主要边,并且Dark的任意两个节点之间都存在一条只由主要边构成的路径.另外,Dark ...

  10. 微信公众号开发之通过获取token等信息

    <?php /** * 发送post请求 * @param string $url * @param string $param * @return bool|mixed */ function ...