FAQ  •  Register  •  Login

ffmpeg termination

<<

JZO

Serviio newbie

Posts: 4

Joined: Sun Jan 08, 2012 2:57 pm

Post Sun Jan 08, 2012 3:10 pm

ffmpeg termination

The problem is the following:

I stream an MKV file to my Samsung TV which requires transcoding. In my Windows, a new background process ffmpeg.exe starts and makes a large temp file into the configured temp folder. Some minutes later I stop the playback and exit on the TV, but the transcoding ffmpeg.exe process is still active on my computer and reserves CPU and memory resources. The CPU load is about 30-40% per ffmpeg.exe process with an AMD Phenom X4 3GHz processor.

It could be useful, if an option would exist on the UI which specifies an inactivity-time than the transcoding process would terminate by the Serviio Console.

Currently I need to terminate the ffmpeg.exe process manually with the Windows Task Manager.
Last edited by JZO on Sun Jan 08, 2012 3:16 pm, edited 1 time in total.
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Sun Jan 08, 2012 3:15 pm

Re: ffmpeg termination

Why do you need to termine the process?

If you start a new video from the same device, the old one will be killed.

By keeping the old one active, it allows you to resume a video and not have to re-transcode it.
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
<<

JZO

Serviio newbie

Posts: 4

Joined: Sun Jan 08, 2012 2:57 pm

Post Sun Jan 08, 2012 3:24 pm

Re: ffmpeg termination

Hi,

If I do not want to start an other movie on my TV and I like to do something else on my computer, the active transcoding process is unnecessary anymore and slow down my computer as long as the transcoding ends. This may takes several minutes, depends on the size of the original content.
Furthermore I have not enough HDD storage to store large 3-4 Gb or more sized temp files. It is absolutely acceptable for me to re-transcoding the content all the time, when I start streaming.

This recommended UI option would be optional of course, but it could be very useful and increase the usability of this really great software.
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Sun Jan 08, 2012 3:29 pm

Re: ffmpeg termination

It shouldn't store lots of tmp files. I think it only stores the last one.

One problem is different devices request files in different chunks, serviio also cannot tell the difference between you stopping and pausing a film.

So for example you pause a film, then at what point should ffmpeg be killed? If it is killed and you then press resume, you will have to wait for ffmpeg to transcode the file upto the point you paused it.
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
<<

JZO

Serviio newbie

Posts: 4

Joined: Sun Jan 08, 2012 2:57 pm

Post Sun Jan 08, 2012 3:38 pm

Re: ffmpeg termination

Yes, you are right. The pause problem exists in other DLNA Server products too. The applied solution something like this:

There are two options exist on the console UI:

- Terminate transcoding if device request another file
- Terminate transcoding, if the temporary file is not used during (here is a NumericUpDown input control) seconds.

You can enable or disable this options (with a checkbox per setting), so you can avoid the problem of the "pause". You can add a possibility to make decision by the user to control the behavior of the transcoding process. I think these are very useful and user friendly settings.
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Sun Jan 08, 2012 3:46 pm

Re: ffmpeg termination

There have been quite a few requests for this so maybe zip could include it in the next release. But it would be a use with caution option.

Could even have an end all ffmpeg processes now button in the console, that way it can be included in mobile apps and webuis, for those who really want to kill off ffmpeg.

Although I assume this will not be a priority for zip.
Last edited by will on Sun Jan 08, 2012 3:51 pm, edited 2 times in total.
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
<<

JZO

Serviio newbie

Posts: 4

Joined: Sun Jan 08, 2012 2:57 pm

Post Sun Jan 08, 2012 3:50 pm

Re: ffmpeg termination

It will be great! Thank you!
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jan 08, 2012 3:51 pm

Re: ffmpeg termination

its wont be implemented as it breaks to much, if you really want to stop it you can manualy kill the ffmpeg process from the pc running serviio.
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
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Sun Jan 08, 2012 3:52 pm

Re: ffmpeg termination

JZO wrote:It's great! Thank you!


Its up to zip not me! I never said he would do it, just that there have been a lot of requests so maybe it could be looked at again.
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jan 08, 2012 4:08 pm

Re: ffmpeg termination

if you running under windows just do this

Option 1

1. download and extract the ffmpeg kill.bat from the attached ZIP file
2. Enjoy

kill ffmpeg.zip
(164 Bytes) Downloaded 1878 times


Option 2

1. create FFmpeg kill.bat
2. edit file with notepad.exe
3. add this code
  Code:
taskkill /im ffmpeg.exe

4. save bat file
5. enjoy

if running on linux just do this

1. From command prompt type
  Code:
kill -e -q ffmpeg
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
<<

bafu

Serviio newbie

Posts: 1

Joined: Sat May 02, 2015 7:21 am

Post Sun May 10, 2015 2:13 pm

Re: ffmpeg termination

I would love to see a feature to control the behavior of the transcoding process.
Do you think a future version of Serviio will support this?
JZO wrote:- Terminate transcoding, if the temporary file is not used during (here is a NumericUpDown input control) seconds.

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 24 guests

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