Page 1 of 1

Transcoding performance on NAS

PostPosted: Mon Dec 03, 2012 2:55 am
by wolfman316
Hi guys,

I installed Serviio on my Iomega ix-200. Not surprisingly when transcoding .mkv file to PS3 the Iomega is not keeping up.

I was wondering which NAS would have the performance capable to transcode on the fly HD (720p - 1024p) movies.

I'm looking at the QNaps and Sysnology but I really want to choose one that will transcode on the fly.

Thanks
Pat

Re: Transcoding performance on NAS

PostPosted: Mon Dec 03, 2012 12:39 pm
by zip
If you wnt to transcode, none of the NASes will be able to do HD on the fly. Remuxing they can do. AFAIK the PS3 profile only remuxes MKVs so I'm surprised the device doesn't cope.

Re: Transcoding performance on NAS

PostPosted: Mon Dec 03, 2012 1:22 pm
by csholmq
It looks like your NAS has the Marvell 6282 CPU which is an ARM CPU.

Try setting -Dserviio.fixedPointEncoders to force e.g ad3_fixed instead of the floating point version in ffmpeg. It did miracles on my NAS.

Re: Transcoding performance on NAS

PostPosted: Tue Dec 04, 2012 3:44 am
by wolfman316
Hi Petr,

So you are correct, I had not realized that some .mkv are re-muxing only and the NAS is keeping up. I had not realized that some were playing fine and others not as I just finished the install on my NAS a few days ago.

That said I did confirm that some files my NAS is not keeping up with. Here is the ffmpeg command from the debug log of a file that is not streaming to the PS3.

Starting ffmpeg -fflags +genpts -i /mnt/soho_storage/samba/shares/public/Media/Videos/HD Movies/xxxxxxxxx.mkv -y -copyts -c:v copy -vbsf h264_mp4toannexb -c:a ac3 -b:a 384k -map 0:0 -map 0:1 -sn -f mpegts /opt/serviio-1.0.1/buffer/Serviio/transcoding-temp-10-4-ORIGINAL.stf

Thanks

Re: Transcoding performance on NAS

PostPosted: Tue Dec 04, 2012 3:48 am
by wolfman316
Actually, the PS3 returns "data type is not supported" and I assumed it was due to the transcoding being too slow as I can see the .stf file growing at a rate of about 1MB/sec.

But perhaps it something else.

Re: Transcoding performance on NAS

PostPosted: Tue Dec 04, 2012 4:04 am
by wolfman316
Ok, so it looks like it is transcoding DTS to AC3 ?

Why is it transcoding audio. I thought PS3 was capable of handling DTS ? Should it not leave audio alone ?

This is the output if I run the same ffmpeg command that Serviio is doong.

root@StorCenter:/# ffmpeg -fflags +genpts -i "/mnt/soho_storage/samba/shares/public/Media/Videos/HD Movies/xxx.mkv" -y -copyts -c:v copy -vbsf h264_mp4toannexb -c:a copy -map 0:0 -map 0:1 -sn -f mpegts /opt/serviio-1.0.1/buffer/Serviio/transcoding-temp-10-4-ORIGINAL.stf
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 1 2012 22:57:45 with gcc 4.2.3 (GCC)
configuration: --arch=arm --enable-armv5te --prefix=/opt --extra-cflags=-I/opt/include --extra-ldflags=-L/opt/lib --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
Input #0, matroska,webm, from '/mnt/soho_storage/samba/shares/public/Media/Videos/HD Movies/xxx.mkv':
Metadata:
creation_time : 2012-01-05 01:52:08
Duration: 02:06:50.64, start: 0.000000, bitrate: 13622 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x816, SAR 1:1 DAR 40:17, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s (default)
[mpegts @ 0xfa0e60] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to '/opt/serviio-1.0.1/buffer/Serviio/transcoding-temp-10-4-ORIGINAL.stf':
Metadata:
encoder : Lavf54.29.104
Stream #0:0(eng): Video: h264, yuv420p, 1920x816 [SAR 1:1 DAR 40:17], q=2-31, 23.98 fps, 90k tbn, 23.98 tbc
Stream #0:1(eng): Audio: dts, 48000 Hz, 5.1(side), 1536 kb/s (default)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 9600 fps=163 q=-1.0 size= 668075kB time=00:06:40.51 bitrate=13664.7kbits/s

Pat

Re: Transcoding performance on NAS

PostPosted: Tue Dec 04, 2012 4:33 pm
by zip
PS3 dosn't handle DTS, afaik. Anyway, try to use the fixed point ac3 encoded, as suggested above.

The command above only remuxes video (-codec:v copy), so it's the audio encoding it can't cope with.

Re: Transcoding performance on NAS

PostPosted: Wed Dec 05, 2012 4:00 am
by wolfman316
I tried a few more things. The setting -Dserviio.fixedPointEncoders did not help. Still get "data type unsupported".

I installed Serviio on my iMac and I get the same error on the PS3. So now I don't think its the NAS not coping with the audio transcoding but rather something with this file.

Can you think of why this file will not work on the PS3 ? Here is the full log.

