ffmpeg high cpu usage

Posted:
Wed Sep 19, 2012 2:12 pm
by makmar11
Hi
i try to make a profile for my LG HLB54S bd player.
i manage to transcode some files and i have the following problems:
1 ffmpeg continue to run with high cpu usage after i stop the transconding video (i have to manual stop it from task manager) i run it in
windows 7 x64
2 transconding video has not the native video aspect ratio and when i try the dar=16:9 command in my profile instead to expand from left and right compressed from up and down and now i have black areas around of the video.
i reed in forum for a ffmpeg filters but i don't know how to apply them.
Re: ffmpeg high cpu usage

Posted:
Wed Sep 26, 2012 7:50 am
by Satras
I got the same on 1).
I guess this is because Serviio kicks in the transcoding process but does not know if someone is actually watching the stream.. would be cool if this would be fixed.
on 2) you might want to check this and supply some more details
viewtopic.php?f=5&t=4510
ffmpeg high cpu usage

Posted:
Sun Sep 30, 2012 4:46 am
by yaro
makmar11 wrote:Hi
i try to make a profile for my LG HLB54S bd player.
i manage to transcode some files and i have the following problems:
1 ffmpeg continue to run with high cpu usage after i stop the transconding video (i have to manual stop it from task manager) i run it in
windows 7 x64 .
I think the developer has to revisit this problem. I believe it is a bug he has not figured out how to solve.
Re: ffmpeg high cpu usage

Posted:
Sun Sep 30, 2012 11:55 am
by zip
yaro wrote:makmar11 wrote:Hi
i try to make a profile for my LG HLB54S bd player.
i manage to transcode some files and i have the following problems:
1 ffmpeg continue to run with high cpu usage after i stop the transconding video (i have to manual stop it from task manager) i run it in
windows 7 x64 .
I think the developer has to revisit this problem. I believe it is a bug he has not figured out how to solve.
It is not a bug, but a feature. Discussed many times.
ffmpeg high cpu usage

Posted:
Sun Sep 30, 2012 12:57 pm
by yaro
zip wrote:yaro wrote:makmar11 wrote:Hi
i try to make a profile for my LG HLB54S bd player.
i manage to transcode some files and i have the following problems:
1 ffmpeg continue to run with high cpu usage after i stop the transconding video (i have to manual stop it from task manager) i run it in
windows 7 x64 .
I think the developer has to revisit this problem. I believe it is a bug he has not figured out how to solve.
It is not a bug, but a feature. Discussed many times.
Is it alright for the transcoding to continue for 48 hours and indefinitely till I kill it?
Re: ffmpeg high cpu usage

Posted:
Sun Sep 30, 2012 4:01 pm
by zip
48 hours? It'll only run until it finishes transcoding the video. Unless you are watching a live stream?
ffmpeg high cpu usage

Posted:
Sun Sep 30, 2012 5:44 pm
by yaro
It happens after watching a live stream on a Philips TV.
Re: ffmpeg high cpu usage

Posted:
Sun Sep 30, 2012 8:05 pm
by zip
Ok, Live streams should get killed when you stop watching them. Are you using a plugin or enter the stream URL directly to the console?
Re: ffmpeg high cpu usage

Posted:
Sun Sep 30, 2012 11:00 pm
by zip
It might be the plugin is not correctly marking live streams as live, causing Serviio not to kill the process when you stop watching it. Ask the plugin dev to check this.
Re: ffmpeg high cpu usage

Posted:
Tue Oct 02, 2012 1:59 pm
by yaro
it is the Livefeeds plugin. It has not been updated since July.
Re: ffmpeg high cpu usage

Posted:
Tue Oct 02, 2012 2:04 pm
by zip
That one looks ok.... can you enable
detailed log, play the stream, stop it, wait 2 minutes and then post the log here?
Re: ffmpeg high cpu usage

Posted:
Tue Oct 02, 2012 7:13 pm
by yaro
It has not happened since my last post, so it could be a random occurrence . I will post the console log when it happens.
Re: ffmpeg high cpu usage

