MEncoder web stream troubles.

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

MEncoder web stream troubles.

Postby Valk » Sat Jul 04, 2009 4:35 am

I've written a plugin for mediaportal's tvServer so it can stream liveTv via http: http://forum.team-mediaportal.com/tv-se ... mtv-50470/

I believe it is close to working with the PS3MediaServer and was after a little advice.

I took the following command-line out of the debug file from ps3 media server and changed the pipe output (\\.\pipe\mencoder1246675957887) to test.m2ts and gave it a run to find that mencoder connects and writes the output just fine.

C:\Program Files (x86)\PS3 Media Server\win32\mencoder.exe http://valk-pc:9000/TvServer/TimeShift. ... annelId=59 -prefer-ipv4 -nocache -quiet -oac lavc -of lavf -lavfopts format=dvd -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=4096:threads=2:acodec=ac3:abitrate=128 -ofps 24000/1001 -o \\.\pipe\mencoder1246675957887

Below is part of the trace log when I try to stream to my PS3.

[New I/O server worker #1-4] DEBUG 12:52:37.887 Opened handler on socket /192.168.1.3:60911 // Playstation 3
[New I/O server worker #1-4] DEBUG 12:52:37.887 Handler infos: HTTP/1.1 : GET : get/0$1$1$0$1$8$1/ONE+HD
[New I/O server worker #1-4] DEBUG 12:52:37.887 Received on socket: Accept-Encoding: identity
[New I/O server worker #1-4] DEBUG 12:52:37.887 Received on socket: Connection: Keep-Alive
[New I/O server worker #1-4] DEBUG 12:52:37.887 Received on socket: Host: 192.168.1.222:5001
[New I/O server worker #1-4] DEBUG 12:52:37.887 Received on socket: Range: bytes=0-
[New I/O server worker #1-4] DEBUG 12:52:37.887 Received on socket: transferMode.dlna.org: Streaming
[New I/O server worker #1-4] DEBUG 12:52:37.887 Received on socket: User-Agent: PLAYSTATION 3
[New I/O server worker #1-4] INFO 12:52:37.887 HTTP: get/0$1$1$0$1$8$1/ONE+HD / 0-100000000000
[New I/O server worker #1-4] DEBUG 12:52:37.887 Searching for objectId: 0$1$1$0$1$8$1 with children option: false
[New I/O server worker #1-4] DEBUG 12:52:37.887 Asked stream chunk [0-100000000000] timeseek: 0.0 of ONE HD and player MEncoder Web
[New I/O server worker #1-4] TRACE 12:52:37.887 Starting transcode/remux of ONE HD
[New I/O server worker #1-4] INFO 12:52:37.887 Creating pipe \\.\pipe\mencoder1246675957887
[Thread-22] INFO 12:52:37.887 Waiting for pipe connection \\.\pipe\mencoder1246675957887
[win32/mencoder.exe] INFO 12:52:37.937 Starting C:\Program Files (x86)\PS3 Media Server\win32\mencoder.exe http://valk-pc:9000/TvServer/TimeShift. ... annelId=59 -prefer-ipv4 -nocache -quiet -oac lavc -of lavf -lavfopts format=dvd -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=4096:threads=2:acodec=ac3:abitrate=128 -ofps 24000/1001 -o \\.\pipe\mencoder1246675957887
[win32/mencoder.exe] INFO 12:52:37.942 Reading pipe: \\.\pipe\mencoder1246675957887
[win32/mencoder.exe] INFO 12:52:38.057 Attaching thread: win32/mencoder.exe
[Timer-1] DEBUG 12:52:38.057 Buffered Space: 0 bytes / inputs: 0
[Thread-26] DEBUG 12:52:38.057 MEncoder Sherpya-SVN-r29355-4.5.0 (C) 2000-2009 MPlayer Team
[Thread-26] DEBUG 12:52:38.057 Resolving valk-pc for AF_INET...
[Thread-26] DEBUG 12:52:38.057 Connecting to server valk-pc[192.168.1.222]: 9000...
[New I/O server worker #1-3] DEBUG 12:52:38.067 Opened handler on socket /192.168.1.3:60912 // Playstation 3
[New I/O server worker #1-3] DEBUG 12:52:38.067 Handler infos: HTTP/1.1 : POST : upnp/control/content_directory
[New I/O server worker #1-3] DEBUG 12:52:38.067 Received on socket: Content-Length: 276
[New I/O server worker #1-3] DEBUG 12:52:38.067 Received on socket: Content-Type: text/xml; charset="utf-8"
[New I/O server worker #1-3] DEBUG 12:52:38.067 Received on socket: Host: 192.168.1.222:5001
[New I/O server worker #1-3] DEBUG 12:52:38.067 Received on socket: SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#GetSystemUpdateID"
[New I/O server worker #1-3] DEBUG 12:52:38.067 Received on socket: User-Agent: UPnP/1.0 DLNADOC/1.50
[New I/O server worker #1-3] DEBUG 12:52:38.067 Received on socket: X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";
[New I/O server worker #1-3] INFO 12:52:38.067 HTTP: upnp/control/content_directory / 0-0
[New I/O server worker #1-3] DEBUG 12:52:38.067 Sent to socket: Content-Length: 335
[New I/O server worker #1-3] DEBUG 12:52:38.067 Sent to socket: Content-Type: text/xml; charset="utf-8"
[New I/O server worker #1-3] DEBUG 12:52:38.067 Sent to socket: Server: Windows_Vista-x86-6.1, UPnP/1.0, PMS/1.11.347
[New I/O server worker #1-1] DEBUG 12:52:38.267 Opened handler on socket /192.168.1.3:60910 // Playstation 3
[New I/O server worker #1-1] DEBUG 12:52:38.267 Handler infos: HTTP/1.1 : POST : upnp/control/content_directory
[New I/O server worker #1-1] DEBUG 12:52:38.267 Received on socket: Content-Length: 911
[New I/O server worker #1-1] DEBUG 12:52:38.267 Received on socket: Content-Type: text/xml; charset="utf-8"
[New I/O server worker #1-1] DEBUG 12:52:38.267 Received on socket: Host: 192.168.1.222:5001
[New I/O server worker #1-1] DEBUG 12:52:38.267 Received on socket: SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
[New I/O server worker #1-1] DEBUG 12:52:38.267 Received on socket: User-Agent: UPnP/1.0 DLNADOC/1.50
[New I/O server worker #1-1] DEBUG 12:52:38.267 Received on socket: X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";
[New I/O server worker #1-1] INFO 12:52:38.267 HTTP: upnp/control/content_directory / 0-0
[New I/O server worker #1-1] DEBUG 12:52:38.267 Searching for objectId: 0$1$1$0$1$8 with children option: false
[New I/O server worker #1-1] DEBUG 12:52:38.267 Sent to socket: Content-Length: 811
[New I/O server worker #1-1] DEBUG 12:52:38.267 Sent to socket: Content-Type: text/xml; charset="utf-8"
[New I/O server worker #1-1] DEBUG 12:52:38.267 Sent to socket: Server: Windows_Vista-x86-6.1, UPnP/1.0, PMS/1.11.347
[Timer-1] DEBUG 12:52:40.057 Buffered Space: 0 bytes / inputs: 0
[Thread-26] DEBUG 12:52:40.457 Cache size set to 0 KBytes
[Thread-26] DEBUG 12:52:40.457 success: format: 0 data: 0x0 - 0x0
[Thread-26] DEBUG 12:52:40.457 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:40.462 TS file format detected.
[Thread-26] DEBUG 12:52:40.462 Stream not seekable!
[Thread-26] DEBUG 12:52:41.612 VIDEO MPEG2(pid=48) AUDIO A52(pid=64) NO SUBS (yet)! PROGRAM N. 137
[Thread-26] DEBUG 12:52:41.612 Stream not seekable!
[Timer-1] DEBUG 12:52:42.057 Buffered Space: 0 bytes / inputs: 0
[Thread-26] DEBUG 12:52:42.237 VIDEO: MPEG2 1440x1080 (aspect 3) 25.000 fps 90000.0 kbps (11250.0 kbyte/s)
[Thread-26] DEBUG 12:52:42.237 [V] filefmt:29 fourcc:0x10000002 size:1440x1080 fps:25.000 ftime:=0.0400
[Thread-26] DEBUG 12:52:42.237 ==========================================================================
[Thread-26] DEBUG 12:52:42.237 Opening audio decoder: [liba52] AC3 decoding with liba52
[Thread-26] DEBUG 12:52:42.237 AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
[Thread-26] DEBUG 12:52:42.237 Selected audio codec: [a52] afm: liba52 (AC3-liba52)
[Thread-26] DEBUG 12:52:42.237 ==========================================================================
[Thread-23] DEBUG 12:52:42.237 Using SSE optimized IMDCT transform
[Thread-22] INFO 12:52:42.237 Result of \\.\pipe\mencoder1246675957887 : true
[Thread-23] DEBUG 12:52:42.237 Using MMX optimized resampler
[Thread-23] DEBUG 12:52:42.237 ** MUXER_LAVF *****************************************************************
[Thread-23] DEBUG 12:52:42.237 REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
[Thread-23] DEBUG 12:52:42.237 INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
[Thread-23] DEBUG 12:52:42.237 will play these INCORRECT files as if nothing were wrong!
[Thread-23] DEBUG 12:52:42.237 *******************************************************************************
[Thread-26] DEBUG 12:52:42.237 OK, exit.
[Thread-26] DEBUG 12:52:42.237 Opening video filter: [expand osd=1]
[Thread-26] DEBUG 12:52:42.237 Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
[Thread-26] DEBUG 12:52:42.242 ==========================================================================
[Thread-26] DEBUG 12:52:42.242 Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
[Thread-26] DEBUG 12:52:42.242 VDec: vo config request - 1440 x 1080 (preferred colorspace: Mpeg PES)
[Thread-23] DEBUG 12:52:42.242 The selected video_out device is incompatible with this codec.
[Thread-26] DEBUG 12:52:42.242 Could not find matching colorspace - retrying with -vf scale...
[Thread-23] DEBUG 12:52:42.242 Try appending the scale filter to your filter list,
[Thread-26] DEBUG 12:52:42.242 Opening video filter: [scale]
[Thread-23] DEBUG 12:52:42.242 e.g. -vf spp,scale instead of -vf spp.
[Thread-26] DEBUG 12:52:42.242 VDecoder init failed :(
[Thread-26] DEBUG 12:52:42.242 Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[Thread-23] DEBUG 12:52:42.242 Unsupported PixelFormat -1
[Thread-26] DEBUG 12:52:42.242 Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
[Thread-26] DEBUG 12:52:42.242 ==========================================================================
[Thread-26] DEBUG 12:52:42.252 VDec: vo config request - 1440 x 1080 (preferred colorspace: Planar YV12)
[Thread-26] DEBUG 12:52:42.252 VDec: using Planar YV12 as output csp (no 0)
[Thread-26] DEBUG 12:52:42.252 Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[Thread-26] DEBUG 12:52:42.252 videocodec: libavcodec (1440x1080 fourcc=3267706d [mpg2])
[Thread-26] DEBUG 12:52:42.272 VIDEO CODEC ID: 1
[Thread-26] DEBUG 12:52:42.272 AUDIO CODEC ID: 15003, TAG: 0
[Thread-26] DEBUG 12:52:42.272 Writing header...
[New I/O server worker #1-4] DEBUG 12:52:44.012 Suspend Read: readCount=0 / writeCount=1000000
[Timer-1] DEBUG 12:52:44.057 Buffered Space: 1000000 bytes / inputs: 1
[New I/O server worker #1-4] DEBUG 12:52:44.512 Resume Read: readCount=0 / writeCount=1500000
[New I/O server worker #1-4] DEBUG 12:52:44.512 Sent to socket: Connection: keep-alive
[New I/O server worker #1-4] DEBUG 12:52:44.512 Sent to socket: Content-Range: bytes 0-99999999999/100000000000
[New I/O server worker #1-4] DEBUG 12:52:44.512 Sent to socket: Content-Type: video/mpeg
[New I/O server worker #1-4] DEBUG 12:52:44.512 Sent to socket: Server: Windows_Vista-x86-6.1, UPnP/1.0, PMS/1.11.347
[New I/O server worker #1-4] DEBUG 12:52:44.512 Sent to socket: TransferMode.DLNA.ORG: Streaming
[New I/O server worker #1-4] DEBUG 12:52:44.907 Ready to Stop: true
[New I/O server worker #1-2] DEBUG 12:52:44.922 Opened handler on socket /192.168.1.3:60909 // Playstation 3
[New I/O server worker #1-2] DEBUG 12:52:44.922 Handler infos: HTTP/1.1 : GET : get/0$1$1$0$1$8$1/ONE+HD
[New I/O server worker #1-2] DEBUG 12:52:44.922 Received on socket: Accept-Encoding: identity
[New I/O server worker #1-2] DEBUG 12:52:44.922 Received on socket: Connection: Keep-Alive
[New I/O server worker #1-2] DEBUG 12:52:44.922 Received on socket: Host: 192.168.1.222:5001
[New I/O server worker #1-2] DEBUG 12:52:44.922 Received on socket: Range: bytes=99999475712-99999999999
[New I/O server worker #1-2] DEBUG 12:52:44.922 Received on socket: transferMode.dlna.org: Streaming
[New I/O server worker #1-2] DEBUG 12:52:44.922 Received on socket: User-Agent: PLAYSTATION 3
[New I/O server worker #1-2] INFO 12:52:44.922 HTTP: get/0$1$1$0$1$8$1/ONE+HD / 99999475712-99999999999
[New I/O server worker #1-2] DEBUG 12:52:44.922 Searching for objectId: 0$1$1$0$1$8$1 with children option: false
[New I/O server worker #1-2] DEBUG 12:52:44.922 Asked stream chunk [99999475712-99999999999] timeseek: 0.0 of ONE HD and player MEncoder Web
[New I/O server worker #1-2] DEBUG 12:52:44.922 Ready to Stop: false
[New I/O server worker #1-2] INFO 12:52:44.922 Setting InputStream new position to: 99999475712
[New I/O server worker #1-2] DEBUG 12:52:44.922 Ready to Stop: true
[New I/O server worker #1-2] DEBUG 12:52:44.922 Sent to socket: Connection: keep-alive
[New I/O server worker #1-2] DEBUG 12:52:44.922 Sent to socket: Content-Length: 524288
[New I/O server worker #1-2] DEBUG 12:52:44.922 Sent to socket: Content-Range: bytes 99999475712-99999999999/100000000000
[New I/O server worker #1-2] DEBUG 12:52:44.922 Sent to socket: Content-Type: video/mpeg
[New I/O server worker #1-2] DEBUG 12:52:44.922 Sent to socket: Server: Windows_Vista-x86-6.1, UPnP/1.0, PMS/1.11.347
[New I/O server worker #1-2] DEBUG 12:52:44.922 Sent to socket: TransferMode.DLNA.ORG: Streaming
[Timer-1] DEBUG 12:52:46.057 Buffered Space: 1761280 bytes / inputs: 0
[Thread-27] INFO 12:52:47.407 Stopping process: win32/mencoder.exe
[Thread-27] INFO 12:52:47.407 Destroying buffer
[Thread-28] INFO 12:52:47.487 Destroying buffer
[Thread-27] INFO 12:52:47.612 Destroying buffer
[win32/mencoder.exe] DEBUG 12:52:47.612 EOF


The live stream does take a moment to start up since the tuner needs to tune the channel in.

If anyone has any ideas or can possibly help i'd love to hear from you.

The current version on the forums forces http version 1.1 and chunked transfer which mplayer and mencoder don't like, when I put the offical build up tomorrow on google code it will have a fix to check what the client can handle which fixes that problem.
Valk
 
Posts: 5
Joined: Sat Feb 07, 2009 2:42 am

Re: MEncoder web stream troubles.

Postby Valk » Sat Jul 04, 2009 6:24 am

Well after looking at it a little more I noticed mencoder tries to connect a 2nd time which then works :)

It would be nice if transcoding could be disabled on select streams in the WEB.conf file but i'll accept that I got liveTv going for now :D
Valk
 
Posts: 5
Joined: Sat Feb 07, 2009 2:42 am

Re: MEncoder web stream troubles.

Postby ExSport » Sat Jul 04, 2009 11:33 am

Nice plugin Valk ;)
Do you know if something similar exists for streaming programs from DREAMBOX/IPBOX etc. directly to PS3?
I know that somebody tried it with PMS, but no way....
Dreambox has it's own WEB-GUI so manually(via HTTP) it is possible to change programs but didn't found any solution how to stream it to PS3 in way to switch between programs directly on PS3 also :?
I suppose that it is possible to list programs from Dreambox webgui and stream this list via HTTP protocol. When request will be done for some program, application will change this program via webgui and feed new link to PS3(or redirect it to some universal link)
Do you know or others here if something similar exists? Tried to find it but without success.
Thx
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: MEncoder web stream troubles.

Postby Valk » Sun Jul 05, 2009 4:03 am

Does the dreambox support IPTV? They added support for IPTV in mediaportals TvServer, any channels mapped to the IPTV Tuner in the TvServer should stream just fine through my plugin.

I haven't got a dreambox / ipbox so don't know much about them sorry.
Valk
 
Posts: 5
Joined: Sat Feb 07, 2009 2:42 am

Re: MEncoder web stream troubles.

Postby ExSport » Sun Jul 05, 2009 12:06 pm

http://en.wikipedia.org/wiki/Dreambox
If you choose some program via webgui, it will switch to this program on Dreambox and will generate special link for VideoLan client.
I attached part of this webgui code for remote program switching and streaming it to VLC.
Don't suppose that TVServer supports this :|
Attachments
Example.zip
Dreambox Web-Gui (html)
(8.86 KiB) Downloaded 54 times
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm

Re: MEncoder web stream troubles.

Postby Valk » Mon Jul 06, 2009 7:25 am

well by the look of it http://www.shareit.com/product.html?car ... =300301154 can connect to your Dreambox and give the mediaportal TvServer a Tuner to connect to which then would allow you to stream the dreambox output via my plugin.

Kinda complicated but it would do the job.

I wouldn't jump at this straight away until I get over the timeout and compressed stream problems if you want it solely for the PS3 output but if you use a PC with a media centre application then it would offer seamless integration.

Oh that product isn't free.
Valk
 
Posts: 5
Joined: Sat Feb 07, 2009 2:42 am

Re: MEncoder web stream troubles.

Postby ExSport » Mon Jul 06, 2009 9:38 am

Thanks for tip 8-)
I found out that this prog supports UPnP directly so it can be used without MediaPortal, but it is not free as you said...
Thanks ;)
Maybe sometiems somebody will create plugin in PMS which will retrieve info from attached file [HTML] and show it on PS3 with remote switching support :)
ExSport
 
Posts: 2167
Joined: Mon Jan 19, 2009 5:40 pm


Return to General Help and Support

Who is online

Users browsing this forum: Bing [Bot] and 9 guests