Page 1 of 1

Transcoding does not work (anymore)

PostPosted: Sun Sep 23, 2012 10:56 pm
by sampath.mamilapo
I had transcoding of WMV files working by default in 0.62. Now I delted it and installed 1.x (both on Linux).

I have a Samsung UE C6200 TV. I edited the Profile id="7" section in profiles.xml to transcode all WMV files by default. Still it does not play on my Samsung TV.

Here is the section I added:

  Code:
         <!-- transcode (actually rewrap) all WMV containers, use mp3, leave video alone -->      
         <Video targetContainer="mpegts" targetACodec="ac3" targetVCodec="mpeg2video" maxVBitrate="20000">
            <Matches container="asf" />
          </Video>



Can I get this working somehow? Also I would like to transcode all FLV files so they run on my TV. How do I do that?

Thanks,
sampy

Re: Transcoding does not work (anymore)

PostPosted: Mon Sep 24, 2012 6:05 pm
by zip
ASF files should normally play without transcoding on the C series. FLV is already set up in the C/D/E profile.

Make sure you're using the proper profile. If you do, enable detailed logging and post it here incl playing the asf file.

Re: Transcoding does not work (anymore)

PostPosted: Mon Sep 24, 2012 7:05 pm
by sampath.mamilapo
First some info about my system:

  Code:
