Transcoding for iPhone
I try to create a working transcoding setup for the iPhone right now. Here's a short version of what we discussed in the Feature Request forum: The iPhone can on play AVC/AAC from an MP4 container natively, but there is an app called AirPlayer which brings some more codecs, and I thought I might give it a try and start with a profile that transcodes everything to a single target format.
I'm quite new to creating profiles, and there is a major flaw in this one:
[code]<Profile id="12" name="iPhone" extendsProfileId="1">
<Detection>
<User-Agent>Lavf52.54.0</User-Agent>
</Detection>
<MediaFormatProfiles>
<MediaFormatProfile mime-type="video/mpeg">MPEG_PS_PAL</MediaFormatProfile>
</MediaFormatProfiles>
<Transcoding>
<Video targetContainer="mpeg" targetACodec="aac" targetVCodec="mpeg2video" maxVBitrate="2048">
<Matches container="matroska" />
<Matches container="mp4" />
<Matches container="avi" />
<Matches container="mpegts" />
</Video>
</Transcoding>
</Profile>[/code]
According to the logs, the user-agent part actually works, the correct profile section is pulled, but the video never starts to play on the iPhone. I can see from the logs that a transcoding process ist started for each and every file in the directory I tried to play a file from, and every file is delivered to my device, and eventually skipped.
[code]2011-01-23 19:44:37,640 DEBUG [WebServer] Incoming connection from /10.240.11.244:51394
2011-01-23 19:44:37,640 DEBUG [ResourceTransportRequestHandler] GET /resource/46643/MEDIA_ITEM/MPEG_TS_SD_EU_ISO HTTP/1.1, headers = [User-Agent: Lavf52.54.0, Accept: */*, Range: bytes=0-, Host: 10.240.11.11:8895, Authorization: Basic, Connection: close, ]
2011-01-23 19:44:37,640 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/10.240.11.244, Profile=iPhone'
2011-01-23 19:44:37,640 DEBUG [ResourceTransportRequestHandler] Request for resource 46643 and type 'MEDIA_ITEM' received
2011-01-23 19:44:37,640 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 46643)
2011-01-23 19:44:37,640 DEBUG [VideoDAOImpl] Reading a Video (id = 46643)
2011-01-23 19:44:37,640 DEBUG [VideoDeliveryEngine] Delivering item '46643' for client 'IPAddress=/10.240.11.244, Profile=iPhone'
2011-01-23 19:44:37,640 DEBUG [VideoDeliveryEngine] Delivering file 'MSCM S02E01 - Mr. Teddybär (Mr Teddy Bear) 101208 ANFANG FEHLT(ts).ts' using transcoding
2011-01-23 19:44:37,640 DEBUG [VideoDeliveryEngine] Stopping previous transcoding job of file 'D:\TEMP\Serviio\transcoding-temp-46598-MPEG2PS.stf'
2011-01-23 19:44:37,640 DEBUG [VideoDeliveryEngine] Deleted temp file 'D:\TEMP\Serviio\transcoding-temp-46598-MPEG2PS.stf': true
2011-01-23 19:44:37,640 DEBUG [VideoDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/10.240.11.244, Profile=iPhone'
2011-01-23 19:44:37,640 DEBUG [MediaItemDAOImpl] Getting file of media item 46643
2011-01-23 19:44:37,656 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode file: F:\daten\mm2\videos\Serien\MSCM S02E01 - Mr. Teddybär (Mr Teddy Bear) 101208 ANFANG FEHLT(ts).ts
2011-01-23 19:44:37,656 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -threads 1 -i F:\daten\mm2\videos\Serien\MSCM S02E01 - Mr. Teddybär (Mr Teddy Bear) 101208 ANFANG FEHLT(ts).ts -y -vcodec copy -copyts -acodec aac -ab 192k -sn -f vob D:\TEMP\Serviio\transcoding-temp-46643-MPEG2PS.stf
2011-01-23 19:44:38,156 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file MSCM S02E01 - Mr. Teddybär (Mr Teddy Bear) 101208 ANFANG FEHLT(ts).ts: MPEG_PS_PAL
2011-01-23 19:44:38,156 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file MSCM S02E01 - Mr. Teddybär (Mr Teddy Bear) 101208 ANFANG FEHLT(ts).ts: MPEG_PS_NTSC
2011-01-23 19:44:38,156 ERROR [ResourceTransportRequestHandler] Error while processing resource, sending back 500 error. Message: No media description available for required version: MPEG_TS_SD_EU_ISO
2011-01-23 19:44:38,359 DEBUG [WebServer] Incoming connection from /10.240.11.244:51395
2011-01-23 19:44:38,359 DEBUG [ResourceTransportRequestHandler] GET /resource/46644/MEDIA_ITEM/MPEG_TS_SD_EU_ISO HTTP/1.1, headers = [User-Agent: Lavf52.54.0, Accept: */*, Range: bytes=0-, Host: 10.240.11.11:8895, Authorization: Basic, Connection: close, ]
2011-01-23 19:44:38,359 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/10.240.11.244, Profile=iPhone'
2011-01-23 19:44:38,359 DEBUG [ResourceTransportRequestHandler] Request for resource 46644 and type 'MEDIA_ITEM' received
2011-01-23 19:44:38,359 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 46644)
2011-01-23 19:44:38,359 DEBUG [VideoDAOImpl] Reading a Video (id = 46644)
2011-01-23 19:44:38,359 DEBUG [VideoDeliveryEngine] Delivering item '46644' for client 'IPAddress=/10.240.11.244, Profile=iPhone'
2011-01-23 19:44:38,359 DEBUG [VideoDeliveryEngine] Delivering file 'MSCM S02E02 - Treibstoff 23 (Propellant 23) 101209(ts).ts' using transcoding
2011-01-23 19:44:38,359 DEBUG [VideoDeliveryEngine] Stopping previous transcoding job of file 'D:\TEMP\Serviio\transcoding-temp-46643-MPEG2PS.stf'
2011-01-23 19:44:38,359 DEBUG [ProcessExecutor] Stopping external process: Thread[Thread-32,5,main]
2011-01-23 19:44:38,359 DEBUG [TranscodingJobListener] Transcoding finished; successful: false
2011-01-23 19:44:38,359 DEBUG [VideoDeliveryEngine] Deleted temp file 'D:\TEMP\Serviio\transcoding-temp-46643-MPEG2PS.stf': true
2011-01-23 19:44:38,359 DEBUG [VideoDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/10.240.11.244, Profile=iPhone'
2011-01-23 19:44:38,359 DEBUG [MediaItemDAOImpl] Getting file of media item 46644
2011-01-23 19:44:38,375 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode file: F:\daten\mm2\videos\Serien\MSCM S02E02 - Treibstoff 23 (Propellant 23) 101209(ts).ts
2011-01-23 19:44:38,375 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -threads 1 -i F:\daten\mm2\videos\Serien\MSCM S02E02 - Treibstoff 23 (Propellant 23) 101209(ts).ts -y -vcodec copy -copyts -acodec aac -ab 192k -sn -f vob D:\TEMP\Serviio\transcoding-temp-46644-MPEG2PS.stf
2011-01-23 19:44:38,875 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file MSCM S02E02 - Treibstoff 23 (Propellant 23) 101209(ts).ts: MPEG_PS_PAL
2011-01-23 19:44:38,875 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file MSCM S02E02 - Treibstoff 23 (Propellant 23) 101209(ts).ts: MPEG_PS_NTSC
2011-01-23 19:44:38,875 ERROR [ResourceTransportRequestHandler] Error while processing resource, sending back 500 error. Message: No media description available for required version: MPEG_TS_SD_EU_ISO
2011-01-23 19:44:39,078 DEBUG [WebServer] Incoming connection from /10.240.11.244:51396 [/code]
And so on. Is there any hint of what's going wrong here? It DOES play MPEG2PS files (*.mpg), though, if a bit jerky. Yes, I can see the "No media description available for required version: MPEG_TS_SD_EU_ISO" in the logs, but haven't got a clue what to do about it.
Sorry, I'm stuck,
Low