[FFmpeg-user] ffserver to iOs and Android

Michele Polese michele.polese at gmail.com
Mon Sep 15 17:34:43 CEST 2014


Thank you very much for your reply. I commented that code in
libavformat/ffmenc.c and used the -override_ffserver option but on Chrome
(Android and Osx) I don't see anything. I attach ffserver.conf I'm using
and ffmpeg command output.
I am using a raspberry pi with raspbian and I compiled following these
instructions https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
What am I missing?
Thank you very much.
Michele Polese

P.S. I'm gonna give a try also to hls



2014-09-14 13:24 GMT+02:00 Stefano Sabatini <stefasab at gmail.com>:

> On date Sunday 2014-09-14 11:04:48 +0200, Michele Polese wrote:
> > I would like them too, thanks..
>
> About webm streaming with FFserver, I see two main problems.
>
> Since commit b543a29020232400537c3f9948f6eb2fd3b760a5 it is not
> possible to setup the CQ parameter to an invalid value, so that the
> libvpx encoder will fail with message:
> CQ level 0 must be between minimum and maximum quantizer value (2-31)
>
> This happens why it is not possible to set the crf private option from
> the ffserver configuration file (a similar problem happens with
> libx264 private option). So we need to extend the FFm format in order
> to support to set private options. The workaround is to use the ffmpeg
> -override_ffserver option.
>
> The second problem is related to the start time of the stream
> generated by the ffm muxer. In ffm_write_header() we have this code:
>     if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) {
>         int ret = av_parse_time(&ffm->start_time, t->value, 0);
>         if (ret < 0)
>             return ret;
>     }
>
> This will set the start_time depending on the creation_time metadata
> which is set by ffmpeg when sending the stream to ffserver. This
> start_time value will confuse both firefox and chromium. If you
> comment the code above in the ffm muxer the problem is apparently
> fixed and both browsers are able to play the webm content in
> real-time.
>
> > And for hls is this a good guide?
> >
> http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/
>
> I don't think so, it is pretty outdated and current FFmpeg contains
> two HLS muxers (hls and segment), which should be simpler to use.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
-------------- next part --------------
ffserver -d -f /etc/ffserver.conf &
[1] 31605
pi at raspberrypi ~ $ ffserver version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 15 2014 14:55:01 with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration: --prefix=/home/pi/ffmpeg_build --extra-cflags=-I/home/pi/ffmpeg_build/include --extra-ldflags=-L/home/pi/ffmpeg_build/lib --bindir=/home/pi/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
/etc/ffserver.conf:4: Port option is deprecated, use HTTPPort instead
/etc/ffserver.conf:8: BindAddress option is deprecated, use HTTPBindAddress instead
Mon Sep 15 15:25:25 2014 FFserver started.





ffmpeg -f video4linux2 -s 320x240 -r 25 -i /dev/video0 -vcodec libvpx -override_ffserver http://localhost:8090/0_webm.ffm
ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 15 2014 14:55:01 with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration: --prefix=/home/pi/ffmpeg_build --extra-cflags=-I/home/pi/ffmpeg_build/include --extra-ldflags=-L/home/pi/ffmpeg_build/lib --bindir=/home/pi/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
[video4linux2,v4l2 @ 0x2ea06e0] The driver does not allow to change time per frame
[video4linux2,v4l2 @ 0x2ea06e0] Time per frame unknown
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 1410794822.715178, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240, 30.50 tbr, 1000k tbn, 1000k tbc
Mon Sep 15 15:27:03 2014 127.0.0.1 - - New connection: POST /0_webm.ffm
[libvpx @ 0x2ead570] v1.3.0
Output #0, ffm, to 'http://localhost:8090/0_webm.ffm':
  Metadata:
    creation_time   : now
    encoder         : Lavf56.4.101
    Stream #0:0: Video: vp8 (libvpx), yuv420p, 320x240, q=-1--1, 200 kb/s, 25 fps, 1000k tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.1.100 libvpx
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> vp8 (libvpx))
Press [q] to stop, [?] for help
frame=    2 fps=0.0 q=0.0 size=      16kB time=00:00:00.08 bitrate=1638.4kbits/sframe=    3 fps=1.7 q=0.0 size=      16kB time=00:00:00.12 bitrate=1092.3kbits/sframe=    5 fps=2.0 q=0.0 size=      16kB time=00:00:00.20 bitrate= 655.4kbits/sframe=    7 fps=2.1 q=0.0 size=      16kB time=00:00:00.28 bitrate= 468.1kbits/sMon Sep 15 15:27:08 2014 [ffm @ 0x2433410]DTS 0 < 5240000 out of order
frame=    9 fps=1.7 q=0.0 size=      20kB time=00:00:00.36 bitrate= 455.1kbits/sMon Sep 15 15:27:09 2014 192.168.2.103 - - New connection: GET /0.webm
Mon Sep 15 15:27:09 2014 [webm @ 0x2439900]Codec for stream 0 does not use global headers but container format requires global headers
Mon Sep 15 15:27:09 2014 192.168.2.103 - - [GET] "/0.webm HTTP/1.1" 200 492
Mon Sep 15 15:27:09 2014 192.168.2.103 - - New connection: GET /0.webm
Mon Sep 15 15:27:09 2014 [webm @ 0x2441160]Codec for stream 0 does not use global headers but container format requires global headers
Mon Sep 15 15:27:09 2014 192.168.2.103 - - [GET] "/0.webm HTTP/1.1" 200 492
Mon Sep 15 15:27:09 2014 192.168.2.103 - - New connection: GET /0.webm
Mon Sep 15 15:27:09 2014 [webm @ 0x2441160]Codec for stream 0 does not use global headers but container format requires global headers
frame=   11 fps=1.9 q=0.0 size=      20kB time=00:00:00.44 bitrate= 372.4kbits/sframe=   13 fps=2.0 q=0.0 size=      20kB time=00:00:00.52 bitrate= 315.1kbits/sframe=   15 fps=2.0 q=0.0 size=      24kB time=00:00:00.60 bitrate= 327.7kbits/sframe=   16 fps=1.9 q=0.0 size=      24kB time=00:00:00.64 bitrate= 307.2kbits/sframe=   18 fps=2.0 q=0.0 size=      24kB time=00:00:00.72 bitrate= 273.1kbits/s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffserver.conf
Type: application/octet-stream
Size: 1733 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140915/92c980a9/attachment.obj>


More information about the ffmpeg-user mailing list