[FFmpeg-user] webm muxer (-f webm) seems slow

Jun Jie Pang junjiepang at gmail.com
Wed Feb 12 03:24:19 CET 2014


On Wed, Feb 12, 2014 at 3:07 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Jun Jie Pang <junjiepang <at> gmail.com> writes:
>
> > It seems that the muxer (-f webm) is delaying my video.
> > There is a 1-2 second delay... Even on local machine.
>
> Is this reproducible with ffmpeg (the application)?
> If yes, please provide your command line and the complete,
> uncut console output.
>
> Carl Eugen
>
>
My nodeJS application will run a ffmpeg process(ffmpeg application) when a
video is requested from the client. It'll run the command line as the
following:

"$ffmpeg -f x11grab -framerate 60 -s 1280x720 -i :2.0 -vcodec libvpx -vb
1500k -minrate 1500k -maxrate 1500k -threads 11 -rt_bufsize 0 -bufsize 0
-deadline realtime -cpu-used -5 -threads 11 -fflags nobuffer -avioflags
direct -max_delay 0 -muxdelay 0 -muxpreload 0 -f webm -"
The final - is so that i can pipe the video out from nodejs.

-----------------------------------------------------------------------------------------------------------
Below is the log captured from streaming to the client

node app_2.js
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for
alternatives
connect.limit() will be removed in connect 3.0
Express server listening on port 3002
GET / 304 13ms
ffmpeg version git-2014-01-22-94a5241 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Feb 12 2014 01:35:05 with gcc 4.4.7 (GCC) 20120313 (Red Hat
4.4.7-4)
  configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac
--enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-x11grab --enable-libtheora
  libavutil      52. 63.100 / 52. 63.100
  libavcodec     55. 48.102 / 55. 48.102
  libavformat    55. 25.101 / 55. 25.101
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  1.100 /  4.  1.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[x11grab @ 0x2aac080] device: :2.0 -> display: :2.0 x: 0 y: 0 width: 1280
height: 720
[x11grab @ 0x2aac080] shared memory extension found
Input #0, x11grab, from ':2.0':
  Duration: N/A, start: 1392170981.732652, bitrate: 1769472 kb/s
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x720,
1769472 kb/s, 60 tbr, 1000k tbn, 60 tbc
[libvpx @ 0x2ac4480] v1.3.0
Output #0, webm, to 'pipe:':
  Metadata:
    encoder         : Lavf55.25.101
    Stream #0:0: Video: vp8 (libvpx), yuv420p, 1280x720, q=-1--1, 1500
kb/s, 1k tbn, 60 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> libvpx)
Press [q] to stop, [?] for help
frame=   32 fps=0.0 q=0.0 size=     166kB time=00:00:00.56
bitrate=2407.8kbits/s
frame=   62 fps= 62 q=0.0 size=     253kB time=00:00:01.06
bitrate=1947.4kbits/s
frame=   92 fps= 61 q=0.0 size=     286kB time=00:00:01.56
bitrate=1497.4kbits/s
frame=  122 fps= 61 q=0.0 size=     318kB time=00:00:02.06
bitrate=1262.5kbits/s
frame=  153 fps= 61 q=0.0 size=     560kB time=00:00:02.58
bitrate=1774.2kbits/s
frame=  183 fps= 60 q=0.0 size=     655kB time=00:00:03.10
bitrate=1729.7kbits/s
frame=  213 fps= 60 q=0.0 size=     688kB time=00:00:03.60
bitrate=1566.6kbits/s
frame=  243 fps= 60 q=0.0 size=     756kB time=00:00:04.10
bitrate=1509.9kbits/s
frame=  273 fps= 60 q=0.0 size=     971kB time=00:00:04.60
bitrate=1729.3kbits/s
frame=  304 fps= 60 q=0.0 size=    1004kB time=00:00:05.11
bitrate=1606.7kbits/s
frame=  325 fps= 58 q=0.0 size=    1105kB time=00:00:05.63
bitrate=1606.2kbits/s
frame=  335 fps= 55 q=0.0 size=    1250kB time=00:00:06.13
bitrate=1670.3kbits/s
frame=  366 fps= 56 q=0.0 size=    1404kB time=00:00:06.65
bitrate=1730.0kbits/s
frame=  396 fps= 56 q=0.0 size=    1709kB time=00:00:07.15
bitrate=1958.1kbits/s
frame=  427 fps= 56 q=0.0 size=    1775kB time=00:00:07.66
bitrate=1896.5kbits/s
frame=  457 fps= 56 q=0.0 size=    1849kB time=00:00:08.16
bitrate=1855.1kbits/s
frame=  488 fps= 57 q=0.0 size=    1925kB time=00:00:08.68
bitrate=1816.0kbits/s
frame=  518 fps= 57 q=0.0 size=    2231kB time=00:00:09.18
bitrate=1990.1kbits/s
GET /video.webm 200 9266ms
frame=  522 fps= 57 q=0.0 Lsize=    2256kB time=00:00:09.25
bitrate=1998.1kbits/s dup=0 drop=3
video:2251kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.210975%
Received signal 15: terminating.

Thank you
Regards
Jun Jie

> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list