PMSEncoder - Web Video Streaming Plugin

Discuss third-party additions, plugins and translations for PS3 Media Server

Re: PMSEncoder - Web Video Streaming Plugin

Postby Idran » Sun Dec 08, 2013 11:57 am

Aha, that fixed it! Thanks for the quick response, it's very appreciated!
Idran
 
Posts: 2
Joined: Sun Dec 08, 2013 2:51 am

Re: PMSEncoder - Web Video Streaming Plugin

Postby Paradox75 » Fri Dec 27, 2013 5:33 am

Is there any reason since around PMSEncoder version 2.0.0 and newer that it no longer seems to support any custom set Mencoder settings for web streams?

With an older Playstation Media Server (around version 1.50) and PMSencoder 1.63 all my webstream were perfect and obeyed the custom Mencoder settings i had made. Now with Playstation Media Server 1.90.1 and PMSEncoder 2.0.0rc3 the aspect ratio of webstreams is wrong and custom Mencoder parameters are ignored for those.

This is on a Sony Bravia kdl40-ex403 tv so i have to use the -vf softskip,expand=::::1:16/9:2 parameters to get my local content to display with the right aspect, this worked fine in earlier revisions of PMS/PMSencoder for both local files and webstreams now it only works for local content. Log files indicate nothing is wrong but every webstream that should be 16:9 ratio plays in about a 2.40:1 aspect (black bars added) and everything looks squashed. As soon as i go back to earlier versions everything is fine again.

Prior versions definitely obeyed Mencoder settings, newer versions seem to make more references/calls to ffmpeg. Anyone any hints on how i can get PMSencoder to obey custom codec/aspect settings or even make alterations see it obeys them?

Thanks in advance.
Paradox75
 
Posts: 4
Joined: Sat Dec 21, 2013 2:58 am

Re: PMSEncoder - Web Video Streaming Plugin

Postby wolfram » Mon Dec 30, 2013 5:32 pm

I am having trouble getting the recommended (give PSMEncoder a spin) Comedy Central video feeds to work.

The WEB.conf and other files look to be in the correct locations, etc.

Attached is the output to my attempts to stream Comedy Central:
DEBUG.LOG http://pastebin.com/wE83Fu8Q
PMS.conf http://pastebin.com/JMNX9FrS
PMSEncoder.log http://pastebin.com/3nLqxwj9

Any recommendations for adjustments would be greatly appreciated.
wolfram
 
Posts: 7
Joined: Sun Dec 29, 2013 7:08 pm

Re: PMSEncoder - Web Video Streaming Plugin

Postby wolfram » Tue Dec 31, 2013 1:40 pm

UPDATE - I installed VLC media player and messed around with many other things... I then noticed Comedy Central video feeds working!
wolfram
 
Posts: 7
Joined: Sun Dec 29, 2013 7:08 pm

Re: PMSEncoder - Web Video Streaming Plugin

Postby chocolateboy » Wed Jan 01, 2014 7:06 pm

Paradox75 wrote:Is there any reason since around PMSEncoder version 2.0.0 and newer that it no longer seems to support any custom set Mencoder settings for web streams?


You'll need to figure out the correct ffmpeg options (e.g. -aspect and/or -vf pad and/or -vf scale). Then you can add them to the global PMSEncoder ffmpeg options by creating a file called INIT.groovy in the PMSEncoder script directory and adding something like the following (with appropriate values for the parameter(s)):

Code: Select all
script (INIT) {
    FFMPEG += [ '-vf', 'scale=XXX' ]
}
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: PMSEncoder - Web Video Streaming Plugin

Postby lamebryant » Fri Jan 03, 2014 1:50 am

I just downloaded the newest version of PMSEncoder, and when I start up my PMS I get this error:

Code: Select all
Configuration error: net/pms/encoders/FFmpegWebVideo


and it won't let me really do anything with the media server. As soon as I delete the plugin the whole thing goes back to normal. Does anyone know why this is happening?
lamebryant
 
