My favorites | Sign in
Project Home Downloads Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 822: [Patch] Partial-content (byte range) content size bug
9 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  Patrick....@gmail.com
Closed:  Dec 2011


Sign in to add a comment
 
Reported by carbine....@gmail.com, Aug 14, 2010
What steps will reproduce the problem?
1. Attach a BDP-S370 bluray player to the LAN
2. Attempt to use the DLNA media capability with PMS, to play audio or video for instance.

What is the expected output? What do you see instead?
Media is browsable but cannot be played - unsupported format is reported.

What version of the product are you using? On what operating system?
PMS r410, debian 5

If you are transcoding a media file, which engine are you using (mencoder, avisynth/mencoder, tsmuxer?)
n/a

If the media file is in error (or does not play flawlessly), what are the codec informations of this file (you can use following program: mediainfo.sourceforge.net) ?
n/a

Please provide any additional information below and PLEASE JOIN debug.log file !!

Aug 14, 2010
#1 carbine....@gmail.com
Patch to fix this is available at http://ps3mediaserver.org/forum/viewtopic.php?f=15&t=6930&p=34971#p34971 (I couldn't attach it here because the quota is exceeded).
Aug 19, 2010
#2 carbine....@gmail.com
This is a specific instance of the bug reported by  issue #430 
Sep 29, 2010
Project Member #3 shagr...@gmail.com
(No comment was entered for this change.)
Status: Started
Owner: shagr4th
Sep 29, 2010
#4 carbine....@gmail.com
Sorry, wrong issue referred in comment above.  Actually an instance of  issue #830 .  Sorry.
Jan 18, 2011
Project Member #5 chocol...@cpan.org
 Issue 830  has been merged into this issue.
Jan 18, 2011
Project Member #6 chocol...@cpan.org
(No comment was entered for this change.)
Summary: [Patch] Partial-content (byte range) content size bug
Feb 7, 2011
#7 carbine....@gmail.com
New patch for revised trunk (r486+) is available here: http://ps3mediaserver.org/forum/download/file.php?id=1327
Sep 13, 2011
#8 ava...@yahoo.com
Yet another attempt to finish this issue.  The 3 patches below (r811) are WoH's patch above and the [http://www.ps3mediaserver.org/forum/viewtopic.php?f=15&t=6930&start=160#p36419 patters] patch refactored to create a formal 'chunked' response mode, plus a separate patch adding support for jpeg thumbs and m2ts on Sony Bluray players, (patches are git-format-patch flavor, apply using 'patch -p1', unix line endings).

Details are at http://www.ps3mediaserver.org/forum/viewtopic.php?f=11&t=12035 .
ChunkedResponse.patch
7.3 KB   View   Download
PartialContentRange-core.patch
8.1 KB   View   Download
sonybluray_thumbs_m2ts.patch
16.5 KB   View   Download
sony_bdp.png
6.1 KB   View   Download
Sep 20, 2011
Project Member #9 Patrick....@gmail.com
(No comment was entered for this change.)
Owner: Patrick....@gmail.com
Sep 20, 2011
Project Member #10 Patrick....@gmail.com
Patches reviewed and committed in r826.
Status: Fixed
Sep 20, 2011
#11 ExSportCZ@gmail.com
This patch is already tested in SubJunk build so maybe it was better to commit it with his other patches included in latest SJ builds. Only thought.
Sep 21, 2011
#12 ava...@yahoo.com
Just for clarification: the original version of the WoH patch (already in SubJunk) fixes direct streaming but not transcoding.  The new patches above rework response headers in RequestV2.java to fix transcoding too, which is why that specific part of the original WoH patch is dropped.
Sep 21, 2011
#13 ava...@yahoo.com
Chunked response mode for http engine V1 + a minor fix to prevent NullPointerException if inputstream is null.
ChunkedResponse-httpEngineV1.patch
5.5 KB   View   Download
Sep 22, 2011
Project Member #14 chocol...@cpan.org
(No comment was entered for this change.)
Status: New
Sep 24, 2011
#15 ava...@yahoo.com
A more thorough fix for NullPointerException has already been applied in r834. Below is the corresponding chunked response mode for http engine V1.
Sep 24, 2011
#16 ava...@yahoo.com
(No comment was entered for this change.)
ChunkedResponse-httpEngineV1-updated.patch
6.8 KB   View   Download
Oct 2, 2011
Project Member #17 Patrick....@gmail.com
Thanks for the patch, infidel!
Committed in r854.
Status: Fixed
Oct 4, 2011
#18 ava...@yahoo.com
Great, just in time for the bugfix!

