google-code-export / flowplayer-core

Automatically exported from code.google.com/p/flowplayer-core
2 stars 0 forks source link

Seeking doesn't work when using video url with security parameters for nginx secure link module #524

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We've experienced some problems with playing video after seeking to some 
position on the timeline.

After setting a new play position (click in the progress bar) there are two 
cases possible:
1. player shows that playback is resumed, sound is normally played but video is 
not shown (the last video scene remains on the screen).
2. player is loading content but not resume playing.

I provide some test pages to reproduce this issue.

Here an example with the seek problem.
http://kino.atel.su/portal-atel/page/testfreez.do

Our video content is under nginx http-server.
We use nginx secure link module to add some security to our video urls.

So our typical video url contains some parameters. These parameters for the 
secure link module.

Pseudostreaming plugin by default adds parameter "start" to the end of the 
video url. It adds "?start=<seconds>". And even if we already have parameters 
in the url it adds "?start=<seconds>" anyway.

For example:

http://mp4.vidimax.ru:3745//b9/b98a64f6-2194-4866-8506-2087211b7aec.adobe_LOTR.m
p4?st=XS-ZMHx7RLl6MdlR9cZh1Q&e=1334226822

pseudostreaming add parameter "start" like this:
http://mp4.vidimax.ru:3745//b9/b98a64f6-2194-4866-8506-2087211b7aec.adobe_LOTR.m
p4?st=XS-ZMHx7RLl6MdlR9cZh1Q&e=1334226822?start=64.783

"?start=64.783" - this is not correctly when we already have parameters in the 
url.

So to avoid this problem I configured queryString:
    queryString: encodeURIComponent('&start=${start}')

Here an example with the same configuration but with video url that not 
protected by the nginx secure link module.
http://kino.atel.su/portal-atel/page/testok.do
On this page seeking works well.

We use Flowplayer-3.2.9
  flowplayer-3.2.9.min.js
  flowplayer.commercial-3.2.9.swf
  flowplayer.pseudostreaming-3.2.9.swf

Original issue reported on code.google.com by qli...@gmail.com on 23 Apr 2012 at 11:46

GoogleCodeExporter commented 9 years ago
Please confirm if you have followed the metadata instructions on the page

http://flowplayer.org/plugins/streaming/pseudostreaming.html

from looking at the start times, your moov atoms are not in the header of the 
file, and because its a long video its downloading until it finds it each time. 

Make sure you have created the correct metadata / seekpoints required, and 
possibly use this suggested tool to fix it

http://renaun.com/blog/code/qtindexswapper/

I won't be able to test further until that is corrected. 

Load this on your server perhaps so we know its not the video 
http://pseudo01.hddn.com/vod/demo.flowplayervod/Extremists.flv

Original comment by dani...@electroteque.org on 23 Apr 2012 at 1:15

GoogleCodeExporter commented 9 years ago
any luck ?

Original comment by dani...@electroteque.org on 24 Apr 2012 at 12:23

GoogleCodeExporter commented 9 years ago

I'm still waiting for reply from our employee who responsible for preparing 
video content.

Sorry for the delay.

Original comment by qli...@gmail.com on 24 Apr 2012 at 12:35

GoogleCodeExporter commented 9 years ago
We are using qt-faststart to fix "moov atoms". Is that enough?
By the way "seek" in previous version 3.2.7 worked just fine.

Original comment by qli...@gmail.com on 24 Apr 2012 at 1:02

GoogleCodeExporter commented 9 years ago
http://pseudo01.hddn.com/vod/demo.flowplayervod/Extremists.flv please upload 
this video if possible, your videos are failing to produce metadata events at 
the start. 

Original comment by dani...@electroteque.org on 24 Apr 2012 at 5:41

GoogleCodeExporter commented 9 years ago
We will try your video. But have you got sample video in mp4 container?

Original comment by qli...@gmail.com on 24 Apr 2012 at 6:54

