[FFmpeg-devel] [PATCH] avformat/hlsenc: added HLS encryption

Michael Niedermayer michaelni at gmx.at
Wed Feb 11 21:20:30 CET 2015

On Wed, Feb 11, 2015 at 03:06:42PM +0000, Christian Suloway wrote:
> bumping this thread
> On 2/3/15, 9:54 AM, "Christian Suloway" <csuloway at globaleagleent.com>
> wrote:
> >Updated patch is attached.
> >
> >On 1/10/15, 3:06 PM, "Michael Niedermayer" <michaelni at gmx.at> wrote:
> >>
> >>i got it working after a few tries but
> >>please provide an example that works and documentation that describes
> >>the feature in a way sufficient to use it without reading the code
> >>ideally add a example to the documentation too
> >
> >The documentation and commit message have been updated. Let me know if
> >further clarification is needed.
> >
> >>also the parser is fragile it requires to carefully place newlines
> >>or it will fail, i think the previous strcspn() code was better if it
> >>avoided that, i didnt realize this
> >
> >I have reverted this section to the previous strcspn() code.
> >
> >Thanks,
> >Christian
> >

>  doc/muxers.texi      |   44 ++++++++++++++++++
>  libavformat/hlsenc.c |  121 +++++++++++++++++++++++++++++++++++++++++++++++++--
>  2 files changed, 162 insertions(+), 3 deletions(-)
> facd5711f218fd8d5337e64048c59ac309909d1a  0001-avformat-hlsenc-added-HLS-encryption.patch
> From 9eb57bfb0e29f3520459b42d915f0e7fc25abb27 Mon Sep 17 00:00:00 2001
> From: Christian Suloway <csuloway at globaleagleent.com>
> Date: Mon, 2 Feb 2015 23:39:13 -0600
> Subject: [PATCH] avformat/hlsenc: added HLS encryption
> Added HLS encryption with -hls_key_info_file <key_info_file> option. The
> first line of key_info_file specifies the key URI written to the
> playlist. The key URL is used to access the encryption key during
> playback. The second line specifies the path to the key file used to
> obtain the key during the encryption process. The key file is read as a
> single packed array of 16 octets in binary format. The optional third
> line specifies the initialization vector (IV) as a hexadecimal string to
> be used instead of the segment sequence number (default) for encryption.
> Changes to key_info_file will result in segment encryption with the new
> key/IV and an entry in the playlist for the new key URI/IV.
> Key info file format:
> <key URI>
> <key file path>
> <IV> (optional)
> Example key URIs:
> http://server/file.key
> /path/to/file.key
> file.key
> Example key file paths:
> file.key
> /path/to/file.key
> Example IV:
> 0123456789ABCDEF0123456789ABCDEF
> Example:
> ffmpeg -f lavfi -i testsrc -c:v h264 -hls_key_info_file file.keyinfo
> foo.m3u8
> file.keyinfo:
> http://server/file.key
> /path/to/file.key
> 0123456789ABCDEF0123456789ABCDEF

please provide a example which works
this is not an example its a description of how to create an example
I mean example in the sense that its bytes when given to the right
program like /bin/sh will do something not a description that needs
a human to interpret it first.

as is it might take 5 or 10 min to turn this text into some actual
example and testcase and theres no reason why when this is tested
again in 6 month the same testcase would be created by a human
and if its not the same testcase we would not know if something broke
if it no longer works or if we just failed to re create the testcase
IMO its important to have a reproduceable example/testcase


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150211/2bdaca32/attachment.asc>

More information about the ffmpeg-devel mailing list