[libav-tools] Looking for HTTP authentication solution for fragmented streaming (HTTP)

Joshua Rubingh joshua at jet-stream.nl
Fri Aug 23 09:10:28 CEST 2013

On 20/08/13 09:53, Anton Khirnov wrote:
> On Mon, 19 Aug 2013 14:49:20 +0200, Joshua Rubingh <joshua at jet-stream.nl> wrote:
>> Hi all,
>> I looked for two days for a solution for the following problem.
>> We have a system setup that uses avconv tool that pushes a live stream
>> to a streaming server that supports HTTP fragmented streaming
>> (Unified-Streaming.com). It is using the ismv muxer.
>> We need to secure the streaming server so that only authenticated users
>> / encoders can push the server. We thought that basic HTTP
>> authentication should be sufficient enough. And that is supported by
>> Microsoft Expression Encoder :( but not by avconv software.
>> Expression encoder does do a HTTP basic authentication and is allowed to
>> stream.
>> With avconv we tried to put the username and password in the publishing
>> url, hoping that this works like a browser can authenticate.
>> So we tried the following url:
>> http://username:password@streaming.server.com/test/publisingpoint.isml
>> That did not work.
> That is strange, since http auth should be supported using this syntax.
> You should investigate this further, try dumping the headers avconv sends in
> this case.
See this output. It does not do a HTTP basic authentication.
Post command of FFMPEG:

Transfer-Encoding: chunked
User-Agent: Lavf55.2.0
Accept: */*
Connection: close
Host: usp.origin2.trunk.jgr.devel.jet-stream.nl




....uuid...0...../.. ..f....<?xml version="1.0" encoding="utf-8"?>
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
<meta name="creator" content="Lavf55.2.0" />
<video systemBitrate="477000">
<param name="systemBitrate" value="477000" valuetype="data"/>
<param name="trackID" value="1" valuetype="data"/>
<param name="CodecPrivateData" 
<param name="FourCC" value="H264" valuetype="data"/>
<param name="MaxWidth" value="368" valuetype="data"/>
<param name="MaxHeight" value="152" valuetype="data"/>
<param name="DisplayWidth" value="368" valuetype="data"/>
<param name="DisplayHeight" value="152" valuetype="data"/>
<video systemBitrate="331000">
<param name="systemBitrate" value="331000" valuetype="data"/>
<param name="trackID" value="2" valuetype="data"/>
<param name="CodecPrivateData" 
B2" valuetype="data"/>
<param name="FourCC" value="H264" valuetype="data"/>
<param name="MaxWidth" value="288" valuetype="data"/>
<param name="MaxHeight" value="120" valuetype="data"/>
<param name="DisplayWidth" value="288" valuetype="data"/>
<param name="DisplayHeight" value="120" valuetype="data"/>
<video systemBitrate="230000">
<param name="systemBitrate" value="230000" valuetype="data"/>
<param name="trackID
" value="3" valuetype="data"/>
<param name="CodecPrivateData" 
<param name="FourCC" value="H264" valuetype="data"/>
<param name="MaxWidth" value="224" valuetype="data"/>
<param name="MaxHeight" value="92" valuetype="data"/>
<param name="DisplayWidth" value="224" valuetype="data"/>
<param name="DisplayHeight" value="92" valuetype="data"/>
<audio systemBitrate="64000">
<param name="systemBitrate" value="64000" valuetype="data"/>
<param name="trackID" value="4" valuetype="data"/>
<param name="FourCC" value="AACL" valuetype="data"/>
<param name="CodecPrivateData" value="1210" valuetype="data"/>
<param name="AudioTag" value="255" valuetype="data"/>
<param name="Channels" value="2" valuetype="data"/>
<param name="SamplingRate" value="44100" valuetype="data"/>
<param name="BitsPerSample" value="16" valuetype="data"/>
<param name="PacketSize" value="4" valuetype="data"/>

.......[A Lot of data].........

HTTP/1.1 401 Authorization Required
Date: Wed, 21 Aug 2013 07:27:31 GMT
Server: Apache/2.2.14 (Ubuntu) DAV/2 IISMS/4.0 PHP/5.3.2-1ubuntu4.20 
with Suhosin-Patch
WWW-Authenticate: Basic realm="USP Live"
Vary: Accept-Encoding
Content-Length: 565
Connection: close
Content-Type: text/html; charset=iso-8859-1

<title>401 Authorization Required</title>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<address>Apache/2.2.14 (Ubuntu) DAV/2 IISMS/4.0 PHP/5.3.2-1ubuntu4.20 
with Suhosin-Patch Server at usp.origin2.trunk.jgr.devel.jet-stream.nl 
Port 80</address>

So is this a bug? Where to post it so it will be fixed?

Kind regards

More information about the libav-tools mailing list