Page 1 of 1

Problems with h264-avi and MOV on Sony PS3

PostPosted: Sun Mar 06, 2011 2:48 am
by Nutte
I'm unable to play h264 avi's and MOV's; unfortunately two of the file-types I use the most. Most other files seem to play back fine. I did try to search for posts describing similar issues, but to my surprise I couldn't find any. I've no problem playing the files using any regular desktop player.

- The h264-encoded avi's are encoded using the latest FairUse Wizard. When I try to play on my PS3 I get "Media Server Error: A network error has occurred. (00000000)" (after a 5-10s delay).

-The MOV-files are 720p movies shot with a Canon SX200IS camera. When I try to play on my PS3 I get "The data is corrupted."


Serviio OS: Windows 7 x64 on Intel i7 920 with 6GB.
Serviio settings: Version 0.5, enable transcoding, tried both "downmix to stereo" and "keep original", untouched xml/setting-files (started reading the "Transcoding configuration", but no idea how to correctly edit this).
Playback devices: Sony PS3, secondary device Sony TV KDL-46NX810.


As instructed, I did run the included ffmpeg with the -i switch on the problematic files and got the following output...

AVI h264 example:
    C:\Program Files (x86)\Serviio\lib>ffmpeg.exe -i "F:\NEO - non HD\Mickey Mouse Clubhouse\Minnie's Masquerade - 4 - Secret Spy Daisy.avi"
    FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
    built on Jan 10 2011 21:46:22 with gcc 4.4.2
    configuration: --enable-static --disable-shared --disable-shared --disable-ffplay --disable-ffserver --enable-memalign
    -hack --enable-libmp3lame --arch=x86 --enable-runtime-cpudetect --enable-w32threads --target-os=mingw32 --cross-prefix=i
    686-mingw32-
    libavutil 50.36. 0 / 50.36. 0
    libavcore 0.16. 0 / 0.16. 0
    libavcodec 52.108. 0 / 52.108. 0
    libavformat 52.92. 0 / 52.92. 0
    libavdevice 52. 2. 3 / 52. 2. 3
    libavfilter 1.72. 0 / 1.72. 0
    libswscale 0.12. 0 / 0.12. 0
    [avi @ 011dbfe0] max_analyze_duration reached
    Input #0, avi, from 'F:\NEO - non HD\Mickey Mouse Clubhouse\Minnie's Masquerade - 4 - Secret Spy Daisy.avi':
    Metadata:
    encoder : FairUse Wizard - http://fairusewizard.com
    Duration: 00:24:01.81, start: 0.000000, bitrate: 837 kb/s
    Stream #0.0: Video: h264, yuv420p, 704x512 [PAR 1:1 DAR 11:8], 23.98 fps, 23.98 tbr, 23.98 tbn, 47.95 tbc
    Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 192 kb/s
    At least one output file must be specified


MOV-example:
    C:\Program Files (x86)\Serviio\lib>ffmpeg.exe -i "D:\pics\Neo (aka Junior)\Movies 2010\2010-12-12 Rudolph song at North Pole Express in Grapevine.MOV"
    FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
    built on Jan 10 2011 21:46:22 with gcc 4.4.2
    configuration: --enable-static --disable-shared --disable-shared --disable-ffplay --disable-ffserver --enable-memalign
    -hack --enable-libmp3lame --arch=x86 --enable-runtime-cpudetect --enable-w32threads --target-os=mingw32 --cross-prefix=i
    686-mingw32-
    libavutil 50.36. 0 / 50.36. 0
    libavcore 0.16. 0 / 0.16. 0
    libavcodec 52.108. 0 / 52.108. 0
    libavformat 52.92. 0 / 52.92. 0
    libavdevice 52. 2. 3 / 52. 2. 3
    libavfilter 1.72. 0 / 1.72. 0
    libswscale 0.12. 0 / 0.12. 0

    Seems stream 0 codec frame rate differs from container frame rate: 6000.00 (6000/1) -> 30.00 (30/1)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\pics\Neo (aka Junior)\Movies 2010\2010-12-12 Rudolph song at North Pole Expr
    ess in Grapevine.MOV':
    Metadata:
    major_brand : qt
    minor_version : 537331968
    compatible_brands: qt CAEP
    creation_time : 2010-12-12 21:40:45
    Duration: 00:00:44.80, start: 0.000000, bitrate: 23788 kb/s
    Stream #0.0(eng): Video: h264, yuvj420p, 1280x720, 23080 kb/s, 30 fps, 30 tbr, 3k tbn, 6k tbc
    Metadata:
    creation_time : 2010-12-12 21:40:45
    Stream #0.1(eng): Audio: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s
    Metadata:
    creation_time : 2010-12-12 21:40:45
    At least one output file must be specified