GoogleCodeExporter commented 9 years ago
I'll try and find one also. What server is this ?

Original comment by dani...@electroteque.org on 25 Apr 2012 at 5:50

GoogleCodeExporter commented 9 years ago
try this

http://pseudo01.hddn.com/vod/demo.flowplayervod/eye-pseudo.mp4

please also confirm the server software

Original comment by dani...@electroteque.org on 25 Apr 2012 at 7:06

GoogleCodeExporter commented 9 years ago
Server software

Ubuntu 10.04.3 LTS
Linux odin 2.6.32-41-generic-pae #88-Ubuntu SMP Thu Mar 29 14:24:36 UTC 2012 
i686 GNU/Linux

web server

nginx version: nginx/1.0.11
built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5) 
TLS SNI support enabled
configure arguments: --with-http_flv_module --with-http_mp4_module 
--with-http_ssl_module --with-http_secure_link_module

Original comment by qli...@gmail.com on 26 Apr 2012 at 12:23

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Ok it's nginx thanks. Have you placed the mp4 on your server ? Perhaps there is 
issues with the nginx mp4 module. I'm trying to manage to get metadata 
triggered on load or else pseudostreaming is not going to work for you. 

Original comment by dani...@electroteque.org on 26 Apr 2012 at 6:42

GoogleCodeExporter commented 9 years ago
We've just found that the issue is reproduced on video that encoded with h264 
High profile level 4.1

We've encoded the same video with base-profile level 3.0 and Flowplayer plays 
it just fine.

Original comment by qli...@gmail.com on 27 Apr 2012 at 1:28

GoogleCodeExporter commented 9 years ago
If it would help here some encoding parameters for libx264 under ffmpeg

The issue reproduces with:
coder=1
flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=umh
subq=8
me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
b_strategy=2
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=3
refs=5
directpred=3
trellis=1
flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip
wpredp=2
rc_lookahead=50
bufsize=20000000
deblockalpha=0
deblockbeta=0
level=4.1

And not reproduces with:
coder=0
flags=+loop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8profile 
me_method=hex
subq=8
me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=0
refs=3
directpred=1
trellis=1
flags2=+bpyramid+wpred+mixed_refs-dct8x8
level=30

Original comment by qli...@gmail.com on 27 Apr 2012 at 2:47

GoogleCodeExporter commented 9 years ago
Hi this is most likely a requirement for the NGINX module correct ? 

http://pseudo01.hddn.com/vod/demo.flowplayervod/eye-pseudo.mp4 have you put 
this on the server yet. 

Original comment by dani...@electroteque.org on 28 Apr 2012 at 4:16

GoogleCodeExporter commented 9 years ago
Hi did you manage to put up a link on your sevrer with that mp4 demo. 

Original comment by electrot...@gmail.com on 1 May 2012 at 4:25

GoogleCodeExporter commented 9 years ago
Here is your video on our server
http://kino.atel.su/portal-atel/page/testfreez.do

Original comment by qli...@gmail.com on 2 May 2012 at 12:29

GoogleCodeExporter commented 9 years ago
Sorry for the delay, there is obvious issues with the module on your server, it 
is downloading the entire file before it can begin playback. Perhaps try and 
re-compile. Try and send a bug report to nginx, or try and get more information 
of what is required for the videos to work in this module. 

Original comment by electrot...@gmail.com on 12 May 2012 at 4:02

GoogleCodeExporter commented 9 years ago
OK, thanks guys.

Original comment by qli...@gmail.com on 14 May 2012 at 8:27

GoogleCodeExporter commented 9 years ago
im sending the report to them are you able to keep the file open if possible. 

Original comment by electrot...@gmail.com on 18 May 2012 at 4:20

GoogleCodeExporter commented 9 years ago
im sending the report to them are you able to keep the file open if possible. 

http://trac.nginx.org/nginx/ticket/168

