FAQ  •  Register  •  Login

Serviio not working after reboot

<<

SuicidalChicken

Serviio newbie

Posts: 2

Joined: Fri Nov 30, 2012 6:27 pm

Post Fri Nov 30, 2012 6:37 pm

Serviio not working after reboot

was wondering if i can pick someone's brain, when i power on the debian server I have serviio running on the service starts and is visible on the network however if I try to watch any videos it fails to start the transcoding.

It gives me this in the debug log:

  Code:
2012-11-30 17:36:19,635 DEBUG [VideoDeliveryEngine] Delivering item '30' for client 'IPAddress=/192.168.1.81, Profile=Sony BD Player / SMP'
2012-11-30 17:36:19,635 DEBUG [VideoDeliveryEngine] Delivering file 'Video1.mkv' using transcoding
2012-11-30 17:36:19,635 DEBUG [AbstractTranscodingDeliveryEngine] A suitable transcoding job already exists, re-use it for client 'IPAddress=/192.168.1.81, Profile=Sony BD Player / SMP'
2012-11-30 17:36:19,635 ERROR [ResourceTransportRequestHandler] Error while processing resource, sending back 500 error. Message: Transcoded file '/tmp/Serviio/transcoding-temp-30-10-ORIGINAL.stf' cannot be found, FFmpeg execution probably failed
java.io.IOException: Transcoded file '/tmp/Serviio/transcoding-temp-30-10-ORIGINAL.stf' cannot be found, FFmpeg execution probably failed
        at org.serviio.delivery.resource.transcode.FileBasedTranscodingDeliveryStrategy.createInputStream(FileBasedTranscodingDeliveryStrategy.java:45)
        at org.serviio.delivery.resource.transcode.AbstractTranscodingDeliveryEngine.retrieveTranscodedResource(AbstractTranscodingDeliveryEngine.java:125)
        at org.serviio.delivery.resource.AbstractDeliveryEngine.deliver(AbstractDeliveryEngine.java:95)
        at org.serviio.delivery.MediaResourceRetrievalStrategy.retrieveResource(MediaResourceRetrievalStrategy.java:120)
        at org.serviio.delivery.ResourceDeliveryProcessor.deliverContent(ResourceDeliveryProcessor.java:84)
        at org.serviio.upnp.webserver.ResourceTransportRequestHandler.handleRequest(ResourceTransportRequestHandler.java:79)
        at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:61)
        at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
        at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
        at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
        at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:191)


or this:

  Code:
2012-11-30 17:36:24,946 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/192.168.1.81, Profile=Sony BD Player / SMP'
2012-11-30 17:36:24,946 DEBUG [MediaItemDAOImpl] Getting file of media item 68
2012-11-30 17:36:24,947 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: /mnt/Media1/Films/HD/Video2.mkv
2012-11-30 17:36:24,948 DEBUG [ProcessExecutor] Starting ffmpeg -fflags +genpts -i /mnt/Media1/Films/HD/Video2.mkv -y -copyts -c:v copy -vbsf h264_mp4toannexb -c:a ac3 -b:a 320k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-68-10-ORIGINAL.stf
2012-11-30 17:36:24,949 ERROR [ProcessExecutor] Fatal error in process starting: Cannot run program "ffmpeg": error=2, No such file or directory
2012-11-30 17:36:32,450 ERROR [ResourceTransportRequestHandler] Error while processing resource, sending back 500 error. Message: Transcoded file '/tmp/Serviio/transcoding-temp-68-10-ORIGINAL.stf' cannot be found, FFmpeg execution probably failed
java.io.IOException: Transcoded file '/tmp/Serviio/transcoding-temp-68-10-ORIGINAL.stf' cannot be found, FFmpeg execution probably failed
        at org.serviio.delivery.resource.transcode.FileBasedTranscodingDeliveryStrategy.createInputStream(FileBasedTranscodingDeliveryStrategy.java:45)
        at org.serviio.delivery.resource.transcode.AbstractTranscodingDeliveryEngine.retrieveTranscodedResource(AbstractTranscodingDeliveryEngine.java:125)
        at org.serviio.delivery.resource.AbstractDeliveryEngine.deliver(AbstractDeliveryEngine.java:95)
        at org.serviio.delivery.MediaResourceRetrievalStrategy.retrieveResource(MediaResourceRetrievalStrategy.java:120)
        at org.serviio.delivery.ResourceDeliveryProcessor.deliverContent(ResourceDeliveryProcessor.java:84)
        at org.serviio.upnp.webserver.ResourceTransportRequestHandler.handleRequest(ResourceTransportRequestHandler.java:79)
        at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:61)
        at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
        at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
        at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
        at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:191)


If I manually run the FFMPEG command
  Code:
ffmpeg -fflags +genpts -i /mnt/Media1/Films/HD/Video3.mkv -y -copyts -c:v copy -vbsf h264_mp4toannexb -c:a ac3 -b:a 320k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-68-10-ORIGINAL.stf
it works fine.

What is odd is that if i restart the service it then starts working ok. I did try adding a delay in the init.d script relating to it starting in case it was starting too quickly but it made no difference.

Any ideas?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Dec 02, 2012 10:21 pm

Re: Serviio not working after reboot

it looks like an old version of ffmpeg. Obviously it's weird as it works from command line. Are you sure you don't have 2 versions of FFmpeg installed, with one being used by the init.d script / user and one by the logged in user?
<<

SuicidalChicken

Serviio newbie

Posts: 2

Joined: Fri Nov 30, 2012 6:27 pm

Post Sat Feb 09, 2013 1:05 pm

Re: Serviio not working after reboot

Finally got chance to look into this now work commitments had died down, I managed to solve the issue (after rebuilding the server a couple of times).

For some reason it wasn't able to find ffmpeg when running at boot but when restarting the service via the init.d script it could.

What I needed to do was add the -Dffmpeg.location setting to JAVA_OPS in serviio.sh.

Just in case anyone else has this issue in the future and comes across this thread what I did was the following:

type: which ffmpeg
the response it game me was: /usr/local/bin/ffmpeg

I edited the bin/serviio.sh file and added the this to the JAVA_OPTS line so it now looks like this:
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=/usr/local/bin/ffmpeg"

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 33 guests

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