Posts: 1
Joined: Fri Jan 03, 2014 1:47 am

Re: PMSEncoder - Web Video Streaming Plugin

Postby Paradox75 » Fri Jan 03, 2014 7:17 pm

chocolateboy wrote:
Paradox75 wrote:Is there any reason since around PMSEncoder version 2.0.0 and newer that it no longer seems to support any custom set Mencoder settings for web streams?


You'll need to figure out the correct ffmpeg options (e.g. -aspect and/or -vf pad and/or -vf scale). Then you can add them to the global PMSEncoder ffmpeg options by creating a file called INIT.groovy in the PMSEncoder script directory and adding something like the following (with appropriate values for the parameter(s)):

Code: Select all
script (INIT) {
    FFMPEG += [ '-vf', 'scale=XXX' ]
}


Thanks chocolateboy unfortunately a similar command to the mencoder one is impossible to do in FFmpeg by default in both UMs and PMS.

This appears to be because UMS/PMS first calls for the -format (or as it is also known i believe in other releases or in part that command uses the -dar function) command/tag which means a specific framing size is set already before the stream is decoded.

It will not matter how you scale or pad the video and will result in the displayed content either being stretched horizontally or vertically.

You can get 16:9 content with a 16:9 ratio to play perfectly by just setting "-aspect 1:1" or "-aspect 16:9" or 4:3 content as an example with "-aspect 4:3" in "CustomFFmpegOptions" within either the renderer conf or UMS.conf file. However that will then cause the opposite problem, that being when you try to play anything with say a 2.40:1 aspect rather than it being squashed it will scale it vertically to the DAR limit (this scaling it to 4:3 or 16:9) and thus end up displaying as 16:9 or 4:3 (or in other words vertically stretched to boundarys of the top and bottom of the screen so everyone then looks as though they are thin stick people).

Setting Using the scale command for example "-vf scale=1280:-1" or "-vf scale=1280:720" will likewise work fine for 16:9 content but anything else it will fail as it will attempt to scale everything to a 1280 horizontal while ignoring the vertical, which will make 4:3 content into 16:9 and thus everyone looks fat or 2.40:1, 2.35:1 etc content stretched to 16:9 and thus that content everyone will look thin.

There is no command for ffmpeg that can differentiate the different aspects and apply correctly, ffmpeg uses single static commands per file passing, unlike mencoder it does not uses "MEDIAINFO" which is part of UMS/PMS to look at the file first, and it has no universal command similar to -lavcopts it just goes ahead and applies the command. FFmpeg also deals in 2 things SAR and DAR which makes it neigh on impossible to parse every file correctly.

The reason the old Mencoder command works is because before applying with the custom command i mentioned you can either make it use MediaInfo64.dll or MediaInfo.dll to look at the file aspect ratio, codec etc via a renderer conf setting or you can use -lavcopts commands which will also look at individual files parameters first before parsing the files for encoding and critically before applying the aspect change.

FFmpeg does not do this, it "nulls" everything on initial reading of the file, and then applies its own custom command line settings. Mencoder checks if the change is required FFmpeg does not.

If you have a mix and match of various 4:3, 16:9, 2.40:1 etc etc content as most of us probably do on our machines and you have a television that requires a custom framing settings such as many panasonics, almost all Sonys even a couple of Samsungs also older DLNA devices then AFAIK (and this is after a lot of playing around) there is no magic FFmpeg command to handle it all as its all done per file basis. and wont make use of mediainfo.dll for cross checking with lavcopts when parsing files.

The closest you can get for web content is to apply -aspect or -scale in the "ffmpeg.webfilters" file within UMS telling that which URLs should apply what custom commands. This is far from a solution though as 1) it will not help local content and 2) if you have a long WEB.conf file with videos from various sites (lets say you have a dozen video sites) then you would have to go through the ffmpeg.webfilters file and input each site and the custom options to apply to it, which is doable i suppose but a complete PITA and time consuming everytime you add a new rss feed from a new site.

