mencoder starts and then stops

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

mencoder starts and then stops

Postby genie » Wed Feb 23, 2011 7:33 pm

Hi All,

If somebody has an idea it is more than welcomed.

Environment:
Playstation3 firmware 3.X (the latest one)
PS3 (the latest beat)

This is the issue:
I see the line "[win32/mencoder.exe] INFO 12:35:31.253 Starting C:\Program Files (x86)\PS3 Media Server\win32\mencoder.exe http://192.168.2.5:8902/tv.asf -prefer-ipv4 -quiet -oac lavc -of lavf -lavfopts format=dvd -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=4096:threads=2:acodec=ac3:abitrate=128 -vf harddup -ofps 24000/1001 -o \\.\pipe\mencoder1298482531181"

After a few seconds I get "[win32/mencoder.exe] DEBUG 12:35:40.103 EOF"

Question:
Why does it stop?

Investigation:

Right before mencoder get's to EOF I see:

Code: Select all
[New I/O server worker #1-5] DEBUG 12:35:37.305 Sent to socket: Accept-Ranges: bytes
[New I/O server worker #1-5] DEBUG 12:35:37.305 Sent to socket: Connection: keep-alive
[New I/O server worker #1-5] DEBUG 12:35:37.305 Sent to socket: Content-Range: bytes 0-99999999999/100000000000
[New I/O server worker #1-5] DEBUG 12:35:37.305 Sent to socket: Content-Type: video/mpeg
[New I/O server worker #1-5] DEBUG 12:35:37.305 Sent to socket: Server: Windows_7-x86-6.1, UPnP/1.0, PMS/1.21.0-SB15
[New I/O server worker #1-5] DEBUG 12:35:37.305 Sent to socket: TransferMode.DLNA.ORG: Streaming
[New I/O server worker #1-5] DEBUG 12:35:37.400 Ready to Stop: true
[New I/O server worker #1-7] DEBUG 12:35:37.415 Opened request handler on socket /192.168.2.8:54709 // Playstation 3
[New I/O server worker #1-7] DEBUG 12:35:37.415 Request: HTTP/1.1 : GET : get/0$4$0$0/Pro+TV+00
[New I/O server worker #1-7] DEBUG 12:35:37.415 Received on socket: Accept-Encoding: identity
[New I/O server worker #1-7] DEBUG 12:35:37.415 Received on socket: Connection: Keep-Alive
[New I/O server worker #1-7] DEBUG 12:35:37.415 Received on socket: Host: 192.168.2.5:5001
[New I/O server worker #1-7] DEBUG 12:35:37.415 Received on socket: Range: bytes=99999475712-99999999999
[New I/O server worker #1-7] DEBUG 12:35:37.415 Received on socket: transferMode.dlna.org: Streaming
[New I/O server worker #1-7] DEBUG 12:35:37.415 Received on socket: User-Agent: PLAYSTATION 3
[New I/O server worker #1-7] INFO  12:35:37.415 HTTP: get/0$4$0$0/Pro+TV+00 / 99999475712-99999999999
[New I/O server worker #1-7] DEBUG 12:35:37.416 Searching for objectId: 0$4$0$0 with children option: false
[New I/O server worker #1-7] DEBUG 12:35:37.416 Asked stream chunk [99999475712-99999999999] timeseek: 0.0 of Pro TV 00 and player MEncoder Web
[New I/O server worker #1-7] DEBUG 12:35:37.416 Ready to Stop: false
[New I/O server worker #1-7] INFO  12:35:37.416 Setting InputStream new position to: 99999475712
[New I/O server worker #1-7] DEBUG 12:35:37.416 Ready to Stop: true
[New I/O server worker #1-7] DEBUG 12:35:37.416 Sent to socket: Accept-Ranges: bytes
[New I/O server worker #1-7] DEBUG 12:35:37.416 Sent to socket: Connection: keep-alive
[New I/O server worker #1-7] DEBUG 12:35:37.416 Sent to socket: Content-Length: 524288
[New I/O server worker #1-7] DEBUG 12:35:37.416 Sent to socket: Content-Range: bytes 99999475712-99999999999/100000000000
[New I/O server worker #1-7] DEBUG 12:35:37.416 Sent to socket: Content-Type: video/mpeg
[New I/O server worker #1-7] DEBUG 12:35:37.416 Sent to socket: Server: Windows_7-x86-6.1, UPnP/1.0, PMS/1.21.0-SB15
[New I/O server worker #1-7] DEBUG 12:35:37.416 Sent to socket: TransferMode.DLNA.ORG: Streaming


Why Would PS3 ask for the chink starting with 99999475712 (i used "Play from the Beginning", same happens is I use "Play")?.

after about 30s I see:

Code: Select all
[New I/O server worker #1-8] DEBUG 12:36:07.499 Request: HTTP/1.1 : GET : get/0$4$0$0/Pro+TV+00
[New I/O server worker #1-8] DEBUG 12:36:07.499 Received on socket: Accept-Encoding: identity
[New I/O server worker #1-8] DEBUG 12:36:07.499 Received on socket: Connection: Keep-Alive
[New I/O server worker #1-8] DEBUG 12:36:07.499 Received on socket: Host: 192.168.2.5:5001
[New I/O server worker #1-8] DEBUG 12:36:07.499 Received on socket: Range: bytes=0-
[New I/O server worker #1-8] DEBUG 12:36:07.499 Received on socket: transferMode.dlna.org: Streaming
[New I/O server worker #1-8] DEBUG 12:36:07.499 Received on socket: User-Agent: PLAYSTATION 3
[New I/O server worker #1-8] INFO  12:36:07.499 HTTP: get/0$4$0$0/Pro+TV+00 / 0-100000000000
[New I/O server worker #1-8] DEBUG 12:36:07.499 Searching for objectId: 0$4$0$0 with children option: false
[New I/O server worker #1-8] DEBUG 12:36:07.499 Asked stream chunk [0-100000000000] timeseek: 0.0 of Pro TV 00 and player MEncoder Web
[New I/O server worker #1-8] TRACE 12:36:07.499 Starting transcode/remux of Pro TV 00
[New I/O server worker #1-8] INFO  12:36:07.499 Creating pipe \\.\pipe\mencoder1298482567499
[Thread-29] INFO  12:36:07.500 Waiting for pipe connection \\.\pipe\mencoder1298482567499
[win32/mencoder.exe] INFO  12:36:07.550 Starting C:\Program Files (x86)\PS3 Media Server\win32\mencoder.exe http://192.168.2.5:8902/tv.asf -prefer-ipv4 -quiet -oac lavc -of lavf -lavfopts format=dvd -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=4096:threads=2:acodec=ac3:abitrate=128 -vf harddup -ofps 24000/1001 -o \\.\pipe\mencoder1298482567499


and everything works just fine, without any problems or hiccups, but it takes about 40s to start seeing something on the screen.
genie
 
Posts: 35
Joined: Mon Dec 07, 2009 8:33 pm

Re: mencoder starts and then stops

Postby chocolateboy » Wed Feb 23, 2011 8:43 pm

genie wrote:
Question:
Why does it stop?


Use a more recent build if you want better diagnostics:

http://ps3mediaserver.org/forum/viewtop ... 445#p45440
http://ps3mediaserver.org/forum/viewtop ... 153#p45179

Why Would PS3 ask for the chink starting with 99999475712 (i used "Play from the Beginning", same happens is I use "Play")?


PMS doesn't know the size of transcoded media so it either sets the Content-Length to an arbitrarily high value (TRANS_SIZE) or -1. The PS3 then sends a request for an arbitrary (but fixed-size) chunk at the end of this "file" to see if it exists. Search the codebase for ENDFILE_POS for more details.

everything works just fine, without any problems or hiccups, but it takes about 40s to start seeing something on the screen.


https://code.google.com/p/ps3mediaserve ... ail?id=759
chocolateboy
Project Member
 
Posts: 2577
Joined: Wed Sep 16, 2009 10:05 am

Re: mencoder starts and then stops

Postby genie » Wed Feb 23, 2011 9:47 pm

I used the build based on version 500.

Code: Select all
[main] TRACE 14:47:01.822 Starting PS3 Media Server (SubJunk Build) 1.21.0-SB15
[main] TRACE 14:47:01.823 Base by shagrath / 2008-2011
[main] TRACE 14:47:01.823 http://ps3mediaserver.org
[main] TRACE 14:47:01.823 Custom build by SubJunk, http://www.spirton.com
[main] TRACE 14:47:01.823 http://ps3mediaserver.blogspot.com
[main] TRACE 14:47:01.823 http://code.google.com/p/ps3mediaserver
[main] TRACE 14:47:01.823
[main] TRACE 14:47:01.824 Java: 1.6.0_23-Sun Microsystems Inc.
[main] TRACE 14:47:01.824 OS: Windows 7 x86 6.1
[main] TRACE 14:47:01.824 Encoding: UTF-8


I do see that type of errors if there is any but not for this problem.

Now I get why PS3 is asking for that but is is possible to to ignore it or anything and just pass the info from '0' or handle it gracefully?

Please see attached my full debug.log file. It's really a pain to wait 40 seconds for the stream to start.
genie
 
Posts: 35
Joined: Mon Dec 07, 2009 8:33 pm

Re: mencoder starts and then stops

Postby genie » Fri Feb 25, 2011 1:10 am

I tried porting the code from viewtopic.php?f=11&t=6361&p=29930#p29875 and test but it still fails.

The problem is this case is not that the input stream is not available but that the stream if not a fixed length and we try to "Jump" to a place that was now captured yet.

Anybody any ideas?
genie
 
Posts: 35
Joined: Mon Dec 07, 2009 8:33 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests