Hi guys,
I use jwplayer with flv streaming module (lighttpd), I added HD plugin recently it works great but if I change HD on to HD off, my video will start to 0sec
Is it possible to don't rollback ?
Thanks in advance
Dga
Hi guys,
I use jwplayer with flv streaming module (lighttpd), I added HD plugin recently it works great but if I change HD on to HD off, my video will start to 0sec
Is it possible to don't rollback ?
Thanks in advance
Dga
Hello,
I use a serverside support for streaming, LightTPD I can move into my video via the timeline, but when I switch HD on to off (or off to on) my video restart to 0sec.
If your LightTPD server is functioning correctly, you should see requests like this as you switch back and forth between SD & HD.
"GET /video/TestFile_SD.mp4?start=834.227 HTTP/1.1" 200 40027
"GET /video/TestFile_HD.mp4?start=862.338 HTTP/1.1" 200 22044Check your server logs or use Live HTTP Headers for Firefox or ieHTTPHeaders for Internte Explorer.
Hello hobbs,
actualy I got that :
When I move into my video
"GET /CDPEA/16102009/CDPEA021109-800.flv?start=857830004 HTTP/1.1" 200 493345
When I clic on HD button
"GET /CDPEA/16102009/CDPEA021109-400.flv HTTP/1.1" 200 383845
Your video file CDPEA021109-400.flv probably doesn't have the metadata array of time/byte-position required for pseudostreaming.
What is the metadata array of time/byte-position ?
When I want to use these video with lighttpd streaming module, I use flvtool2
flvtool2 -U myvideo.flv
flvtool2 -U creates and injects the metadata array.
You can check the metadata with flvdump from: http://code.google.com/p/flvmeta/
I tested with a shorter video (30sec)
I got the same problem with this video too, here is my flvdump :
Tag type: Audio
Body length: 210
Timestamp: 29257
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1003 at 0x254A58 (2443864) ---
Tag type: Video
Body length: 1883
Timestamp: 29267
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 1894
--- Tag #1004 at 0x2551C2 (2445762) ---
Tag type: Audio
Body length: 210
Timestamp: 29309
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1005 at 0x2552A3 (2445987) ---
Tag type: Video
Body length: 2804
Timestamp: 29333
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 2815
--- Tag #1006 at 0x255DA6 (2448806) ---
Tag type: Audio
Body length: 210
Timestamp: 29362
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1007 at 0x255E87 (2449031) ---
Tag type: Video
Body length: 2420
Timestamp: 29400
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 2431
--- Tag #1008 at 0x25680A (2451466) ---
Tag type: Audio
Body length: 210
Timestamp: 29414
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1009 at 0x2568EB (2451691) ---
Tag type: Audio
Body length: 210
Timestamp: 29466
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1010 at 0x2569CC (2451916) ---
Tag type: Video
Body length: 1508
Timestamp: 29467
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 1519
--- Tag #1011 at 0x256FBF (2453439) ---
Tag type: Audio
Body length: 210
Timestamp: 29518
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1012 at 0x2570A0 (2453664) ---
Tag type: Video
Body length: 1923
Timestamp: 29533
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 1934
--- Tag #1013 at 0x257832 (2455602) ---
Tag type: Audio
Body length: 210
Timestamp: 29571
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1014 at 0x257913 (2455827) ---
Tag type: Video
Body length: 23882
Timestamp: 29600
* Video codec: Sorensen H.263
* Video frame type: keyframe
Previous tag size: 23893
--- Tag #1015 at 0x25D66C (2479724) ---
Tag type: Audio
Body length: 210
Timestamp: 29623
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1016 at 0x25D74D (2479949) ---
Tag type: Video
Body length: 954
Timestamp: 29667
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 965
--- Tag #1017 at 0x25DB16 (2480918) ---
Tag type: Audio
Body length: 210
Timestamp: 29675
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1018 at 0x25DBF7 (2481143) ---
Tag type: Audio
Body length: 210
Timestamp: 29727
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1019 at 0x25DCD8 (2481368) ---
Tag type: Video
Body length: 1842
Timestamp: 29733
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 1853
--- Tag #1020 at 0x25E419 (2483225) ---
Tag type: Audio
Body length: 210
Timestamp: 29780
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1021 at 0x25E4FA (2483450) ---
Tag type: Video
Body length: 1741
Timestamp: 29800
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 1752
--- Tag #1022 at 0x25EBD6 (2485206) ---
Tag type: Audio
Body length: 210
Timestamp: 29832
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1023 at 0x25ECB7 (2485431) ---
Tag type: Video
Body length: 3488
Timestamp: 29867
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 3499
--- Tag #1024 at 0x25FA66 (2488934) ---
Tag type: Audio
Body length: 210
Timestamp: 29884
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1025 at 0x25FB47 (2489159) ---
Tag type: Video
Body length: 2135
Timestamp: 29933
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 2146
--- Tag #1026 at 0x2603AD (2491309) ---
Tag type: Audio
Body length: 210
Timestamp: 29936
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1027 at 0x26048E (2491534) ---
Tag type: Audio
Body length: 210
Timestamp: 29989
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1028 at 0x26056F (2491759) ---
Tag type: Video
Body length: 2465
Timestamp: 30000
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 2476
--- Tag #1029 at 0x260F1F (2494239) ---
Tag type: Audio
Body length: 210
Timestamp: 30041
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1030 at 0x261000 (2494464) ---
Tag type: Video
Body length: 1680
Timestamp: 30067
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 1691
--- Tag #1031 at 0x26169F (2496159) ---
Tag type: Audio
Body length: 210
Timestamp: 30093
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1032 at 0x261780 (2496384) ---
Tag type: Audio
Body length: 210
Timestamp: 30145
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1033 at 0x261861 (2496609) ---
Tag type: Audio
Body length: 210
Timestamp: 30198
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1034 at 0x261942 (2496834) ---
Tag type: Audio
Body length: 210
Timestamp: 30250
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1035 at 0x261A23 (2497059) ---
Tag type: Audio
Body length: 210
Timestamp: 30302
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1036 at 0x261B04 (2497284) ---
Tag type: Audio
Body length: 210
Timestamp: 30354
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221
--- Tag #1037 at 0x261BE5 (2497509) ---
Tag type: Audio
Body length: 210
Timestamp: 30407
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221Thanks in advance :)
The beginning of the flvdump should look like this:
Magic: FLV
Version: 1
Has audio: yes
Has video: yes
Offset: 9
--- Tag #1 at 0xD (13) ---
Tag type: Meta
Body length: 2066
Timestamp: 0
* Metadata event name: onMetaData
* Metadata contents: {
'creator' => 'encoded with yamdi http://xmoov.com/xmoov-php/'
'metadatacreator' => 'Manitu Group FLV MetaData Injector 2'
'hasKeyframes' => true
'hasVideo' => true
'hasAudio' => true
'hasMetadata' => true
'canSeekToEnd' => true
'duration' => 145.187000
'datasize' => 2119.000000
'videosize' => 8635161.000000
'videocodecid' => 4.000000
'width' => 500.000000
'height' => 281.000000
'framerate' => 25.000000
'videodatarate' => 461.807649
'audiosize' => 1545124.000000
'audiocodecid' => 2.000000
'audiosamplerate' => 44100.000000
'audiosamplesize' => 16.000000
'stereo' => true
'audiodatarate' => 78.670404
'filesize' => 10182417.000000
'lasttimestamp' => 145.162000
'lastkeyframetimestamp' => 145.158000
'lastkeyframelocation' => 10181976.000000
'audiodelay' => 0.038000
'creationdate' => 'unknown'
'metadatadate' => Fri, 13 Mar 2009 04:47:10 Pacific Standard Time
'keyframes' => {
'filepositions': [
2650.000000
26672.000000
50416.000000
...
10151102.000000
10174883.000000
10182072.000000
]
'times': [
0.038000
2.038000
4.038000
...
142.558000
144.558000
145.158000
]
}
}
Previous tag size: 2077
Thanks for your answer, what did you use to create metadata array ?
flvtool2 isn't enough?
flvtool2, FLVMDI, yamdi, flvtool++, flvmeta, and jFlvTool all work.
I normally use FLVMDI /k /l videofilename.flv
flvtool2 -U videofilename.flv should work.
flvtool2 is the only one that works with pipes, so it is appropriate for serverside use.
Ok I got that
Magic: FLV
Version: 1
Has audio: yes
Has video: yes
Offset: 9
--- Tag #1 at 0xD (13) ---
Tag type: Meta
Body length: 1131
Timestamp: 0
* Metadata event name: onMetaData
* Metadata contents: {
'hasKeyframes' => true
'hasMetadata' => true
'duration' => 20.334
'cuePoints' => [
]
'audiosamplerate' => 11000
'audiodatarate' => 32.2423644348
'datasize' => 1287904
'framerate' => 14
'hasVideo' => true
'audiosamplesize' => 16
'stereo' => true
'canSeekToEnd' => false
'videocodecid' => 2
'lasttimestamp' => 20.267
'lastkeyframetimestamp' => 20
'audiosize' => 85961
'hasAudio' => true
'audiodelay' => 0
'videosize' => 1200767
'keyframes' => {
'times': [
0
0.8
1.6
2.4
3.2
4
4.8
5.6
6.4
7.2
8
8.8
9.6
10.4
11.2
12
12.8
13.6
14.4
15.2
16
16.8
17.6
18.4
19.2
20
]
'filepositions': [
1159
39193
84666
144987
255591
376160
409972
501014
587836
633651
670094
696323
738471
772876
808776
847960
896127
937753
976874
1009666
1045910
1089090
1129126
1174180
1219332
1264366
]
}
'height' => 528
'filesize' => 1290701
'metadatadate' => Fri, 13 Nov 2009 16:55:31 Paris, Madrid
'metadatacreator' => 'inlet media FLVTool2 v1.0.6 - http://www.inlet-media.de/flvtool2'
'audiocodecid' => 2
'videodatarate' => 472.65485765
'hasCuePoints' => false
'width' => 960
}
Previous tag size: 1142
--- Tag #2 at 0x487 (1159) ---
Tag type: Video
Body length: 21269
Timestamp: 0
* Video codec: Sorensen H.263
* Video frame type: keyframe
Previous tag size: 21280
--- Tag #3 at 0x57AB (22443) ---
Tag type: Audio
Body length: 209
Timestamp: 0
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 220
--- Tag #4 at 0x588B (22667) ---
Tag type: Audio
Body length: 210
Timestamp: 52
...
...
...
...
...
--- Tag #695 at 0x13A94A (1288522) ---
Tag type: Video
Body length: 1939
Timestamp: 20267
* Video codec: Sorensen H.263
* Video frame type: inter frame
Previous tag size: 1950
--- Tag #696 at 0x13B0EC (1290476) ---
Tag type: Audio
Body length: 210
Timestamp: 20271
* Sound type: Stereo
* Sound size: 16 bits
* Sound rate: 11 kHz
* Sound format: MP3
Previous tag size: 221But it doesn't work
Are you absolutely sure that you are getting the updated FLV from your server?
Here's what my LightTPD log looks like as I switch in and out of HD.
"GET /video/ThingsFallApart.flv?start=0 HTTP/1.1" 200 3670016
"GET /video/ThingsFallApart.mp4?start=9.6 HTTP/1.1" 200 13814421
"GET /video/ThingsFallApart.flv?start=2522712 HTTP/1.1" 200 3768757
"GET /video/ThingsFallApart.mp4?start=43.2 HTTP/1.1" 200 6651797
"GET /video/ThingsFallApart.flv?start=4513549 HTTP/1.1" 200 5668881
"GET /video/ThingsFallApart.mp4?start=53.6 HTTP/1.1" 200 7539661
"GET /video/ThingsFallApart.flv?start=5986795 HTTP/1.1" 200 1731810
Hello Hobbs,
Yes, I'm sure about that (Using jw player 4.6.485)
I got this on my lighttpd log
"GET /test/testHD.flv HTTP/1.1" 206 888857
"GET /test/testHD.flv HTTP/1.1" 206 1483077
"GET /test/testLD.flv HTTP/1.1" 206 2122559
"GET /test/testHD.flv HTTP/1.1" 200 2102178
"GET /test/testLD.flv HTTP/1.1" 206 1229039And here is my new setup :
<script type='text/javascript'>
var so = new SWFObject('http://static1.mydomain.net/swf/player.swf','ply','720','480','9','#000000');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://stream.mydomain.net/test/testLD.flv');
so.addVariable('hd.file','http://stream.mydomain.net/test/testHD.flv');
so.addVariable('plugins','hd-1,shortcuts-1');
so.addVariable('backcolor','000000');
so.addVariable('skin','http://static1.mydomain.net/swf/bekle.swf');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('lightcolor','696969');
so.addVariable('screencolor','000000');
so.addVariable('controlbar','over');
so.addParam('type','http');
so.addParam('http.startparam','start');
so.addVariable('start', '0');
so.write('video');
</script>With this new setup I can't move into my video, and when I clic on HD button, video restart.
My last setup, where streaming works, I can move into my video but if I clic on HD button video restart to 0 sec
<script type='text/javascript'>
var so = new SWFObject('http://static1.mydomain.net/swf/player.swf','ply','470','320','9','#000000');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addParam('type','video');
so.addVariable('file','playlist.xml');
so.addVariable('hd.file','playlistHD.xml');
so.addVariable('plugins','hd-1,shortcuts-1');
so.addVariable('shortcuts.slowmotion','true');
so.addVariable('backcolor','000000');
so.addVariable('skin','http://static1.mydomain.net/swf/bekle.swf');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('lightcolor','40B901');
so.addVariable('controlbar','over');
so.addVariable('streamer','lighttpd');
so.addVariable('dock','true');
so.write('video');
</script>My xml
<rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
<channel>
<item>
<title>HTTP streaming</title>
<description>Bitrate switching for HTTP streaming is done on startup and with every seek and fullscreen switch.</description>
<media:content bitrate="400" width="372" url="http://stream.mydomain.net/test/testLD.flv" />
<media:thumbnail url="" />
<jwplayer:type>http</jwplayer:type>
<jwplayer:streamer>starttime</jwplayer:streamer>
</item>
</channel>
</rss>
Two things I see:
1) Your LightTPD log looks different than mine. The start parameter is missing:
"GET /video/ThingsFallApart.flv<strong>?start=0</strong> HTTP/1.1" 200 3670016
"GET /test/testHD.flv HTTP/1.1" 206 8888572) You are mixing up Adobe Flash Player parameters with JW FLV Player flashvars in your player embedding code:
<script type='text/javascript'>
var so = new SWFObject('http://static1.mydomain.net/swf/player.swf','ply','720','480','9','#000000');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://stream.mydomain.net/test/testLD.flv');
so.addVariable('hd.file','http://stream.mydomain.net/test/testHD.flv');
so.addVariable('plugins','hd-1,shortcuts-1');
so.addVariable('backcolor','000000');
so.addVariable('skin','http://static1.mydomain.net/swf/bekle.swf');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('lightcolor','696969');
so.addVariable('screencolor','000000');
so.addVariable('controlbar','over');
<strike>so.addParam('type','http');</strike>
<strike>so.addParam('http.startparam','start');</strike>
<strong>so.addVariable('type','http');</strong>
<strong>so.addVariable('http.startparam','start');</strong>
so.addVariable('start', '0');
so.write('video');
</script>
God X.X
Thanks a lot, It works fine now !
OH! You're welcome.
[i]Enjoy… Good Luck![/i]
If you have serverside support for streaming, switching SD/HD will resume at the nearest keyframe.
Serverside support for streaming means an RTMP server (FMS, Red5, or Wowza), the FLV/H.264 pseudostreaming modules for Apache2, nginx, LightTPD, or Microsoft IIS, or a serverside script for pseudostreaming.