If it is any consolation other programs such as serviio and Mezzmo have also had this issue as they them self rely on FFmpeg, they also likewise have for certain renderers like panasonics and Sonys had to seriously update their renderers to adapt to TVs which have fussy DAR and SAR properties. For the most part it works but even they still have issues with short (under 5 minute files).

IF PMS and UMS are going to move entirely over to FFmpeg in the future which it looks like they are going that way, the way renderer.conf and other files are written are going to need a massive rethink for so many devices currently out there.

UMS and PMS are great apps but if you guys are going to drop Mencoder eventually you are going to have to investigate what extent people behind the likes of Mezzmo, Serviio even Plex have had to go to in what is basically the equivalent to renderer files to make content display correctly on certain devices (mainly Sony and Panasonic TVs). If you go and investigate the equivalent renderer files in a couple of those apps i think you will have a shock just how much is involved in getting content to display with correct aspect ratio on Many Sony and Panasonic TVs. It is far from a simple one line -aspect fix ;) Infact some sonys even use DLNA headers with there own custom names for certain containers. Its a right mess and requires a lot of work. I could probably get close with a custom sony renderer conf but i doubt the way the code of UMS/PMS currently stands that even then FFmpeg would do a perfect job.

This is a long running issue on basically every DLNA app ive run across that uses FFmpeg, some blame FFmpeg, some blame the likes of Panasonic and Sony, either way its a BLEEP to fix.


PS: and finally is there any reason you have done away with PMS parsing custom Mencoder commands, or is it a change in PMS code itself and not your PMSEncoder code that has broken this?
Paradox75
 
Posts: 4
Joined: Sat Dec 21, 2013 2:58 am

Web video streams

Postby Alyred » Thu Apr 03, 2014 8:14 am

Hi all, relatively new to this forum, though I've used PS3 Media Server for a while just to play some simple downloaded movies on my PS3.

Lately, I've noticed the web stream plugin (pmsencoder), and I'm having a devil of a time getting them working. I was, at one point, able to play some of the TED talks from the samlple streams (web.conf) but those have now stopped working. I've completely torn out PS3 Media Server on my server and re-installed it from scratch, and still haven't been able to get things working.

My PS3 just tells me that the content cannot be played and gives a code; my android tells me that the server:5001/filename can't be opened to play.

Video from files residing on my server play fine.

I've downloaded the current versions, and have gotten Python 3.4 and youtube-dl and have put them in the pms.conf file.

I've looked through a few other posts, and while that's given me several steps to look into (such as the youtube-dl.exe config), I've been getting pretty much the same errors on my device. I'd appreciate any assistance that could point me in the right direction. I hate leaving a problem unsolved.

Thanks!

debug.log - http://pastebin.com/DPG9XFp6
pms.conf - http://pastebin.com/sPpPikEg
pmsencoder.log - http://pastebin.com/z0cvDTv2
web.conf - http://pastebin.com/e3eSw8AT (just in case I've done something wrong there too)
Alyred
 
Posts: 3
Joined: Thu Apr 03, 2014 7:01 am

Re: Web video streams

Postby chocolateboy » Sat Apr 05, 2014 12:25 pm

Alyred wrote:My PS3 just tells me that the content cannot be played and gives a code


The Comedy Central feeds should be fixed in the next release.
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: PMSEncoder - Web Video Streaming Plugin

Postby chocolateboy » Sat Apr 05, 2014 12:43 pm

PMSEncoder 2.0.0 has been released. It includes the following changes since 2.0.0-rc3:

  • fix Comedy Central feeds
  • auto-discover downloaders in $PATH or the PMS plugins dir

For a full list of fixes and features in PMSEncoder 2.0.0, see the changelog. For more details on PMSEncoder, see here.
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

PreviousNext

Return to Additions and Plugins

Who is online

Users browsing this forum: No registered users and 2 guests