Page 1 of 2

Dual core at 100%

PostPosted: Wed Dec 28, 2011 12:30 pm
by scottybuk
hi guys. ive been using subsonic on my ubuntu server to stream some video's in avi format. theres transcoding to flv.

as soon as i decide to play a video i notice both my cpu's hit 100% and stay there, after 20 mins or so into the video its gets all laggy and jumpy and i have to refresh the page and resume the video. (using web player).

when i check what process's are using what its not java that using all the cpu its ffmpeg. any ideas guys? i really want to use subsonic and buy a licence but if i cant solve this problem i cant use it.

look forward to your reply

Re: Dual core at 100%

PostPosted: Wed Dec 28, 2011 12:37 pm
by BKKKPewsey
scottybuk wrote:when i check what process's are using what its not java that using all the cpu its ffmpeg. any ideas guys?

Yes its because you are transcoding - your server hasn't got enough power to transcode on the fly.
Either convert to flv or ask santa for a more powerful server :)

Re: Dual core at 100%

PostPosted: Wed Dec 28, 2011 12:41 pm
by scottybuk
thanks for the fast reply. is thee any other method i could use with subsonic to use less cpu?

Re: Dual core at 100%

PostPosted: Wed Dec 28, 2011 12:57 pm
by BKKKPewsey
For videos either just stream flv's or mp4's which will show in the web player in native format or use an external player
and use the host pc to do any necessary transcoding.
:mrgreen:

Re: Dual core at 100%

PostPosted: Wed Dec 28, 2011 1:44 pm
by scottybuk
ok thanks. can you just confirm that my step 1 is correct or is there an alternative step 1 i can use that might increase performance. or maybe an alternative to ffmpeg?

ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset superfast -threads 0 -

Re: Dual core at 100%

PostPosted: Wed Dec 28, 2011 9:18 pm
by ytechie
Maybe try playing around with the preset (superfast.) I use superfast, but it might be too much for your hardware to handle.

Re: Dual core at 100%

PostPosted: Thu Dec 29, 2011 7:00 am
by beyonder
I am using Subsonic on a Phenom II 955. This is a quad core 3.2GHz chip. This is able to transcode my 1080p files for the web player using around 33-40% CPU power, just to give you an idea of how much processing power you actually need to use this feature.

I use the superfast preset as well, it is the subsonic default. "superfast" is the second fastest x264 preset, with "ultrafast" being the only one tuned for more speed. You may have some luck trying this out (just replace the "superfast" with "ultrafast" in your transcode settings).

Re: Dual core at 100%

PostPosted: Mon Jan 02, 2012 5:28 pm
by Avarell_Dalton
To not be able to play video isn't a big deal for me but a good show off among my friends on their computers or on my Android so since I have the same problem as TS it would be interesting to hear what cpu is recommended. I'm running a Windows home server on a Core 2 Duo E6600 (2.40GHz,1066FSB,L2:4MB,rev.B2) with 2GB RAM. The specs a perfectly fine for the system and it's tasks except for ffmpeg.exe

It's still possible to upgrade hardware and for me I could go from 2.4GHz to just above 3GHz (or actually Pentium Extreme at 3.7GHz if there's still anyone out there) and RAM of course so the question is if it would make any change.

Sorry TS for kidnapping your thread :oops: at least I moved your thread to top :mrgreen:

Re: Dual core at 100%

PostPosted: Tue Jan 03, 2012 3:44 pm
by gogogo
hi transcode video on a single core 1.7ghz with 800 mb of ram,
my total cpu usage forever is of only 60% all time...!!!!!! simple...use cpulimit!!!!

http://ubuntuforums.org/showthread.php?t=992706

Re: Dual core at 100%

PostPosted: Tue Jan 03, 2012 10:55 pm
by Avarell_Dalton
gogogo wrote:hi transcode video on a single core 1.7ghz with 800 mb of ram,
my total cpu usage forever is of only 60% all time...!!!!!! simple...use cpulimit!!!!