2012-09-24 20:53:49,593 DEBUG [ApplicationInstanceManager] Listening for application instances on socket 44331
2012-09-24 20:53:49,603 INFO  [MediaServer] ------------------------------------------------------------------------
2012-09-24 20:53:49,603 INFO  [MediaServer] Serviio DLNA media streaming server v 1.0.1 (rev. 6dbf7c6e334f+)
2012-09-24 20:53:49,603 INFO  [MediaServer] Petr Nejedly 2009-2012
2012-09-24 20:53:49,603 INFO  [MediaServer] http://www.serviio.org
2012-09-24 20:53:49,603 INFO  [MediaServer]
2012-09-24 20:53:49,603 INFO  [MediaServer] Java 1.7.0_07-Oracle Corporation
2012-09-24 20:53:49,603 INFO  [MediaServer] OS Linux i386 3.2.0-29-generic-pae
2012-09-24 20:53:49,603 INFO  [MediaServer] File encoding: UTF-8
2012-09-24 20:53:49,603 INFO  [MediaServer] Headless mode enabled: true
2012-09-24 20:53:49,603 INFO  [MediaServer] User home dir: /home/usul
2012-09-24 20:53:49,603 INFO  [MediaServer] Temp dir: /tmp
2012-09-24 20:53:49,604 INFO  [MediaServer] ------------------------------------------------------------------------
2012-09-24 20:53:49,702 INFO  [WebServer] Socket buffer set to 65535 bytes
2012-09-24 20:53:49,704 INFO  [RestletServer] Starting Restlet server (/rest) exposed on port 23423
2012-09-24 20:53:49,731 INFO  [RestletServer] Starting Restlet server (/cds) exposed on port 23424
2012-09-24 20:53:49,732 INFO  [RestletServer] Starting Restlet server (/mediabrowser) exposed on port 23424
2012-09-24 20:53:49,743 INFO  [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2012-09-24 20:53:49,750 DEBUG [DBLogDAOImpl] Checking if script 'script-0.1.sql' has been run
2012-09-24 20:53:50,633 DEBUG [DBLogDAOImpl] Checking if script 'script-0.1.1.sql' has been run
2012-09-24 20:53:50,634 DEBUG [DBLogDAOImpl] Checking if script 'script-0.2.sql' has been run
2012-09-24 20:53:50,634 DEBUG [DBLogDAOImpl] Checking if script 'script-0.3.1.sql' has been run
2012-09-24 20:53:50,635 DEBUG [DBLogDAOImpl] Checking if script 'script-0.4.sql' has been run
2012-09-24 20:53:50,635 DEBUG [DBLogDAOImpl] Checking if script 'script-0.4.1.sql' has been run
2012-09-24 20:53:50,636 DEBUG [DBLogDAOImpl] Checking if script 'script-0.4.2.sql' has been run
2012-09-24 20:53:50,636 DEBUG [DBLogDAOImpl] Checking if script 'script-0.5.sql' has been run
2012-09-24 20:53:50,637 DEBUG [DBLogDAOImpl] Checking if script 'script-0.5.1.sql' has been run
2012-09-24 20:53:50,638 DEBUG [DBLogDAOImpl] Checking if script 'script-0.6.sql' has been run
2012-09-24 20:53:50,638 DEBUG [DBLogDAOImpl] Checking if script 'script-0.6.1.sql' has been run
2012-09-24 20:53:50,639 DEBUG [DBLogDAOImpl] Checking if script 'script-0.6.2.sql' has been run
2012-09-24 20:53:50,639 DEBUG [DBLogDAOImpl] Checking if script 'script-1.0.sql' has been run
2012-09-24 20:53:50,648 DEBUG [ConfigEntryDAOImpl] Reading all ConfigEntries






I tried to isolate the part where I press play on a FLV file followed by the error. Can you make any sense of this?

  Code:
2012-09-24 20:57:28,426 DEBUG [FolderDAOImpl] Getting number of VIDEO sub-folders and media items in folder 12 (filter: ALL) [No_Restriction]
2012-09-24 20:57:28,430 DEBUG [LocalContentCacheDecorator] Stored entry in the cache (local_default), returning it
2012-09-24 20:57:28,450 DEBUG [ServiceControlRequestHandler] Returning OK SOAP message
2012-09-24 20:57:33,537 DEBUG [WebServer] Incoming connection from /192.168.178.22:44008
2012-09-24 20:57:33,538 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.178.22
2012-09-24 20:57:33,539 DEBUG [ResourceTransportRequestHandler] HEAD /resource/320/MEDIA_ITEM/MPEG_TS_SD_KO_ISO-0/ORIGINAL HTTP/1.0, headers = [getcontentFeatures.dlna.org: 1,Host: 192.168.178.25:8895]]
2012-09-24 20:57:33,540 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.178.22
2012-09-24 20:57:33,544 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'IPAddress=/192.168.178.22, Profile=Samsung TV / player (C/D/E-series)'
2012-09-24 20:57:33,545 DEBUG [ResourceDeliveryProcessor] Request for resource 320 and type 'MEDIA_ITEM' received
2012-09-24 20:57:33,545 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 320 (local)
2012-09-24 20:57:33,545 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 320)
2012-09-24 20:57:33,546 DEBUG [VideoDAOImpl] Reading a Video (id = 320)
2012-09-24 20:57:33,546 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 320, format MPEG_TS_SD_KO_ISO and profile Samsung TV / player (C/D/E-series)
2012-09-24 20:57:33,547 DEBUG [AbstractTranscodingDeliveryEngine] Getting media info for transcoded version of file h_tapezieren.flv
2012-09-24 20:57:33,547 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file h_tapezieren.flv: MPEG_TS_SD_EU_ISO
2012-09-24 20:57:33,547 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file h_tapezieren.flv: MPEG_TS_SD_NA_ISO
2012-09-24 20:57:33,547 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file h_tapezieren.flv: MPEG_TS_SD_KO_ISO
2012-09-24 20:57:33,549 DEBUG [ResourceDeliveryProcessor] Sending HEAD response back
2012-09-24 20:57:33,549 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,Content-Length: 50000000000,Date: Mon, 24 Sep 2012 18:57:33 GMT,Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/1.0.1,Cache-control: no-cache,contentFeatures.dlna.org: DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000,transferMode.dlna.org: Streaming]]
2012-09-24 20:57:33,562 DEBUG [WebServer] Incoming connection from /192.168.178.22:42533
2012-09-24 20:57:33,562 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.178.22
2012-09-24 20:57:33,563 DEBUG [ResourceTransportRequestHandler] GET /resource/320/MEDIA_ITEM/MPEG_TS_SD_KO_ISO-0/ORIGINAL HTTP/1.0, headers = [getcontentFeatures.dlna.org: 1,transferMode.dlna.org: Streaming,getMediaInfo.sec: 1,TimeSeekRange.dlna.org: npt=0-,Host: 192.168.178.25:8895]]
2012-09-24 20:57:33,564 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.178.22
2012-09-24 20:57:33,564 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'IPAddress=/192.168.178.22, Profile=Samsung TV / player (C/D/E-series)'
2012-09-24 20:57:33,565 DEBUG [ResourceDeliveryProcessor] Request for resource 320 and type 'MEDIA_ITEM' received
2012-09-24 20:57:33,567 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 320 (local)
2012-09-24 20:57:33,567 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 320)
2012-09-24 20:57:33,567 DEBUG [VideoDAOImpl] Reading a Video (id = 320)
2012-09-24 20:57:33,569 DEBUG [VideoDeliveryEngine] Delivering item '320' for client 'IPAddress=/192.168.178.22, Profile=Samsung TV / player (C/D/E-series)'
2012-09-24 20:57:33,569 DEBUG [VideoDeliveryEngine] Delivering file 'h_tapezieren.flv' using transcoding
2012-09-24 20:57:33,569 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/192.168.178.22, Profile=Samsung TV / player (C/D/E-series)'
2012-09-24 20:57:33,569 DEBUG [MediaItemDAOImpl] Getting file of media item 320
2012-09-24 20:57:33,570 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: /media/Data/_downloads/DIY/BAUHAUS/h_tapezieren.flv
2012-09-24 20:57:33,571 DEBUG [ProcessExecutor] Starting ffmpeg -i /media/Data/_downloads/DIY/BAUHAUS/h_tapezieren.flv -y -threads 1 -copyts -c:v mpeg2video -b:v 20000k -maxrate:v 20000k -bufsize:v 20000k -r 24000/1001 -g 15 -c:a ac3 -b:a 48k -ac 1 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-320-7-ORIGINAL.stf
2012-09-24 20:57:33,600 WARN  [ProcessExecutor] Process ffmpeg has a return code of 1! This is a possible error.
2012-09-24 20:57:33,600 DEBUG [TranscodingJobListener] Transcoding finished; successful: false
2012-09-24 20:57:41,074 ERROR [ResourceTransportRequestHandler] Error while processing resource, sending back 500 error. Message: Transcoded file '/tmp/Serviio/transcoding-temp-320-7-ORIGINAL.stf' cannot be found, FFmpeg execution probably failed
java.io.IOException: Transcoded file '/tmp/Serviio/transcoding-temp-320-7-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)
2012-09-24 20:57:41,242 DEBUG [DiscoveryAdvertisementNotifier] Multicasting SSDP alive using interface vmnet1 (vmnet1) and address 172.16.108.1, timeout = 0
2012-09-24 20:57:41,242 DEBUG [DiscoveryAdvertisementNotifier] Sending 6 'alive' messages describing device 7b29969c-e86a-32b6-a341-5b48c546bf04
2012-09-24 20:57:42,179 DEBUG [WebServer] Incoming connection from /192.168.178.22:60948
2012-09-24 20:57:42,180 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.178.22
2012-09-24 20:57:42,181 DEBUG [ServiceControlRequestHandler] ServiceControl request received for action '"urn:schemas-upnp-org:service:ContentDirectory:1#X_GetFeatureList"' from 192.168.178.22:
2012-09-24 20:57:42,181 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.178.22
2012-09-24 20:57:42,188 DEBUG [ServiceControlRequestHandler] Returning OK SOAP message
2012-09-24 20:57:43,046 DEBUG [DiscoveryAdvertisementNotifier] Multicasting SSDP alive using interface vmnet8 (vmnet8) and address 172.16.192.1, timeout = 0
2012-09-24 20:57:43,047 DEBUG [DiscoveryAdvertisementNotifier] Sending 6 'alive' messages describing device 7b29969c-e86a-32b6-a341-5b48c546bf04
2012-09-24 20:57:44,851 DEBUG [DiscoveryAdvertisementNotifier] Multicasting SSDP alive using interface wlan0 (wlan0) and address 192.168.178.25, timeout = 0
2012-09-24 20:57:44,852 DEBUG [DiscoveryAdvertisementNotifier] Sending 6 'alive' messages describing device 7b29969c-e86a-32b6-a341-5b48c546bf04
2012-09-24 20:57:46,657 DEBUG [DiscoveryAdvertisementNotifier] Will advertise again in 00:00:36