Thanks for a great program. I do stumble upon a few issues, but it's by far the best DLNA-server I've tried.

Please let me know if you need more info.

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Sun Mar 06, 2011 9:01 am
by Illico
Could you check with MediaInfo?
Do you try by remuxing files in .ts or .m2ts with TsMuxer or .mkv with MKVToolnix ?

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Sun Mar 06, 2011 10:34 pm
by Nutte
Below are the output from MediaInfo for the same files. I don't really know what you ask about remuxing. I know what remuxing is, but is it possible to specify how to remux in Serviio? I've no experience with the tools you mention and never done any remuxing.


    General
    Complete name : F:\NEO - non HD\Mickey Mouse Clubhouse\Minnie's Masquerade - 4 - Secret Spy Daisy.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 144 MiB
    Duration : 24mn 1s
    Overall bit rate : 837 Kbps
    Writing application : FairUse Wizard - http://fairusewizard.com
    Writing library : The best and REALLY easy backup tool

    Video
    ID : 0
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L3.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 2 frames
    Codec ID : H264
    Duration : 24mn 1s
    Bit rate : 636 Kbps
    Width : 704 pixels
    Height : 512 pixels
    Display aspect ratio : 1.375
    Frame rate : 23.976 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.074
    Stream size : 109 MiB (76%)
    Writing library : x264 core 93 r1538bm bd72d46
    Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x131 / me=hex / subme=4 / psy=1 / psy_rd=0.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=0 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=8 / sliced_threads=1 / slices=8 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=2 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / wpredp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=26 / ip_ratio=1.40 / pb_ratio=1.30 / aq=0

    Audio
    ID : 1
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Mode : Joint stereo
    Mode extension : MS Stereo
    Codec ID : 55
    Codec ID/Hint : MP3
    Duration : 24mn 1s
    Bit rate mode : Constant
    Bit rate : 192 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Stream size : 33.0 MiB (23%)
    Alignment : Aligned on interleaves
    Interleave, duration : 42 ms (1.00 video frame)
    Interleave, preload duration : 504 ms
    Writing library : LAME3.97
    Encoding settings : -m j -V 4 -q 2 -lowpass 18.6 -b 192






    General
    Complete name : D:\pics\Neo (aka Junior)\Movies 2010\2010-12-12 Rudolph song at North Pole Express in Grapevine.MOV
    Format : MPEG-4
    Format profile : QuickTime
    Codec ID : qt
    File size : 127 MiB
    Duration : 44s 800ms
    Overall bit rate : 23.8 Mbps
    Encoded date : UTC 2010-12-12 21:40:45
    Tagged date : UTC 2010-12-12 21:40:45

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Baseline@L4.1
    Format settings, CABAC : No
    Format settings, ReFrames : 1 frame
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 44s 800ms
    Bit rate mode : Variable
    Bit rate : 23.1 Mbps
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 30.000 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.835
    Stream size : 123 MiB (97%)
    Language : English
    Encoded date : UTC 2010-12-12 21:40:45
    Tagged date : UTC 2010-12-12 21:40:45
    Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
    Transfer characteristics : BT.709-5, BT.1361
    Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M

    Audio
    ID : 2
    Format : PCM
    Format settings, Endianness : Little
    Format settings, Sign : Signed
    Codec ID : sowt
    Duration : 44s 800ms
    Bit rate mode : Constant
    Bit rate : 705.6 Kbps
    Channel(s) : 1 channel
    Sampling rate : 44.1 KHz
    Bit depth : 16 bits
    Stream size : 3.77 MiB (3%)
    Language : English
    Encoded date : UTC 2010-12-12 21:40:45
    Tagged date : UTC 2010-12-12 21:40:45

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Sun Mar 13, 2011 9:53 pm
by Nutte
FYI

I tried the new version 0.5.1, but I unfortunately get the exact same errors.

Anything at all I can do to help fix this?

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Tue Jul 12, 2011 9:49 pm
by Nutte
No input on these file types?
I'm really surprised I haven't seen any posts from other PS3-users, as I imagine the file types are rather common. I've tried version 0.5.2, but I get the exact same errors.

