Hello, I've been using PMS for quite a while now and some days ago I started working on an App for Windows Phone to stream my videos to it through PMS.At the moment PMS recognizes the windows phone client and I can reproduce all the videos already correctly encoded, the problem is that I can't understand how to set the correct transcoding options for the others.Windows Phone supports .mp4 and .wmv files as described here.If I understand correctly there's no way to transcode using as video codec WMV3 so wmv is excluded, using a command like this:

# SeekByTime: Set to true to use the DLNA feature seek by time instead of by# range.SeekByTime = false

# DLNALocalizationRequired: Serve different flavors of localization in the# DLNA parameters (PAL/NTSC, NA/EU/JP) to allow every world wide renderer to# see the files. Important for Sony Bravia TVs.#DLNALocalizationRequired = false

# CBRVideoBitrate is useful for renderers without SeekByTime support. It does time2byte conversion to support FF/RW.# Only possibility how to predict where we are when seeking is using CBR bitrate instead of VBR used by default# Making CBR stream by MEnocder is 3 times slower than using VBR so count with it if you have poor computer!# Speed can be hopefully optimized little bit in the future:# http://www.ps3mediaserver.org/forum/viewtopic.php?f=14&t=8883&p=53706&hilit=ditlew#p53700# http://www.ps3mediaserver.org/forum/viewtopic.php?f=11&t=11284&p=62765&hilit=1835#p62765# CBRVideoBitrate=15000

# ByteToTimeseekRewindSeconds is used for finetuning so default is 0 # ByteToTimeseekRewindSeconds=0

# MediaInfo: Set to "true" if PMS should parse files with MediaInfo. This will# give PMS more accurate information, speed up browsing and prevent potential# playback errors. It also enables the use of "Supported" to more accurately# define the supported formats for the renderer.MediaInfo = true

# TranscodeVideo: Codec to use for video transcoding.# Currently supported: "MPEGAC3", "MPEGTSAC3" or "WMV".TranscodeVideo = MPEGTSAC3

# TranscodeAudio: Codec to use for audio transcoding.# Currently supported: "LPCM", "MP3" or "WAV".TranscodeAudio = MP3

# DefaultVBVBufSize: Whether or not to use the default DVD buffer size. Setting# this to "false" means a greater bit rate and faster encoding, but it can# generate incompatible videos dependent on the renderer.#DefaultVBVBufSize = false

# WrapDTSIntoPCM: Set to "true" if the media renderer supports DTS wrapped# into LPCM in a MPEG file.WrapDTSIntoPCM = false

# MuxLPCMToMpeg: Set to "true" if the media renderer supports LPCM in a MPEG# file. Ignored if MediaInfo = true.MuxLPCMToMpeg = false

# MaxVideoBitrateMbps: The maximum bit rate supported by the media renderer.# Setting to "0" means unlimited.# If computer is low on resources it is better to avoid using bandwidth limit which is much CPU demanding# It is better to lower quality settings by defining "CustomMencoderQualitySettings".# By lowering quality also bitrate is decreased but it is not so CPU aggresive so it is preferred to use it this wayMaxVideoBitrateMbps = 2

# H264Level41Limited: Set to "true" if the media renderer supports only H264# L4.1 at most.H264Level41Limited = true

# TranscodeAudioTo441kHz: Set to "true" if music files need to be resampled at# 44.1kHz.TranscodeAudioTo441kHz = false

# TranscodeFastStart: Set to "true" if the renderer has a short timeout delay# and needs to receive transcoded video with minimal delay. If set to "false",# PMS will take some time to buffer some of the transcoded video.TranscodeFastStart = true

# TranscodeExtensions: Comma separated list of file extensions that are forced# to be transcoded and never streamed. Best left empty if MediaInfo = true,# and define "Supported" formats instead.TranscodeExtensions =

# StreamExtensions: Comma separated list of file extensions that are forced# to be streamed and never transcoded. Best left empty if MediaInfo = true,# and define "Supported" formats instead.StreamExtensions =

# ForceJPGThumbnails: Some renderers require thumbnails to be represented as# JPEGs (JPEG_TN) in the DLNA directory XML (e.g. Sony Bravia TVs and Blu-ray# players). Set this to true to force PMS to use this representation. Note:# this has no effect on thumbnail file formats or content-type headers.ForceJPGThumbnails = false

# ChunkedTransfer: Some renderers are particular about the "Content-Length"# headers in requests (e.g. Sony Blu-ray players). By default, PMS will send# a "Content-Length" that refers to the total media size, even if the exact# length is unknown. Default value is false. Set this option to true to omit# sending a length when it is unknown.ChunkedTransfer = false

# CustomMencoderQualitySettings: Overrides the MEncoder transcoding quality# settings in PMS for this renderer. Default is empty, which means the PMS# settings will be used.CustomMencoderQualitySettings =

# AutoExifRotate: Many cameras store information in the image file about the# orientation of the camera while the picture was taken, allowing viewers to# know which way was up. Set this option to "true" to allow PMS to rotate JPEG# files based on EXIF information contained in the file, and relieve the# renderer of that task.AutoExifRotate = true

First of all, Thank you for the answer The WMV profile has a problem, when I use it and try to play any video on the phone, the phone crashes (Not just the media player, the whole OS) and that - togheter with the page I linked in the first post - convinced me that the WMV2 video codec was not supported. I'm just passing the uri to the OS's Media Player so it shouldn't be my fault.Now, out of curiosity I made a test: I used the exact same mencoder's command that uses pms to encode a video in asf, I put the transcoded video in a pms's shared folder and - I can't understand why - playing it throught pms works. What is the difference between streaming directly and transcoding&streaming? The data received by the client should be exactly the same right?I'll try to put togheter a little player with the MediaElement and see what happens.

Apart from this, looking at the generated mencoder command I was wondering if it couldn't be improved. The threads options is set to 1 while with the other profiles is set to 8 (which corresponds to my setting in the transcoding options).Mencoder reports that [asf @ 010b9da0]Codec for stream 0 does not use global headers but container format requires global headers so maybe would be useful to add the aglobal/vglobal = 3 options but I don't know much about these things so I'm probably wrong.

Even with the MediaElement component the phone crashes, I tryed also to pass to the media player a uri with the correct extension (Changing it to .asf) but nothing changed.I looked also at what sends back pms in response to a request and got this:

I am doing a similar application in Serviio and have run into the exact same issue. Have you been able to find a solution.

I tried using both MediaElement and the MediaPlayerLauncher and a single time I got the MPL to launch the movie. Any tries after this produce similar results as you are getting - complete phone restart!

Any help is much appreciated.

Last edited by chocolateboy on Mon Aug 27, 2012 5:49 pm, edited 1 time in total.

Actually I didn't ask since I found a way to limit the crash to the mediaplayer, it is related to the fact that transcoded files are damaged (It still doesn't excuse the crash of the os but that's not my problem now).Windows Media Player's Transcoding works fine, I'll check with other media servers and see what happens.