Over the weekend I was watching a big vob and playback cut off at the 2 gig mark, a consequence it turned out of my patch relying too heavily on inputStream.available() which returns an int, not a long. This bug  only affects chunked mode.

In the process of fixing it I realized that my default mode varied somewhat from the original default mode, so I ended up rewriting the Content-Length/Range logic entirely to bring it in line. I don't have a PS3 or any non-chunking renderer, so it would be good if someone could verify default mode here.


ChunkedResponse-fixes.patch
7.4 KB   View   Download
Oct 4, 2011
Project Member #19 chocol...@cpan.org
(No comment was entered for this change.)
Status: New
Oct 5, 2011
#20 ava...@yahoo.com
Patch above regenerated for r864+.
Oct 5, 2011
#21 ava...@yahoo.com
(No comment was entered for this change.)
ChunkedResponse-fixes-r864.patch
7.4 KB   View   Download
Oct 8, 2011
Project Member #22 chocol...@cpan.org
 Issue 1242  has been merged into this issue.
Oct 22, 2011
Project Member #24 Patrick....@gmail.com
Patch committed in r947.
Oct 23, 2011
#25 ExSportCZ@gmail.com
Unfortunately r826 introduced bug that my Panasonic TV stopped FF/RW native AVI files without transcoding.
This r947 patch didn't fixed it.
Original WoH #822 patch works OK so bug is in some different change made by infidel:-(
Original WoH patch tested and it is not culprit of this behavior: https://code.google.com/p/pms-exsport/source/detail?r=14
Thanks for looking into that!
Oct 23, 2011
#26 subjunk
Hope we can get this solved soon
Oct 23, 2011
#27 ava...@yahoo.com
ExSport, can you please post complete TRACE level debug.logs showing what happens when you FF/RW the same file before (pms-exsport r14) and now (r947) in the discussion thread (http://www.ps3mediaserver.org/forum/viewtopic.php?f=11&t=12035)?

Otherwise "logic" will continue to be my only guide :)