Original comment by electrot...@gmail.com on 18 May 2012 at 4:28

GoogleCodeExporter commented 9 years ago
Yes, we'll keep. Thanks

Original comment by qli...@gmail.com on 18 May 2012 at 7:45

GoogleCodeExporter commented 9 years ago
http://trac.nginx.org/nginx/ticket/168

they automatically closed it they claim it's a moov atom issue with your files 
can you please check that perhaps. someone else is complaining about this issue 
also. 

Original comment by electrot...@gmail.com on 18 May 2012 at 10:49

GoogleCodeExporter commented 9 years ago
It is your video on the page :)

Original comment by qli...@gmail.com on 18 May 2012 at 11:24

GoogleCodeExporter commented 9 years ago
http://mp4.vidimax.ru:3745/89/89733686-538d-4161-8650-c5c42437169f.adobe_lo_res.
mp4?st=qZkf1Mltll-X_0wovGSA3A&e=1337717539

the filename becomes this so im unsure. its definitely an issue with the 
extension are you able to respond to it.

Original comment by dani...@electroteque.org on 22 May 2012 at 6:15

GoogleCodeExporter commented 9 years ago
Hi are you able to reference the file url with start=0 at all ? They seem to 
suggest this may help. 

Original comment by dani...@electroteque.org on 23 May 2012 at 4:09

GoogleCodeExporter commented 9 years ago
I would suggest perhaps compiling the very latest version to see if that makes 
it any better. It seems like the server is manipulating the moov atoms and 
causing this issue if its also happening on the demo file I sent. 

Original comment by dani...@electroteque.org on 23 May 2012 at 4:13

GoogleCodeExporter commented 9 years ago
Hi! 
It seems the issue is no longer reproduced. And it's strange cause we didn't do 
anything that would fix it. 
We didn't upgrade nginx nor its modules. We didn't upgrade flowplayer. And we 
didn't re encoded our videos.
It's strange

Original comment by qli...@gmail.com on 23 May 2012 at 9:21

GoogleCodeExporter commented 9 years ago
Its still preloading the file for me. Are you able to work it out with them 
perhaps ? Can you also try the most basic possible setup, this seems to have 
security tokens and the filenames do not match the file i sent

eye-pseudo.mp4

Original comment by dani...@electroteque.org on 23 May 2012 at 2:07

GoogleCodeExporter commented 9 years ago
We can't reproduce the issue with your video. It's so short that it's cached 
almost immediatly.
I'll try to make more simple example with this video.

Original comment by qli...@gmail.com on 23 May 2012 at 8:17

GoogleCodeExporter commented 9 years ago
http://media.blacktrash.org/fp/flowplayer-640.mp4

please try this video it indeed had moov atom issues aswell the other one so 
nginx people were right :)

or this

http://pseudo01.hddn.com/vod/demo.flowplayervod/bbb-800.mp4

Original comment by dani...@electroteque.org on 24 May 2012 at 1:39

GoogleCodeExporter commented 9 years ago
I've placed your video 
http://pseudo01.hddn.com/vod/demo.flowplayervod/bbb-800.mp4 
on our test page
http://kino.atel.su/portal-atel/page/testfreez.do

Works well

Original comment by qli...@gmail.com on 25 May 2012 at 11:34

GoogleCodeExporter commented 9 years ago
yes this video doesn't have the moov atom issue. Are you able to compare back 
to your own files, I think its still a moov atom issue with your own files. 

Original comment by dani...@electroteque.org on 25 May 2012 at 8:51

GoogleCodeExporter commented 9 years ago
As I wrote above the issue is not reproduced any more. It's ok now. I guess we 
could close the issue :)
thanks!

Original comment by qli...@gmail.com on 25 May 2012 at 9:24

GoogleCodeExporter commented 9 years ago
ok not a problem thanks closing for now. 

Original comment by electrot...@gmail.com on 27 May 2012 at 2:59