Get all supported formats of a media renderer?

Discuss issues related to PS3 Media Server development (only for programmers)

Get all supported formats of a media renderer?

Postby TheLQ » Thu Jul 26, 2012 11:03 pm

For the VLC transcoder I'm really struggling to figure out how to get what kind of formats a media rednerer supports. I see it in the configs but I don't see a native way to get them in code. Right now I've had to modify the existing FormatConfiguration class so that it actually exposes a list of supported formats ( https://github.com/LordQuackstar/ps3med ... 71fa9a265b ) and then map formats to VLC FOURCC codecs. However after doing the latest merge FormatConfiguration in RendererConfiguration is now null, so all my auto-detection code is broken

What is the recommended way to auto-detect the right codec to use?
TheLQ
 
Posts: 16
Joined: Wed Jul 11, 2012 6:18 pm

Re: Get all supported formats of a media renderer?

Postby chocolateboy » Thu Jul 26, 2012 11:49 pm

I'm not sure what you're asking exactly.

All video is transcoded to the baseline DLNA format, MPEG-2. The audio is AC-3. The container is MPEG-PS (ffmpeg -f dvd) or MPEG-TS (mencoder -of lavf -lavfopts format=mpegts).

MEncoderVideo can output other formats and containers, but please don't emulate that.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Get all supported formats of a media renderer?

Postby TheLQ » Fri Jul 27, 2012 12:51 am

Uhhh... wow, I didn't know that. I was under the impression the codecs were taylored to the media renderer in the MencoderVideo class. Woops.

Well in VLC using the mpeg 2 codecs (mp2v, a52, ts) it play's on a PS3 but not on an XBox. The format config for an XBox doesn't even mention mpeg 2 video. Does that mean than the XBox isn't DLNA standards compliant?
TheLQ
 
Posts: 16
Joined: Wed Jul 11, 2012 6:18 pm

Re: Get all supported formats of a media renderer?

Postby chocolateboy » Fri Jul 27, 2012 12:59 am

TheLQ wrote:Does that mean than the XBox isn't DLNA standards compliant?


That's a polite way of putting it :-)
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Get all supported formats of a media renderer?

Postby ExSport » Fri Jul 27, 2012 9:22 am

In the code I spotted in past that XBOX is the only one which uses WMV format for transcoded material. Others are using MPEG2.
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: Get all supported formats of a media renderer?

Postby Skylion » Fri Jul 27, 2012 6:01 pm

TheLQ wrote:Uhhh... wow, I didn't know that. I was under the impression the codecs were taylored to the media renderer in the MencoderVideo class. Woops.

Well in VLC using the mpeg 2 codecs (mp2v, a52, ts) it play's on a PS3 but not on an XBox. The format config for an XBox doesn't even mention mpeg 2 video. Does that mean than the XBox isn't DLNA standards compliant?

The XBox, along with a few other renders doesn't support mpeg2 video. I did some research though and VLC does support the WMV codecs, and even supports WMV9(WMV3), which is the newest one, with its internal codecs from version 2.0.0 onwards. And yes, it has encoders for the WMV formats in the internal codecs. So what I would recommend trying to do is come up with predetermined settings for VLC for each of the three supported output codecs,

1.MPEGAC3
2.MPEGTSAC
3.WMV(I am not sure whether Mencoder outputs it in WMV(v2) or WMV(v3)).

*The Xbox supports WMV(v3) and WMV(v2), however, I am not sure whether other renderers support WMV(v3).
**Note the Xbox has virutally no subtitle support, the subtitles have to be hard for the stream to be successful.

So once you tailor VLC to stream in all three of those formats have PMS read the renderer to figure out which predetermined commands it ought to send to VLC and which format it ought to send it in. I hope this helps a little and I'll help you in anyway I can to get this working for all renderers.

Edit: Here is full list of the WMV codecs the XBox360 supports.

WMV (VC-1) support
File extensions: .wmv
Containers: ASF
Video profiles: WMV7 (WMV1), WMV8 (WMV2), WMV9 (WMV3), VC-1 (WVC1 or WMVA) in simple, main and advanced up to level 3
Video bit rate: 15 Mbps with resolutions of 1920 × 1080 at 30 fps
Audio profiles: WMA7/8, WMA9 Pro (stereo and 5.1), WMA Lossless
Audio max bit rate: No restrictions