Re: Transcoding does not work (anymore)

PostPosted: Tue Sep 25, 2012 5:01 am
by sampath.mamilapo
In case this is important: the folder '/tmp/Serviio' does exist.

Re: Transcoding does not work (anymore)

PostPosted: Tue Sep 25, 2012 1:29 pm
by jhb50
Run the command
ffmpeg -i /media/Data/_downloads/DIY/BAUHAUS/h_tapezieren.flv -y -threads 1 -copyts -c:v mpeg2video -b:v 20000k -maxrate:v 20000k -bufsize:v 20000k -r 24000/1001 -g 15 -c:a ac3 -b:a 48k -ac 1 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-320-7-ORIGINAL.stf

and post the output. It will show the errors that caused ffmpeg to fail. Unfortunately Serviio does not display these messages in its log.

Re: Transcoding does not work (anymore)

PostPosted: Tue Sep 25, 2012 7:34 pm
by sampath.mamilapo
Unrecognized option 'c:v'

  Code:
ffmpeg -i /media/Data/_downloads/DIY/BAUHAUS/h_tapezieren.flv -y -threads 1 -copyts -c:v mpeg2video -b:v 20000k -maxrate:v 20000k -bufsize:v 20000k -r 24000/1001 -g 15 -c:a ac3 -b:a 48k -ac 1 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-320-7-ORIGINAL.stf
ffmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
  built on Jun 12 2012 16:37:58 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[flv @ 0x8c650e0] warning: first frame is no keyframe
