FAQ  •  Register  •  Login

Configuring FFMPEG performance

<<

glennsfield

Serviio newbie

Posts: 1

Joined: Thu Jun 30, 2011 1:00 am

Post Thu Jun 30, 2011 1:38 am

Configuring FFMPEG performance

Hi guys,

Firstly I'd like to say Serviio is faaaaantastic!
I have a Samsung B series and have got everything working pretty much exactly the way I want (using a custom profile) with all media files except MKVs.

My profile.xml is setup very basic, it's set to force transcode everything. The reason for this is because I found some video files I could not fast forward/rewind (especially MKVs). Forcing the transcoding enabled skipping functions to work.
For your typical average quality xvid movies I don't really have a problem but for 720/1080P MKVs, when I try to fast forward too quickly it will often bomb out and return me to the DLNA main menu. I'm assuming this is because ffmpeg can't cope with transcoding these HD movies on the fly and in fast forward! (not on my hardware at least).

Before I go out and buy a faster processor, I was thinking maybe there are some configuration options with FFMPEG to improve performance. I have an AMD X2 processor which is pretty budget. I've set Serviio console to use two CPU Cores.

In researching FFMPEG there appears to be many configuration options when doing the transcoding from command line (e.g. how many cpu threads to use). I'm guessing Serviio sends its own parameters to FFMPEG when it needs to transcode something, is there someway to modify these settings that Serviio is asking FFMPEG to use?

My last resort will be to change my profile.xml to reduce the bitrate etc to put less load on the CPU.

Oh and one last thing, I have a decent ATI graphics card in the machine doing the transcoding, anyone know of a way to force Serviio/FFMPEG to utilize the GPU?

Thanks in advance!
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Thu Jun 30, 2011 6:57 am

Re: Configuring FFMPEG performance

glennsfield wrote:...I was thinking maybe there are some configuration options with FFMPEG to improve performance. I have an AMD X2 processor which is pretty budget. I've set Serviio console to use two CPU Cores.

Set two -> ffmpeg used two threads

glennsfield wrote:My last resort will be to change my profile.xml to reduce the bitrate etc to put less load on the CPU.

Read : http://www.serviio.org/index.php?option ... icle&id=24
use maxVBitrate option
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

herick

Serviio newbie

Posts: 4

Joined: Sun Jul 10, 2011 4:13 pm

Post Sun Jul 10, 2011 4:18 pm

Re: Configuring FFMPEG performance

glennsfield wrote:Hi guys,

Firstly I'd like to say Serviio is faaaaantastic!
I have a Samsung B series and have got everything working pretty much exactly the way I want (using a custom profile) with all media files except MKVs.

My profile.xml is setup very basic, it's set to force transcode everything. The reason for this is because I found some video files I could not fast forward/rewind (especially MKVs). Forcing the transcoding enabled skipping functions to work.
For your typical average quality xvid movies I don't really have a problem but for 720/1080P MKVs, when I try to fast forward too quickly it will often bomb out and return me to the DLNA main menu. I'm assuming this is because ffmpeg can't cope with transcoding these HD movies on the fly and in fast forward! (not on my hardware at least).

Before I go out and buy a faster processor, I was thinking maybe there are some configuration options with FFMPEG to improve performance. I have an AMD X2 processor which is pretty budget. I've set Serviio console to use two CPU Cores.

In researching FFMPEG there appears to be many configuration options when doing the transcoding from command line (e.g. how many cpu threads to use). I'm guessing Serviio sends its own parameters to FFMPEG when it needs to transcode something, is there someway to modify these settings that Serviio is asking FFMPEG to use?

My last resort will be to change my profile.xml to reduce the bitrate etc to put less load on the CPU.

Oh and one last thing, I have a decent ATI graphics card in the machine doing the transcoding, anyone know of a way to force Serviio/FFMPEG to utilize the GPU?

Thanks in advance!


There is an option to enable hardware acceleration in ffmpeg. The setting is under "DXVA video decoder configuration". I think this setting enables GPU decoding.
<<

abubin

Serviio lover

Posts: 80

Joined: Tue Jul 26, 2011 3:54 pm

Post Sat Aug 06, 2011 2:39 pm

Re: Configuring FFMPEG performance

another option is to use linux. It should be faster than windows.
<<

Negcreep

Serviio newbie

Posts: 7

Joined: Fri Sep 16, 2011 12:05 pm

Post Fri Sep 16, 2011 12:10 pm

Re: Configuring FFMPEG performance

Has anyone here got GPU transcoding to work in windows?

I am running Serviio on a Atom/Nvidia Ion netbox PC with windows 7 x64. It seems struggle a bit with 1080p transcoding. Strangely the playback is smooth for about 1-2 minutes, then it starts stuttering like mad. That's using all 4 threads on the Atom D525 1.8ghz dual core CPU.

I think GPU transcoding could really help a system like this.

I see upgrading FFMpeg is an option. I've downloaded the windows version but I have no idea how to replace the version included with serviio or how to turn on the hardware acceleration.

I apologise for my noobishness but any help you can give would be appreciated.

Thanks

Ps. Great effort with Serviio btw. It really is fantastic and your effort is appreciated. :)
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Fri Sep 16, 2011 12:32 pm

Re: Configuring FFMPEG performance

Negcreep wrote:I see upgrading FFMpeg is an option. I've downloaded the windows version but I have no idea how to replace the version included with serviio or how to turn on the hardware acceleration.