It also supports Avi's and MP4's among others but PMS is designed to send it in a compatible WMV format. Doing so would also allow the XBox to transcode for all renderers currently configured in the PMS renderer folder. Please, don't forget about us, Xbox users as I would really like to transcode using VLC and I am sure others would as well.

BTW
ExSport wrote:In the code I spotted in past that XBOX is the only one which uses WMV format for transcoded material. Others are using MPEG2.

There are a few other renderers that use the WMV format; for instance, the N900 uses this format as well.
Skylion
 
Posts: 7
Joined: Mon Mar 26, 2012 5:17 pm

Re: Get all supported formats of a media renderer?

Postby TheLQ » Fri Jul 27, 2012 6:30 pm

I've actually been testing VLC on both an XBox and a PS3. I feel the only way to transcode things correctly is to manually specify the codecs to use in the media renderer config for non standards complaint hardware. This also has the advantage of being able to pick a more stable codec if the default ones are unstable on the renderer.

Thanks for the help
TheLQ
 
Posts: 16
Joined: Wed Jul 11, 2012 6:18 pm

Re: Get all supported formats of a media renderer?

Postby Skylion » Fri Jul 27, 2012 6:45 pm

TheLQ wrote:I've actually been testing VLC on both an XBox and a PS3. I feel the only way to transcode things correctly is to manually specify the codecs to use in the media renderer config for non standards complaint hardware. This also has the advantage of being able to pick a more stable codec if the default ones are unstable on the renderer.

Thanks for the help


Hmm, an interesting solution, are planning on adding default codecs options for if the .conf file does not manually specify it? Since you are for manually specifying the codecs to use in the media render conf, perhaps you could specify that it streams in a different format that might be more advantageous than WMV with its bad compression and high amount of artifacts. If you do decide to do this here are some more video formats the Xbox360 supports.

AVI support
File extensions: .avi, .divx
Containers: AVI
Video profiles: MPEG-4 Part 2 (Simple Profile and Advanced Simple Profile)
Video bit rate: 5 Mbps with resolutions of 1280 × 720 at 30 fps
Audio profiles: Dolby® Digital (2 channel and 5.1 channel), MP3
Audio max bit rate: No restrictions

H.264 support
File extensions: .mp4, .m4v, mp4v, .mov, .avi
Containers: MPEG-4, QuickTime
Video profiles: Baseline, main and high (up to level 4.1)
Video bit rate: 10 Mbps with resolutions of 1920 × 1080 at 30 fps
Audio profiles: AAC, 2-channel, Low Complexity
Audio max bit rate: No restrictions

MPEG-4 Part 2 support
File extensions: .mp4, .m4v, .mp4v, .mov, .avi
Containers: MPEG-4, QuickTime
Video profiles: MPEG-4 Part 2 (Simple Profile and Advanced Simple Profile)
Video bit rate: 5 Mbps with resolutions of 1280 × 720 at 30 fps
Audio profiles: AAC, 2-channel, Low Complexity
Audio max bit rate: No restrictions

***WARNING CAVEAT*****
The maximum file size for an MPEG-4 Part 2 or H.264 file is 4 GB. However, Windows Media Player 11 and the Zune software support streaming WMV files larger than 4 GB.

In other words, if you transcode into the other codecs besides wmv the file has to be less than 4gb. The work around would be to transcode into WMV. However, Windows Media Player appears to have a work around. So if you decide to do this than I would recommend that if the file being streamed is detected to be 4gb (could you use MediaInfo for this???) than have it stream in the less efficient codec. BTW I've heard good things about the X264 encoder, developed by VideoLan, and I am pretty sure it is included in the internal codecs. I just thought you might like this information since your are specifying specific information into the media renderer files.

As another workaround, you could restrict VLC to be used only on media renderers whose specify settings are specified in the media renderer.

If you could use any help let me know, I am really interested in this project of yours.

PS: Tell me when you have it able to transcode videos for the Xbox360, I am eager to test it.
Skylion
 
Posts: 7
Joined: Mon Mar 26, 2012 5:17 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 0 guests