Oct 24, 2011
#28 ExSportCZ@gmail.com
Hopefully this weekend I will be at home so will test it.
Found out that SubJunk build SB45 works but SB46+ not so bug is somewhere between r821-r841. And r826 was only patch which is relevant.
http://www.ps3mediaserver.org/forum/viewtopic.php?f=14&t=8883&p=59134#p59086
Will test this SB45 because it includes "my" version of WoH patch but it is more recent so more similar with official build.
Oct 28, 2011
#30 ExSportCZ@gmail.com
Hello
Debug files attached.
I tried it this way:
- play for few secs, then start to fast forward few secs, clicked play again, played few secs and finally stopped it
SB45 works but SB52 not. For consistency I used SB build but SB45 includes same WoH patch as in my build and SB53 includes one from latest official trunk(WoH with some modifications)
Thanks for help...will try to check logs later but I suppose I will not find anything:-)
ExSport
Debug_Forward-Rewind.zip
9.2 KB   Download
Oct 28, 2011
#31 ExSportCZ@gmail.com
Sorry forgot to say it doesn't work on purely streamed DivX files (Panasonic TV).
When it works it fast forward OK but with broken version it just freezes picture and when FF is stopped it continues to play from last position before FF.
It works for transcoded and remuxed files what I remember,only streamed files doesn't work.
Hope it helps.
Oct 28, 2011
#32 ava...@yahoo.com
Mea culpa. 15 minutes after first posting ChunkedResponse-fixes-r864.patch I noticed a mistake so I deleted the original attachment and reposted (as you can see above). I should have entered a comment for clarification. The deleted bad patch was applied in r947.  Here's the fix, hopefully solving the Panasonic issues. Thanks for the logs, which made this apparent right away. 
ChunkedResponse-fixes2.patch
1006 bytes   View   Download
Oct 28, 2011
#33 ExSportCZ@gmail.com
Digging in the log and found some differences and maybe also DLNA violations.
---------------------------------------------------------------
[New I/O server worker #1-8] TRACE 15:01:29.072 HTTP: get/0$0$0/Test_FF_RW.avi / 0--1
[New I/O server worker #1-8] TRACE 15:01:29.073 Asked stream chunk : TimeRange [start=null, end=null] of Test_FF_RW.avi and player null
[New I/O server worker #1-8] TRACE 15:01:29.074 Sending 743440384 bytes.
[New I/O server worker #1-8] TRACE 15:01:29.076 Sent to socket: Content-Length: 743440384
[New I/O server worker #1-8] TRACE 15:01:29.077 Sent to socket: Content-Range: bytes 0-743440383/743440384
---------------------------------------------------------------------
In code I found that there is two behaviors for "Content-Length" so I added this to Panasonic.conf:
ChunkedTransfer = true

Now FF/RW works :-)
Maybe this should be enabled by default(when not defined). Now it works in opposite. I saw it only for PS3 that it is disabled but don't know other renderers.
ExSport 
Oct 28, 2011
#34 ExSportCZ@gmail.com
About the r947. I think in this commit already fixed ChunkedResponse-fixes-r864.patch was applied or not?
Old buggy one was committed in r826 so I thought fixed one was in r947.
But definitely "ChunkedTransfer = true" fixed FF/RW.
So it is needed this new one? "ChunkedResponse-fixes2.patch"
Thanks
Oct 28, 2011
#35 ava...@yahoo.com
ChunkedResponse-fixes2.patch can be applied against current trunk, it's a fix for r947+. No need to reverse any patches.

Chunked and 'normal' response are nearly identical now, I suspected that other renderers wouldn't have a problem with chunked.  Someone should try it on a PS3.

cheers
Oct 28, 2011
#37 ava...@yahoo.com
Exsport, just to clarify:

Yes, ChunkedResponse-fixes2.patch is still needed because without it 'normal' mode still has the FF/RW problem.  Once it's been applied then your Panasonic should work both in chunked and normal modes.

If others would experiment with setting ChunkedTransfer=true for their renderers, we'd know whether chunked can become the default.

EDIT: typo

Oct 28, 2011
#38 valkillm...@gmail.com
To whoever asked to testing this to PS3.  I have been messing with this for a few hours now.
Added ChunkedTransfer = true to PMS.conf 

Tested full transcode (Fast Five w/subs and DTS 'kept in stream':
FF and RW up to 120 X , back and forth random start and stops.  Had zero problems with A/V sync.

Tested remux (Prince of Persia w/ DTS 'kept in stream' :
FF and RW up to 120 X , back and forth with random starts and stops.  Zero sync issues.

Still testing with various other files/formats.  Will post further.
Oct 28, 2011
#39 ExSportCZ@gmail.com
Val, this property have to be added to renderer.conf = ps3.conf, not pms.conf
Oct 28, 2011
#40 ExSportCZ@gmail.com
Tested ChunkedTransfer = true on PS3 and it works same way like ChunkedTransfer = false.
Will compile new SB version with your latest patch to test it on Panasonic TV with ChunkedTransfer = false (default)
Oct 28, 2011
#41 valkillm...@gmail.com
To add:

I have tried this value entered in PMS.conf as 'true' , but was unaware it was to be added to P3renderer.conf instead so it was still set as 'false' there.

But I still achieved FF'ing and RW'ing full speed while trans/remuxing to my PS3.

If I reverse, and remove the value from PMS.conf and add it instead to the PS3renderer.conf as 'true' I achieve the same results.  FF'ing and RW'ing full speed while trans/remuxing

I am not tech saavy to understand such traits, so I am a little confused.  But either way it seems like my PS3 is able to achieve full speed FF/RW trans/remuxing now.  Very cool.
Oct 28, 2011
#42 ExSportCZ@gmail.com
You want to say it doesn't worked for you in past?
It worked for me in past with false and also now with true so no difference in behavior:-)
Now I am talking about editing renderer.conf, without applied last fix "ChunkedResponse-fixes2.patch"
Oct 29, 2011
#43 subjunk
Thanks for the latest fix. Committing it now
Oct 29, 2011
Project Member #44 Patrick....@gmail.com
Good! Let's hope r959 solves it!
Oct 29, 2011
#45 ExSportCZ@gmail.com
Tested on Panasonic TV with "ChunkedTransfer = true/false" and now FF/RW works:-)
Thx
Dec 18, 2011
Project Member #46 Patrick....@gmail.com
(No comment was entered for this change.)
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting