[FFmpeg-user] ffmpeg: parallel encoding and cpu utilization.
theairkit
theairkit at gmail.com
Tue Apr 30 11:05:43 CEST 2013
Hi.
First of all, sorry for my probably bad english (i`m russian).
I test scheme for online conferences (using bmdcapture, ffmpeg,
nginx-rtmp).
So, i used ffmpeg to parallel encode to some formats at the same time.
For clean test, i record rawvideo to file:
bmdcapture -M 2 -A 2 -V 3 -m 8 -F nut -f ./rawvideo
Then, i run command:
cat ./rawvideo | \
/usr/bin/ffmpeg -re -i - \
-vcodec libx264 -acodec libfdk_aac -b:a 128k -ar 44100 -y -f flv
rtmp://$url_1080p \
-vcodec libx264 -acodec libfdk_aac -b:a 128k -ar 44100 -s 1280x720 -y -f
flv rtmp://$url_720p \
-vcodec libx264 -acodec libfdk_aac -b:a 128k -ar 44100 -s 720x404 -y -f
flv rtmp://$url_pal \
-vcodec libx264 -acodec libfdk_aac -b:a 128k -ar 44100 -s 960x640
-pix_fmt yuv420p -y -f flv rtmp://$url_hls
When it running, i see 'top -H' (fragment):
15672 root 20 0 1852m 1.2g 3988 R 94 15.1 0:52.96 ffmpeg
That is, one thread utilizes up to 100% of one core.
Other threads utilizes much less (each - about 20%).
So, result video (i see in from web-page as flash, or as HLS from ipad) -
is show very slowly, and some time not load.
I suppose, that this thread is not enough CPU frequency, now its: 2 x
Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
I trying to ran this command on other CPU (Intel(R) Xeon(R) CPU E5645 @
2.40GHz), it looked the same...
So, my questions is:
1. Will help me increasing cpu frequency (if i use corei7 with frequency >
3GHz)?
2. Why this silngle ffmpeg thread uses so much single CPU (i would like to
understand this...)?
3. Do you have any recommendations about hardware for using this scheme;
Thanks in advance!
Info about host and ffmpeg:
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
built on Apr 16 2013 13:46:11 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
configuration: --prefix=/usr --enable-gpl --enable-nonfree
--disable-yasm --enable-libx264 --enable-libmp3lame --enable-libfdk-aac
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Host:
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid
Linux 2.6.32-41-server #94-Ubuntu SMP Fri Jul 6 18:15:07 UTC 2012 x86_64
GNU/Linux
2 x Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
8GB RAM
--
theairkit.
More information about the ffmpeg-user
mailing list