Any pointers on how I can test and change settings myself? As no other DHCP server software I've tested comes even close to Serviio it would mean a lot to me to be able to play h264 and MOV files, so any assistance is greatly appreciated. I'll sure be happy to support by donating...

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Wed Jul 13, 2011 6:58 am
by Illico
Could you try that:
"add this line <Matches container="mp4" vCodec="h264" />"

  Code:
   <Profile id="4" name="Playstation 3" extendsProfileId="1">
      <Detection>
         <HttpHeaders>
            <X-AV-Client-Info>.*PLAYSTATION 3.*</X-AV-Client-Info>
         </HttpHeaders>   
      </Detection>
      <MediaFormatProfiles>
         <MediaFormatProfile mime-type="video/divx">AVI</MediaFormatProfile>
      </MediaFormatProfiles>
      <Transcoding>
         <!--
            remux MKV with any video to MPEG2TS and possibly change audio to ac3, also AVI anfd FLV with H264
         -->
         <Video targetContainer="mpegts" targetACodec="ac3">
            <Matches container="matroska" />
            <Matches container="avi" vCodec="h264" />
                <Matches container="mp4" vCodec="h264" />
            <Matches container="flv" vCodec="h264" />
         </Video>
         <!-- all other unplayable files just transcode to mpeg2 -->
         <Video targetContainer="mpegts" targetACodec="ac3" targetVCodec="mpeg2video">
            <Matches container="flv" />
         </Video>
      </Transcoding>
      <LimitImageResolution>false</LimitImageResolution>
   </Profile>


These two files must be transcoded, could you enable detailed logging (see signature link), look at ffmpeg command line used in the log file for these files to be transcoded, and post result here.

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Thu Jul 14, 2011 5:01 am
by Nutte
Thanks a lot for your response. I did as you instructed and the MOV-files now works and the quality is excellent, i.e. I can't tell it's being transcoded. Awesome!!! Thank you very much!!

Example of ffmpeg log output with working MOV-file:
  Code:
2011-07-13 23:34:19,347 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i D:\pics\Neo & Martin\Movies 2010\2010-01-03 Growling with some cheese's.MOV -y -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 192k -ar 44100 -ac 1 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-13279-MPEG2TS.stf



The h264 AVI's still don't work. Here is a snippet of the log-file where you can spot an IOException:
  Code:
2011-07-13 23:30:12,403 DEBUG [VideoDeliveryEngine] Delivering item '726' for client 'IPAddress=/192.168.0.8, Profile=Playstation 3'
2011-07-13 23:30:12,403 DEBUG [VideoDeliveryEngine] Delivering file 'Mickey's Numbers Roundup - 3 - Mickey's Big Surprise.avi' using transcoding
2011-07-13 23:30:12,404 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/192.168.0.8, Profile=Playstation 3'
2011-07-13 23:30:12,404 DEBUG [MediaItemDAOImpl] Getting file of media item 726
2011-07-13 23:30:12,405 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: F:\NEO - non HD\Mickey Mouse Clubhouse\Mickey's Numbers Roundup - 3 - Mickey's Big Surprise.avi
2011-07-13 23:30:12,405 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i F:\NEO - non HD\Mickey Mouse Clubhouse\Mickey's Numbers Roundup - 3 - Mickey's Big Surprise.avi -y -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-726-MPEG2TS.stf
2011-07-13 23:30:12,512 WARN  [ProcessExecutor] Process C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe has a return code of 1! This is a possible error.
2011-07-13 23:30:12,512 DEBUG [TranscodingJobListener] Transcoding finished; successful: false
2011-07-13 23:30:19,906 ERROR [ResourceTransportRequestHandler] Error while processing resource, sending back 500 error. Message: FFmpeg execution failed
java.io.IOException: FFmpeg execution failed
   at org.serviio.delivery.resource.AbstractTranscodingDeliveryEngine.retrieveTranscodedResource(AbstractTranscodingDeliveryEngine.java:116)
   at org.serviio.delivery.resource.AbstractDeliveryEngine.deliver(AbstractDeliveryEngine.java:89)
   at org.serviio.delivery.MediaResourceRetrievalStrategy.retrieveResource(MediaResourceRetrievalStrategy.java:116)
   at org.serviio.upnp.webserver.ResourceTransportRequestHandler.handleRequest(ResourceTransportRequestHandler.java:115)
   at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:54)
   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:187)



Please let me know if there is anything else you want me to test or try.

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Thu Jul 14, 2011 11:53 am
by Illico
Could you try this command line locally (type cmd on Start-> Execute):
ffmpeg.exe -i "F:\NEO - non HD\Mickey Mouse Clubhouse\Mickey's Numbers Roundup - 3 - Mickey's Big Surprise.avi" -y -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\TEST.ts
And post here the command result

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Thu Jul 14, 2011 3:16 pm
by Nutte
This is what I got:

  Code:
