[FFmpeg-user] Can't get TLS to work

Rony Pony rony1623 at gmail.com
Tue Aug 4 02:18:18 CEST 2015


Ok so finally figured things out. Protocol not found indeed was happening
because TLS was not supported in the ffmpeg version I was using (2.6.3).
Once I updated to the latest snapshot, it then worked good (except video
goes slow for a few seconds, and then all starts going well as expected).

Here are the commands to use.

On server:
ffmpeg -re -i video.api -vcodec libx264 -f mpegts "tls://
0.0.0.0:5000?listen&cert=server.crt&key=server.key"

On client:
ffplay tls://<server IP>:5000

On Fri, Jul 31, 2015 at 9:24 PM, Rony Pony <rony1623 at gmail.com> wrote:

> Yes the server.crt and server.key files are in the directory from where
> ffmpeg is called.
>
> Quotes do get things a little further, but they result in the protocol not
> found error on the server side (see below).
>
> Any other ideas? Have you found a way to use tls with ffmpeg/ffplay?
> Please let me know thanks!
>
> ---
>
> ffmpeg -re -i bikeraceshort.h264 -vcodec libx264 -f mpegts "tls://
> 10.4.4.189:5000?listen&cert=server.crt&key=server.key"
>
> ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
>
>   built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
>
>   configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.3 --enable-shared
> --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
> --enable-avresample --cc=clang --host-cflags= --host-ldflags=
> --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid
> --enable-ffplay --enable-vda
>
>   libavutil      54. 20.100 / 54. 20.100
>
>   libavcodec     56. 26.100 / 56. 26.100
>
>   libavformat    56. 25.101 / 56. 25.101
>
>   libavdevice    56.  4.100 / 56.  4.100
>
>   libavfilter     5. 11.102 /  5. 11.102
>
>   libavresample   2.  1.  0 /  2.  1.  0
>
>   libswscale      3.  1.101 /  3.  1.101
>
>   libswresample   1.  1.100 /  1.  1.100
>
>   libpostproc    53.  3.100 / 53.  3.100
>
> Input #0, h264, from 'bikeraceshort.h264':
>
>   Duration: N/A, bitrate: N/A
>
>     Stream #0:0: Video: h264 (High), yuv420p, 640x360 [SAR 1:1 DAR 16:9],
> 25 fps, 25 tbr, 1200k tbn, 50 tbc
>
> tls://10.4.4.189:5000?listen&cert=server.crt&key=server.key: Protocol not
> found
>
>
> On Fri, Jul 31, 2015 at 4:30 PM, Moritz Barsnick <barsnick at gmx.net> wrote:
>
>> On Fri, Jul 31, 2015 at 09:47:08 -0700, Rony Pony wrote:
>> > ffmpeg -re -i bikerace.mkv -vcodec libx264 -f mpegts tls://
>> 0.0.0.0:5000?listen&cert=server.crt&key=server.key
>> > [8] 594
>> > [9] 595
>>
>> You need to protect the '&' from the shell, by quoting or escaping.
>>
>> $ ffmpeg -re -i bikerace.mkv -vcodec libx264 -f mpegts "tls://
>> 0.0.0.0:5000?listen&cert=server.crt&key=server.key"
>>
>> Your ffmpeg has access to those server.crt and server.key?
>>
>> Moritz
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>
>


More information about the ffmpeg-user mailing list