For windows user, "ffmpeg.exe" is into ./serviio/lib folder, you can backup the ffmpeg delivered with serviio, then copy/past the new one in the same folder.
But
- Sometime, last ffmpeg, change the syntax then serviio could not use it properly.
- You could not add other extra option with Serviio.
Nevertheless,
- You could try locally (in a cmd windows terminal) some new option and post here your experience, this could become an evolution in next serviio version.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Sep 16, 2011 12:58 pm

Re: Configuring FFMPEG performance

or wrap ffmpeg.exe in a bat file in which you add your own parameters
<<

Negcreep

Serviio newbie

Posts: 7

Joined: Fri Sep 16, 2011 12:05 pm

Post Fri Sep 16, 2011 2:58 pm

Re: Configuring FFMPEG performance

OK this will either make you laugh or hold your head in your hands ...

I just realised I was using a the wireless connection for the Netbox instead of the Ethernet cable. :)

Opps!

It appears a 1.8ghz atom is enough for 1080p transcoding in windows after all. ;)
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Fri Sep 16, 2011 4:39 pm

Re: Configuring FFMPEG performance

You had me wondering if my 2004 AMD running linux was faster than an atom processor. I have never seen more than 5% CPU usage on my serviio system, even when sending video to 4 devices.
Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Fri Sep 16, 2011 4:45 pm

Re: Configuring FFMPEG performance

abubin wrote:another option is to use linux. It should be faster than windows.


wont make blind bit of difference.
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

TarsTarkas

Serviio newbie

Posts: 3

Joined: Fri Oct 14, 2011 2:32 am

Post Sun Oct 16, 2011 4:47 pm

Re: Configuring FFMPEG performance

I realize that this is a little off-topic for this thread, but since it was the closest I've found to an answer to my question I was wondering...

My profile.xml is setup very basic, it's set to force transcode everything.

How would I go about doing this? I've noticed some of the same problems glennsfield mentioned, so I wanted to give this solution a try, but I'm not sure how to modify the profiles.xml file. I can see where the xml file has a bunch of settings for doing various transcoding operations, but I don't know what I'd need to change to make it force transcoding of everything...

I was hoping there was maybe a place here on the forums where people post their profiles.xml files with various configurations such as this for people to try out, but I've not been able to find anything like that so far... Perhaps a new forums section to consider?

In case it makes any difference, I am using a Samsung UN46B8500... According to the console, this is a B series television...
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Oct 17, 2011 8:07 am

Re: Configuring FFMPEG performance

Look at the DirecTV profile, that transcodes (almost) everything
<<

TarsTarkas

Serviio newbie

Posts: 3

Joined: Fri Oct 14, 2011 2:32 am

Post Wed Oct 19, 2011 2:37 am

Re: Configuring FFMPEG performance

Ok, thanks for the tip... one more question... For going to my television, would you suggest using the same target video and audio codecs as the DirecTV setup uses? Or should I use something more like this:

  Code:
<Video targetContainer="mpegts" targetACodec="ac3" targetVCodec="mpeg2video">


Thanks again for the help, and for the excellent app!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Oct 19, 2011 10:26 am

Re: Configuring FFMPEG performance

up to you, tery both and see what gives you best results (playback, quality, ffwd, pause, CPU, etc)
<<

rcooper5908

Serviio newbie

Posts: 14

Joined: Mon Mar 14, 2011 5:36 pm

Post Tue Nov 15, 2011 8:46 pm

Re: Configuring FFMPEG performance

Cerberus wrote:
abubin wrote:another option is to use linux. It should be faster than windows.


wont make blind bit of difference.



It appears to make a difference to me, but it's to be expected since ffmpeg does not (and according to the authors will never) compile natively on windows. You have a couple choices, cygwin or mingw (which is a real pain in the ass but easier to compile a stand alone .exe without need of other DLLs). So you are running an interpreted version for all intents and purposes and even the threading is kind of a kludge. I get better performance running serviio on a pretty much mid to lower end machine with the files on a win7 host than I do hosting directly off of windows.
<<

Macgyver33

Serviio newbie

Posts: 3

Joined: Sun Nov 27, 2011 8:33 pm

Post Mon Nov 28, 2011 3:35 am

Re: Configuring FFMPEG performance

moltra wrote:You had me wondering if my 2004 AMD running linux was faster than an atom processor. I have never seen more than 5% CPU usage on my serviio system, even when sending video to 4 devices.


So is it possible that something like an AMD E-350 1.6GHz (equal to an Intel Atom) would have enough horsepower to handle a couple of devices transcoding 1080i files from it?

I want to build a new server and make it as low power as possible but was worried these 18W TDP processors wouldn't have enough juice to handle transcoding HD files to devices.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Nov 28, 2011 9:01 am

Re: Configuring FFMPEG performance

Macgyver33 wrote:I want to build a new server and make it as low power as possible but was worried these 18W TDP processors wouldn't have enough juice to handle transcoding HD files to devices.

You can try a transcoding HD file locally and check the ffmpeg "fps" rate computing, must be > frame rate (25, 30 or 50), >100 fps is a good value.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Nov 28, 2011 10:25 am

Re: Configuring FFMPEG performance

Macgyver33 wrote:So is it possible that something like an AMD E-350 1.6GHz (equal to an Intel Atom) would have enough horsepower to handle a couple of devices transcoding 1080i files from it?

I doubt it very much, especially couple of devices at the same time. If you're talking about remuxing then probably yes.

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 27 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.