c:\Program Files (x86)\Serviio\lib>ffmpeg.exe -i "F:\NEO - non HD\Mickey Mouse Clubhouse\Mickey's Numbers Roundup - 3 -
Mickey's Big Surprise.avi" -y -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 192k -ac 2 -map 0:0 -map 0:1
sn -f mpegts C:\Windows\TEMP\Serviio\TEST.ts
FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jan 10 2011 21:46:22 with gcc 4.4.2
  configuration: --enable-static --disable-shared --disable-shared --disable-ffplay --disable-ffserver --enable-memalig
-hack --enable-libmp3lame --arch=x86 --enable-runtime-cpudetect --enable-w32threads --target-os=mingw32 --cross-prefix=
686-mingw32-
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.92. 0 / 52.92. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.72. 0 /  1.72. 0
  libswscale     0.12. 0 /  0.12. 0
[avi @ 0128fea0] max_analyze_duration reached
Input #0, avi, from 'F:\NEO - non HD\Mickey Mouse Clubhouse\Mickey's Numbers Roundup - 3 - Mickey's Big Surprise.avi':
  Metadata:
    encoder         : FairUse Wizard - http://fairusewizard.com
  Duration: 00:24:03.56, start: 0.000000, bitrate: 697 kb/s
    Stream #0.0: Video: h264, yuv420p, 704x512 [PAR 1:1 DAR 11:8], 23.98 fps, 23.98 tbr, 23.98 tbn, 47.95 tbc
    Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 192 kb/s
[ac3 @ 032e4c00] No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[mpegts @ 01290e40] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'C:\Windows\TEMP\Serviio\TEST.ts':
  Metadata:
    encoder         : Lavf52.92.0
    Stream #0.0: Video: H264 / 0x34363248, yuv420p, 704x512 [PAR 1:1 DAR 11:8], q=2-31, 90k tbn, 23.98 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, stereo, flt, 192 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
h264_mp4toannexb failed for stream 0, codec copy: Invalid data found when processing input
[mpegts @ 01290e40] first pts value must set
av_interleaved_write_frame(): Operation not permitted

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Thu Jul 14, 2011 4:46 pm
by Illico
So this movie file is not supported by ffmpeg, you have to re-encode the source.

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Thu Jul 14, 2011 4:57 pm
by Nutte
Thanks for very quick reply!

Hmmm, that is surprising since I'm pretty sure it's created by ffmpeg.
As I mentioned, and as you can see in the file meta data, it is created by FairUse Wizard which uses ffmpeg. Isn't that strange?

I guess I'll have to go back to use Xvid (which has always worked fine, although the file size is about 50% larger), or look for another encoder/ripper. Recommendations?

Re: Problems with h264-avi and MOV on Sony PS3

PostPosted: Sun Jul 31, 2011 2:35 am
by Nutte
I've been testing a lot lately to find out what format that works best with the PS3, and also is a good option in general. I.e. I've tested a bunch of different settings in Fairuse Wizard and tried to play the files on PS3 via Serviio.

My conclusion is that the only option that works perfect with the PS3 and Serviio is Xvid with AVI container, which happens to be what I used 1-2 years ago before (unfortunately) switching to h264. This is the only setting (of the ones in Fairuse I've been interested to test with) I've found that always plays back awesome and works with the scene selection (including preview) and fast forward/reverse.

Anyone care to comment on that? What encoding or container format works best for you?



Just some rambling below on my findings. Thought it might help out somebody trying to do the same thing...

Container:
I would love to use mkv because it's open source and it supports chapters (which is just awesome, although it doesn't work with PS3). While mkv-files can be played back fine I never got jumping in a movie to work very well with any settings. The scene selection preview didn't work at all. I also tried the "PS3-profile" in Fairuse Wizard which generates a mp4-file, but that also had the same issue as mkv while jumping around in a movie. To get the smoothest operation I had to go with AVI.

Video encoder:
I struggled a long time with the x264 setting in Fairuse and it took some time for me to find out why the files from one computer worked, but not from another. It turned out that I used the internal h264-encoder on one computer, but external on the other. The files encoded by the internal x264 (x264 core 93 r1538bm bd72d46) in the latest version of Fairuse did not play back on the PS3, but if I used a later version of x264 (x264 core 115 r1947kMod b5a8ad7) the files did play back on PS3. I noticed some strange artifacts every now and then though that I never see with Xvid. Xvid just seems like a safer and more problem free choice.

Audio encoder:
Both MP3 and AC3 works fine with Xvid using AVI. Which is the best option?