Accept-Encoding: identity,transferMode.dlna.org: Streaming,X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment"; mn="PLAYSTATION 3"; mv="1.0";,TimeSeekRange.dlna.org: npt=0.000-]]
2012-12-05 03:54:47,063 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.100
2012-12-05 03:54:47,065 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'IPAddress=/192.168.1.100, Profile=Playstation 3'
2012-12-05 03:54:47,066 DEBUG [ResourceDeliveryProcessor] Request for resource 10 and type 'MEDIA_ITEM' received
2012-12-05 03:54:47,067 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 10 (local)
2012-12-05 03:54:47,067 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 10)
2012-12-05 03:54:47,070 DEBUG [VideoDAOImpl] Reading a Video (id = 10)
2012-12-05 03:54:47,073 DEBUG [VideoDeliveryEngine] Delivering item '10' for client 'IPAddress=/192.168.1.100, Profile=Playstation 3'
2012-12-05 03:54:47,074 DEBUG [VideoDeliveryEngine] Delivering file 'movie.mkv' using transcoding
2012-12-05 03:54:47,075 DEBUG [AbstractTranscodingDeliveryEngine] No other client uses transcoding job of file 'transcoding-temp-2-4-ORIGINAL.stf', will stop the job
2012-12-05 03:54:47,075 DEBUG [AbstractTranscodingDeliveryEngine] Stopping previous transcoding job of file 'transcoding-temp-2-4-ORIGINAL.stf'
2012-12-05 03:54:47,076 DEBUG [ProcessExecutor] Stopping external process: Thread[Thread-682,5,main]
2012-12-05 03:54:47,179 DEBUG [ProcessUtils] Sending kill -9 to the Unix process: 13785
2012-12-05 03:54:47,180 DEBUG [ProcessExecutor] Starting kill -9 13785
2012-12-05 03:54:47,537 DEBUG [TranscodingJobListener] Transcoding finished; successful: true
2012-12-05 03:54:47,538 DEBUG [TranscodingJobListener] Deleted temp file '/opt/serviio-1.0.1/buffer/Serviio/transcoding-temp-2-4-ORIGINAL.stf': true
2012-12-05 03:54:47,538 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/192.168.1.100, Profile=Playstation 3'
2012-12-05 03:54:47,539 DEBUG [MediaItemDAOImpl] Getting file of media item 10
2012-12-05 03:54:47,541 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: /mnt/soho_storage/samba/shares/public/Media/Videos/HD Movies/movie.mkv
2012-12-05 03:54:47,542 DEBUG [ProcessExecutor] Starting ffmpeg -fflags +genpts -i /mnt/soho_storage/samba/shares/public/Media/Videos/HD Movies/movie.mkv -y -copyts -c:v copy -vbsf h264_mp4toannexb -c:a ac3_fixed -b:a 384k -map 0:0 -map 0:1 -sn -f mpegts /opt/serviio-1.0.1/buffer/Serviio/transcoding-temp-10-4-ORIGINAL.stf
2012-12-05 03:54:48,054 DEBUG [FileBasedTranscodingDeliveryStrategy] Sending transcoding stream
2012-12-05 03:54:48,055 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file movie.mkv: AVC_TS_MP_HD_AC3_ISO
2012-12-05 03:54:48,056 DEBUG [MediaItemDAOImpl] Marking MediaItem (id = 10) as read
2012-12-05 03:54:48,076 DEBUG [LocalContentCacheDecorator] Cleared cache (local_resetafterplay)
2012-12-05 03:54:48,076 DEBUG [ResourceDeliveryProcessor] Stream entity has length: 50000000000
2012-12-05 03:54:48,077 DEBUG [ResourceDeliveryProcessor] Sending file back
2012-12-05 03:54:48,077 DEBUG [ResourceTransportRequestHandler] Creating entity with chunked transfer
2012-12-05 03:54:48,077 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,TimeSeekRange.dlna.org: npt=0.0-7610.0/7610,Date: Wed, 05 Dec 2012 03:54:48 GMT,Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/1.0.1,Cache-control: no-cache,transferMode.dlna.org: Streaming]]
2012-12-05 03:54:59,765 DEBUG [WebServer] I/O error: Broken pipe

Re: Transcoding performance on NAS

PostPosted: Wed Dec 05, 2012 2:07 pm
by zip
I assume something in the H264 stream is not to the PS3's liking

Re: Transcoding performance on NAS

PostPosted: Wed Dec 26, 2012 1:04 pm
by Seb
wolfman316 wrote:I was wondering which NAS would have the performance capable to transcode on the fly HD (720p - 1024p) movies.


As far as media hosting goes, I'm still yet to see a solution that beats an upgraded HP EX490/495 running WHS v1. I bolted a Q8200s core 2 quad in mine which gives it enough horse power to happily transcode a BD25 sized image direct to the TV over 5ghz wifi with no stuttering, buffering or delays whilst drive extender means you can have a single 17tb 'partition' on hand before resorting to throwing USB enclosures at it for extra headroom. It's not a straight drop in solution though, you'll want to be a bit of an avid tinkerer to get the best out of one, you'll want little mods such as lights out to keep the power usage sensible and whilst they are excellent bits of software, they are not so intuitive, you also need to be a little mindful of the drives you choose for it.

Expect to spend £250ish for the server and an S series Core 2 Quad to pop in it.