RMVB support on Mac

For help and support with issues specific to Mac OS X
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

RMVB support on Mac

Postby puppying » Wed Nov 09, 2011 8:07 am

Hi guys...
.rmvb files have been getting "Data corrupted" error on PS3 since PMS 1.10, and this issue only happens on Mac platform
I think I figured out why...
In MEncoderVideo.java, there is a boolean called "directpipe", and starting from revision 281 (PMS 1.09), it's value changed from "false" to "Platform.isMac()"
This created a special handling on Mac platform and broke the support for .rmvb files.

In revision 841 (PMS 1.40.1), this line becomes
Code: Select all
boolean directpipe = (Platform.isMac() || Platform.isFreeBSD());


Since I don't know the purpose of this special handing for Mac and FreeBSD, I decided to only allow .rm and .rmvb files to skip the route.
Anyway, I changed it to:
Code: Select all
boolean directpipe = (Platform.isMac() || Platform.isFreeBSD()) && !(media.container.equals("rm") || media.container.equals("rmvb"));

It seems to be working fine on my box. If any one wants to test it, I uploaded the .dmg file here:
https://www.yousendit.com/directDownload?phi_action=app/directDownload&fl=SWhZekZuTkF0TWxnRXBCc1UyaHhkak9yZWt5UmdteDRsUjJuWENHRzVZbz0&experience=bas
puppying
 
Posts: 1
Joined: Wed Nov 09, 2011 7:30 am

Re: RMVB support on Mac

Postby ckc527 » Mon Feb 13, 2012 6:46 am

Is there an updated .dmg with this fix ?

Thanks,
ckc
ckc527
 
Posts: 3
Joined: Mon Feb 13, 2012 6:44 am

Re: RMVB support on Mac

Postby ckc527 » Mon Feb 13, 2012 6:50 am

can someone provide instructions on how to modify this file? I don't even see this file on my mac.
ckc527
 
Posts: 3
Joined: Mon Feb 13, 2012 6:44 am

Re: RMVB support on Mac

Postby Raptor399 » Mon Feb 13, 2012 9:14 am

ckc527 wrote:can someone provide instructions on how to modify this file? I don't even see this file on my mac.

MencoderVideo.java is part of the PMS source code.
If you intend to change the source code, you will also have to build PMS.

On a side note, the proposed fix may work, but to me it seems a bit odd to have to put media container checks in that code.

I'm not sure what the code introduced in a305ca720c tries to achieve by emptying the params.input_pipes for OSX and FreeBSD:

Code: Select all
         boolean directpipe = Platform.isMac() || Platform.isFreeBSD();
         if (directpipe) {
            cmdArray = Arrays.copyOf(cmdArray, cmdArray.length + 3);
            cmdArray[cmdArray.length - 3] = "-really-quiet";
            cmdArray[cmdArray.length - 2] = "-msglevel";
            cmdArray[cmdArray.length - 1] = "statusline=2";
            cmdArray[cmdArray.length - 4] = "-";
            params.input_pipes = new PipeProcess[2];
         } else {
            pipe = new PipeProcess("mencoder" + System.currentTimeMillis(), (pcm || dts || mux) ? null : params);
            params.input_pipes[0] = pipe;
            cmdArray[cmdArray.length - 1] = pipe.getInputPipe();
         }

The name suggests that this will cause the use of a direct pipe instead of using an intermediate pipe process. What I don't see is how using or not using an intermediate pipe process would break or fix a data corrupted issue. The two should be entirely equivalent. The suggested fix would mean they are not... :-|

The issue needs more investigation.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: RMVB support on Mac

Postby ckc527 » Tue Feb 14, 2012 9:21 am

Hi Raptor,

Here are some additional information.
1- iMac 2.8 Ghz Intel Core 2 Duo, 4GB memory, MAC OS X version 10.7.2 - PMS version 1.50.1
2- I'm streaming to PS3 using default settings.
3- LAN setup: iMac > 100 mbps linksys switch > PS3
4- I believe i'm using MEncoder.
5- When trying to play any *.rmvb files, I'll get the error "The Data Is Corrupted". The files play fine on my iMac.
6- Debug output provided below.
7- Here's MediaInfo text output on one of the rmvb file.

Code: Select all
General
Complete name                            : /Volumes/Seagate HD/Torrent/Movies/RMVB/Kung.Fu.Panda.sample.rmvb
Format                                   : RealMedia
File size                                : 10.5 MiB
Duration                                 : 2mn 52s
Overall bit rate                         : 382 Kbps
Movie name                               : MyEgy.com
Performer                                : Iragon
Copyright                                : MyEgy.com