[flv @ 0x8c63240] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 15.00 (15/1)
Input #0, flv, from '/media/Data/_downloads/DIY/BAUHAUS/h_tapezieren.flv':
  Metadata:
    datasize        : 29741111
    lasttimestamp   : 619667
    audiosize       : 4002893
    videosize       : 25737964
    metadatacreator : inlet media - FLVTool2
    encoder         : Riva FLV Encoder
  Duration: 00:10:19.73, start: 0.000000, bitrate: 388 kb/s
    Stream #0.0: Video: flv, yuv420p, 384x288, 338 kb/s, 15 tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: mp3, 44100 Hz, mono, s16, 49 kb/s
Unrecognized option 'c:v'
Failed to set value 'mpeg2video' for option 'c:v'

Re: Transcoding does not work (anymore)

PostPosted: Tue Sep 25, 2012 7:38 pm
by sampath.mamilapo
When I use avconv instead of ffmpeg it transcodes the file successfully. I just played it in VLC.

Maybe Serviio can just use avconv on Linux instead of ffmpeg?

Re: Transcoding does not work (anymore)

PostPosted: Tue Sep 25, 2012 7:56 pm
by will
You really should use the latest ffmpeg, having said that, add -Dffmpeg.location=/path/to/avconv to the JAVA_OPTS line at the bottom of serviio.sh and Serviio will use it

Re: Transcoding does not work (anymore)

PostPosted: Tue Sep 25, 2012 8:30 pm
by sampath.mamilapo
I will try that. Thanks!

I have the default ffmpeg 4:0.8.3-0ubuntu0.12.04.1 that comes with Ubuntu. What should I do to install the current ffmpeg?

I think avconv is just a wrapper around ffmpeg, right?

Re: Transcoding does not work (anymore)

PostPosted: Tue Sep 25, 2012 8:39 pm
by will
There is a guide on the wiki under Linux.

Re: Transcoding does not work (anymore)

PostPosted: Wed Sep 26, 2012 7:57 am
by sampath.mamilapo
The tip to include avconv in serviio.sh worked great. Thanks!!!

Maybe Serviio could check the ffmpeg version or something like that and warn the user via Swing-Dialog that something is wrong with ffmpeg.

Cheers,
Sampy