http://ubuntuforums.org/showthread.php?t=992706

This is a a solution for Linux op, doesn't help me but it would be interesting to hear if you actually limit cpu time to ffmpeg?

Re: Dual core at 100%

PostPosted: Wed Jan 04, 2012 8:42 am
by gogogo
streaming video is always unstable, on my system i limit all process system to the 35%.
i have used subsonic on a server connected to the lan trough 1gbs & 100 mbit cables, wireless bridge g & 300mbps n, ethernet powerline ....but my stable (easy & simple) solutions is to use for the videos directly a system file share like samba or afp (under ubuntu for osx is more stable of the samba server!!!) http://goo.gl/fJnlm or directly on routers with ddwrt firmware with wireless n at least 300mps with hd directly connected throug usb to the router.
I'm using buffalo router http://goo.gl/a1Dfi

for cpulimit you simple try to set up a limit % and test if ffmpeg works:
apt-get install cpulimit

top or ps aux to see process pid or name

cpulimit -e ffmpeg -l 60% (as root)

on ubuntu use conky to see system statistics on the desktop...

other solution to avoid a transcoding on the fly is to set an automatic conversion ffmpeg script to .flv format whit a cronjob when a new video is added in a predetermined folder and move original video in a backup folder. http://goo.gl/wv3Kd and setting up an openvpn server on the ddwrt router to access files from wan.

good luck! :wink:

Re: Dual core at 100%

PostPosted: Wed Jan 04, 2012 7:16 pm
by Avarell_Dalton
In my mind it seems odd to limit cpu time for a instance that uses up 100% of cpu time and make the conversion stutter but i'm no pro in this matter.

I use my file server to serve my Popcorn Hour and it does so flawlessly and of course to my computers as well. It would be stupid to use Subsonic to convert mkv files to mpeg before watching them in normal case but sometimes Subsonic is more suitable. To smartphones for example or when you just borrow your friends computer and want to show off.

Thanks for your reply anyway.

I still would like to hear what recommended hardware specs are for streaming video via Subsonic

Re: Dual core at 100%

PostPosted: Wed Jan 04, 2012 7:22 pm
by gogogo
but my stable (easy & simple) solutions is to use for the videos directly a system file share like samba or afp (under ubuntu for osx is more stable of the samba server!!!) http://goo.gl/fJnlm or directly on routers with ddwrt firmware with wireless n at least 300mps with hd directly connected throug usb to the router.
I'm using buffalo router http://goo.gl/a1Dfi

Re: Dual core at 100%

PostPosted: Wed Jan 04, 2012 8:00 pm
by Avarell_Dalton
gogogo wrote:
but my stable (easy & simple) solutions is to use for the videos directly a system file share like samba or afp (under ubuntu for osx is more stable of the samba server!!!) http://goo.gl/fJnlm or directly on routers with ddwrt firmware with wireless n at least 300mps with hd directly connected throug usb to the router.
I'm using buffalo router http://goo.gl/a1Dfi

I'm not sure if we don't understand each other but I do use a storage (my file server who uses SMB or Samba, don't remember what Microsoft uses, it is, as I said earlier, a Windows home server built on windows 2003 server).
I also use a GBit network with a Netgear GS716T ( http://support.netgear.com/app/products ... a_id/11708 ) switch and a router for DHCP and Internet connection. for wifi the router also servers as a access point at 108Mbit/s (as much as our phones can handle).
Every computer, every game console or media player is if possible connected to the network via cable. Not smartphones of course.
I am pretty sure the network is not the problem here, everything is directly connected to the switch (or tbh via a patch panel :s ) and everything was upgraded and overlooked last summer.

What I want is the file server to be able to convert video files on the fly via Subsonic, mine seems to lack of power to do so and therefore my question remains. What hardware does users here recommend for the server (who resides Subsonic)?

EDIT: Once again. I am sorry for kidnapping this thread from the thread starter!

Re: Dual core at 100%

PostPosted: Wed Jan 04, 2012 8:05 pm
by gogogo
switch to linux! :)