Video
ID                                       : 1
Format                                   : RealVideo 4
Codec ID                                 : RV40
Codec ID/Info                            : Based on AVC (H.264), Real Player 9
Duration                                 : 2mn 52s
Bit rate                                 : 350 Kbps
Width                                    : 512 pixels
Height                                   : 384 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 23.976 fps
Bits/(Pixel*Frame)                       : 0.074
Stream size                              : 7.18 MiB (68%)

Audio
ID                                       : 0
Format                                   : Cooker
Codec ID                                 : cook
Codec ID/Info                            : Based on G.722.1, Real Player 6
Duration                                 : 2mn 52s
Bit rate                                 : 32.0 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 22.05 KHz
Bit depth                                : 16 bits
Stream size                              : 676 KiB (6%)



Code: Select all
[main] DEBUG 23:47:30.322 Choosing java look and feel: com.apple.laf.AquaLookAndFeel
[main] INFO  23:47:31.647 Starting PS3 Media Server 1.50.1
[main] INFO  23:47:31.648 by shagrath / 2008-2012
[main] INFO  23:47:31.648 http://ps3mediaserver.org
[main] INFO  23:47:31.648 http://code.google.com/p/ps3mediaserver
[main] INFO  23:47:31.648 http://ps3mediaserver.blogspot.com
[main] INFO  23:47:31.648
[main] INFO  23:47:31.649 Java: 1.6.0_29-Apple Inc.
[main] INFO  23:47:31.649 OS: Mac OS X x86_64 10.7.2
[main] INFO  23:47:31.649 Encoding: UTF-8
[main] INFO  23:47:31.649 Working directory: /Applications/PS3 Media Server.app/Contents/Resources/Java
[main] INFO  23:47:31.654 Temp folder: /var/folders/7j/xcyh9ts94g16sqqspn_l17d00000gn/T/ps3mediaserver
[main] INFO  23:47:31.654 Logging config file: /Applications/PS3 Media Server.app/Contents/Resources/Java/logback.xml
[main] INFO  23:47:31.655 debug.log: /Applications/PS3 Media Server.app/Contents/Resources/Java/debug.log
[main] INFO  23:47:31.655
[main] INFO  23:47:31.655 Profile directory: /Users/Peter/Library/Application Support/PMS
[main] INFO  23:47:31.655 Profile path: /Users/Peter/Library/Application Support/PMS/PMS.conf
[main] INFO  23:47:31.656 Profile status: rw
[main] INFO  23:47:31.656 Profile name: silverfire-iMac.local
[main] INFO  23:47:31.656
[main] INFO  23:47:31.660 Loading MediaInfo library
[main] INFO  23:47:31.702 Loaded MediaInfoLib - v0.7.53
[main] INFO  23:47:31.707 Loading renderer configurations from /Applications/PS3 Media Server.app/Contents/Resources/Java/renderers
[main] INFO  23:47:31.708 Loading configuration file: AirPlayer.conf
[main] INFO  23:47:31.719 Loading configuration file: Android.conf
[main] INFO  23:47:31.721 Loading configuration file: Bravia4500.conf
[main] INFO  23:47:31.723 Loading configuration file: Bravia5500.conf
[main] INFO  23:47:31.730 Loading configuration file: BraviaEX.conf
[main] INFO  23:47:31.733 Loading configuration file: FreeboxHD.conf
[main] INFO  23:47:31.735 Loading configuration file: FreecomMusicPal.conf
[main] INFO  23:47:31.736 Loading configuration file: iPad-iPhone.conf
[main] INFO  23:47:31.738 Loading configuration file: Kuro.conf
[main] INFO  23:47:31.740 Loading configuration file: N900.conf
[main] INFO  23:47:31.742 Loading configuration file: Panasonic.conf
[main] INFO  23:47:31.744 Loading configuration file: Philips.conf
[main] INFO  23:47:31.791 Loading configuration file: PopcornHour.conf
[main] INFO  23:47:31.792 Loading configuration file: PS3.conf
[main] INFO  23:47:31.796 Loading configuration file: Realtek.conf
[main] INFO  23:47:31.798 Loading configuration file: SamsungAllShare.conf
[main] INFO  23:47:31.799 Loading configuration file: SamsungWiseLink.conf
[main] INFO  23:47:31.800 Loading configuration file: Showtime3.conf
[main] INFO  23:47:31.803 Loading configuration file: SonyBluray.conf
[main] INFO  23:47:31.805 Loading configuration file: Streamium.conf
[main] INFO  23:47:31.807 Loading configuration file: WDTVLive.conf
[main] INFO  23:47:31.808 Loading configuration file: WMP.conf
[main] INFO  23:47:31.810 Loading configuration file: XBMC.conf
[main] INFO  23:47:31.811 Loading configuration file: XBOX360.conf
[main] INFO  23:47:31.813 Checking MPlayer font cache. It can take a minute or so.
[main] DEBUG 23:47:31.813 launching: osx/mplayer
[main] INFO  23:47:31.864 Done!
[main] INFO  23:47:31.872 Searching for plugins in /Applications/PS3 Media Server.app/Contents/Resources/Java/plugins
[main] INFO  23:47:31.872 No plugins found
[main] INFO  23:47:31.874 Registering transcoding engine: FFmpeg Audio
[main] INFO  23:47:31.876 Registering transcoding engine: MEncoder
[main] INFO  23:47:31.877 Registering transcoding engine: MPlayer Audio
[main] INFO  23:47:31.877 Registering transcoding engine: MEncoder Web
[main] INFO  23:47:31.877 Registering transcoding engine: MPlayer Video Dump
[main] INFO  23:47:31.878 Registering transcoding engine: MPlayer Web
[main] INFO  23:47:31.878 Registering transcoding engine: tsMuxeR
[main] INFO  23:47:31.879 Registering transcoding engine: Audio High Fidelity
[main] INFO  23:47:31.879 Registering transcoding engine: VLC Audio Streaming
[main] INFO  23:47:31.879 Registering transcoding engine: VLC Video Streaming
[main] INFO  23:47:31.880 Registering transcoding engine: Raws Thumbnailer
[main] INFO  23:47:31.936 Scanning network interface en0 (en0)
[main] INFO  23:47:31.936 Using address /192.168.1.50 found on network interface: name:en0 (en0)
[main] INFO  23:47:31.936 Created socket: /192.168.1.50:5001
[main] INFO  23:47:32.011 Checking shared folder: /Volumes/Seagate HD/Torrent
[main] DEBUG 23:47:32.073 Sending ALIVE...
[main] INFO  23:47:32.079 Using the following UUID configured in PMS.conf: e3bdf69f-53e0-3bb0-b38e-4d51592843dc
[New I/O server worker #1-1] INFO  23:47:32.176 No IP filter specified, access granted to /192.168.1.103
[pool-3-thread-1] INFO  23:47:32.195 Checking ip:192.168.1.103 for Panasonic
[pool-3-thread-1] INFO  23:47:32.338 Renderer Panasonic found on this address: 192.168.1.103
[pool-3-thread-1] DEBUG 23:47:32.343 Starting ping -c 3 -s 64000 192.168.1.103
[Thread-11] DEBUG 23:47:32.360 ping: sendto: Message too long
[pool-3-thread-1] DEBUG 23:47:32.361 Unix process ID (ping): 28325
[Thread-11] DEBUG 23:47:33.357 ping: sendto: Message too long
[Thread-10] DEBUG 23:47:34.344 Stopping Unix process 28325: ping
[New I/O server worker #1-2] INFO  23:47:34.441 No IP filter specified, access granted to /192.168.1.104
[pool-3-thread-1] INFO  23:47:34.443 Checking ip:192.168.1.104 for Playstation 3
[New I/O server worker #1-1] INFO  23:47:34.578 Checking shared folder: /Volumes/Seagate HD/Torrent
[pool-3-thread-1] INFO  23:47:34.588 Renderer Playstation 3 found on this address: 192.168.1.104
[pool-3-thread-1] DEBUG 23:47:34.589 Starting ping -c 3 -s 64000 192.168.1.104
[Thread-15] DEBUG 23:47:34.610 ping: sendto: Message too long
[pool-3-thread-1] DEBUG 23:47:34.611 Unix process ID (ping): 28326
[Thread-15] DEBUG 23:47:35.606 ping: sendto: Message too long
[main] INFO  23:47:35.939 The server should now appear on your renderer
[Thread-14] DEBUG 23:47:36.590 Stopping Unix process 28326: ping
[Thread-18] DEBUG 23:47:45.939 Sending ALIVE...
[Thread-18] DEBUG 23:48:09.364 Sending ALIVE...
[New I/O server worker #1-3] DEBUG 23:48:23.080 Starting "/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/ffmpeg" -ss 1 -i "/Volumes/Seagate HD/Torrent/Movies/RMVB/Kung.Fu.Panda.sample.rmvb" -an -an -s 320x180 -vframes 1 -f image2 pipe:
[New I/O server worker #1-3] DEBUG 23:48:23.121 Attaching thread: osx/ffmpeg
[New I/O server worker #1-3] DEBUG 23:48:23.122 Unix process ID (/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/ffmpeg): 28328
[Thread-25] DEBUG 23:48:25.663 Stopping Unix process 28328: osx/ffmpeg
[New I/O server worker #1-4] INFO  23:48:27.741 Starting transcode/remux of Kung.Fu.Panda.sample.rmvb
[osx/mencoder] DEBUG 23:48:27.808 Starting "/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/mencoder" -ss 0 -quiet "/Volumes/Seagate HD/Torrent/Movies/RMVB/Kung.Fu.Panda.sample.rmvb" -quiet -quiet -oac lavc -of mpeg -quiet -quiet -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 2 -lavdopts debug=0:threads=2 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=448:threads=2:keyint=5:vqscale=1:vqmin=2:vrc_maxrate=54000:vrc_buf_size=1835 -subfont /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/LucidaSansRegular.ttf -ass-color ffffff00 -ass-border-color 00000000 -ass-font-scale 1.0 -ass-force-style FontName=Arial,Outline=1,Shadow=1,MarginV=10 -quiet -quiet -subdelay 20000 -quiet -quiet -ofps 24000/1001 -quiet -quiet -lavdopts fast -mc 0.1 -af lavcresample=48000 -srate 48000 -o - -really-quiet -msglevel statusline=2
[Thread-27] DEBUG 23:48:27.894 Fontconfig error: Cannot load default config file
[osx/mencoder] DEBUG 23:48:27.895 Attaching thread: osx/mencoder
[osx/mencoder] DEBUG 23:48:27.944 Unix process ID (/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/mencoder): 28329
[Thread-31] DEBUG 23:48:36.421 Stopping Unix process 28329: osx/mencoder
[Thread-28] DEBUG 23:48:36.422 Error consuming stream of spawned process: Stream closed
[New I/O server worker #1-1] DEBUG 23:48:39.695 Starting "/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/ffmpeg" -ss 1 -i "/Volumes/Seagate HD/Torrent/Movies/RMVB/武俠 Wu Xia/Wu Xia.rmvb" -an -an -s 320x180 -vframes 1 -f image2 pipe:
[New I/O server worker #1-1] DEBUG 23:48:39.708 Attaching thread: osx/ffmpeg
[New I/O server worker #1-1] DEBUG 23:48:39.708 Unix process ID (/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/ffmpeg): 28330
[Thread-47] DEBUG 23:48:42.300 Stopping Unix process 28330: osx/ffmpeg
[New I/O server worker #1-3] INFO  23:48:42.485 Starting transcode/remux of Wu Xia.rmvb
[osx/mencoder] DEBUG 23:48:42.518 Starting "/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/mencoder" -ss 0 -quiet "/Volumes/Seagate HD/Torrent/Movies/RMVB/武俠 Wu Xia/Wu Xia.rmvb" -quiet -quiet -oac lavc -of mpeg -quiet -quiet -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 2 -lavdopts debug=0:threads=2 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=448:threads=2:keyint=5:vqscale=1:vqmin=2:vrc_maxrate=54000:vrc_buf_size=1835 -subfont /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/LucidaSansRegular.ttf -ass-color ffffff00 -ass-border-color 00000000 -ass-font-scale 1.0 -ass-force-style FontName=Arial,Outline=1,Shadow=1,MarginV=10 -quiet -quiet -subdelay 20000 -quiet -quiet -ofps 24 -quiet -quiet -lavdopts fast -mc 0.1 -af lavcresample=48000 -srate 48000 -o - -really-quiet -msglevel statusline=2
[Thread-49] DEBUG 23:48:42.731 Fontconfig error: Cannot load default config file
[osx/mencoder] DEBUG 23:48:42.734 Attaching thread: osx/mencoder
[osx/mencoder] DEBUG 23:48:42.738 Unix process ID (/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/mencoder): 28331
[Thread-53] DEBUG 23:48:51.191 Stopping Unix process 28331: osx/mencoder
[Thread-50] DEBUG 23:48:51.192 Error consuming stream of spawned process: Stream closed
[Thread-18] DEBUG 23:51:14.472 Sending ALIVE...
[Thread-18] DEBUG 23:54:19.122 Sending ALIVE...
[Thread-18] DEBUG 23:57:24.633 Sending ALIVE...
[Thread-18] DEBUG 00:00:29.356 Sending ALIVE...
[Thread-18] DEBUG 00:03:34.428 Sending ALIVE...
[Thread-18] DEBUG 00:06:40.311 Sending ALIVE...
[Thread-18] DEBUG 00:09:44.497 Sending ALIVE...
[Thread-18] DEBUG 00:12:48.746 Sending ALIVE...
[Thread-18] DEBUG 00:15:53.033 Sending ALIVE...





Let me know if there's anything else you would like me to provide.

Thanks,
ckc
Last edited by Raptor399 on Tue Feb 14, 2012 9:50 pm, edited 1 time in total.
Reason: Edited for code fragments
ckc527
 
Posts: 3
Joined: Mon Feb 13, 2012 6:44 am


Return to Mac OS X Support

Who is online

Users browsing this forum: No registered users and 4 guests