Posted:
Wed Oct 03, 2012 5:22 am
by yaro
This thing is random . Here is a snippet of the log.
012-10-02 19:12:49,352 WARN [EventDispatcher] Couldn't send event message for subscription cd8fc46e-cccb-4dff-9cf5-716e49892ddd, will keep trying until subscription expires
2012-10-02 19:12:49,353 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 19:46:28,890 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 19:55:28,340 WARN [WebResourceParser] Plugin HaHaSport returned no value for resource item 'Tue 18:30-20:30 San Luis - Club America -Apertura de Mexico'
2012-10-02 19:55:28,943 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 20:10:34,223 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 20:40:34,657 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 20:46:39,780 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 21:10:45,328 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 21:41:56,029 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 21:46:56,136 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:00:21,720 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:01:34,423 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:01:44,834 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:01:47,868 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 1! This is a possible error.
2012-10-02 22:01:51,872 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:02:02,331 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:02:23,214 WARN [VideoDeliveryEngine] Cannot extract expired URL, using previous one which might not work
2012-10-02 22:02:24,717 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:02:25,414 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 1! This is a possible error.
2012-10-02 22:02:33,825 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:02:42,676 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:02:51,064 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:02:53,278 WARN [VideoDeliveryEngine] Cannot extract expired URL, using previous one which might not work
2012-10-02 22:03:01,498 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:03:08,776 WARN [VideoDeliveryEngine] Cannot extract expired URL, using previous one which might not work
2012-10-02 22:03:12,000 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:03:18,451 WARN [PipedOutputBytesReader] Error reading bytes stream from external process: Stream closed
2012-10-02 22:03:22,639 WARN [VideoDeliveryEngine] Cannot extract expired URL, using previous one which might not work
2012-10-02 22:03:24,710 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:03:25,336 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 137! This is a possible error.
2012-10-02 22:03:34,461 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:03:43,621 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:03:52,967 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:03:58,911 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 137! This is a possible error.
2012-10-02 22:04:01,629 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:04:08,659 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:04:19,449 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:04:29,640 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:04:33,576 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 137! This is a possible error.
2012-10-02 22:04:39,014 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:05:01,009 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:05:09,364 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:05:10,983 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 137! This is a possible error.
2012-10-02 22:05:16,881 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:05:24,299 WARN [PipedOutputBytesReader] Error reading bytes stream from external process: Stream closed
2012-10-02 22:05:41,134 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 1! This is a possible error.
2012-10-02 22:05:47,586 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:05:55,117 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:05:59,423 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 1! This is a possible error.
2012-10-02 22:06:02,645 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:06:15,672 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:06:25,230 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:06:29,101 INFO [RendererManager] Stored a new renderer: uuid='2b3144a6-d9d4-11e0-8e23-00e0a91e001a', name = 'NMR', ipAddress='192.168.1.73', profile = '20'
2012-10-02 22:06:49,300 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:07:19,322 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 137! This is a possible error.
2012-10-02 22:07:39,754 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 137! This is a possible error.
2012-10-02 22:07:44,059 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 137! This is a possible error.
2012-10-02 22:10:38,547 WARN [ProcessExecutor] Process /Applications/Serviio.app/Contents/Resources/Java/../../MacOS/ffmpeg has a return code of 137! This is a possible error.
2012-10-02 22:11:16,911 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:11:22,087 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:16:26,913 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
2012-10-02 22:16:32,128 WARN [EventDispatcher] Couldn't send event message for subscription e82d9302-b11c-47c4-ac07-6c7afb82c0e3, will keep trying until subscription expires
Re: ffmpeg high cpu usage

Posted:
Wed Oct 03, 2012 12:59 pm
by zip
I'll need
detailed log of when you play the stream, then stop... it should log something about trying to kill ffmpeg after a minute or so.
Re: ffmpeg high cpu usage

Posted:
Wed Oct 03, 2012 7:19 pm
by yaro
This is the serviio log file. I do not find what you are looking for:
Re: ffmpeg high cpu usage

Posted:
Thu Oct 04, 2012 3:48 am
by jhb50
There is nothing in that log re playing a live stream. It only shows you transcoding and playing 3 mp4 files, and the ffmpeg process terminating when transcoding is complete..