Skip to content

flumotion-mirror/flumotion-flashmedia

Repository files navigation

Dependencies
------------

flvlib - http://osflash.org/flvlib
rtmpy  - http://www.rtmpy.org
pyamf  - http://www.pyamf.org

Testing
-------

Streaming from a file and save it to disk:
 - start server:
FLU_DEBUG=4 flumotion-launch flash-media-server-producer ! disk-consumer directory=/tmp filename=test

 - start client:
  bin/ffmpeg -i phoenix.mp4 -re -acodec copy -vcodec copy -f flv rtmp://localhost/live/stream.flv

Verify whether the server correctly parses the framerate of the video file.

Server should go from hungry to happy, and report first received buffers
and timestamps for audio and video.

It is recomended that any test lasts more than 4h 39 min to be sure the encoder uses extended timestamps and we parse them properly. From http://dev.rtmpy.org/ticket/107:


== Compressed headers also can have an extended timestamp ==

If the channel is using extended timestamps because it has run for a long time (>= 0xffffff ms) the compressed headers (one byte long in theory) also contain an extended timestamp of four bytes after the channel ID.

If this is not taken into account, the body of those frames will contain those four extra bytes causing some trouble and corrupted messages.

Taken from a capture from a Flash Media Live Encoder -> rtmpy:

04 ff ff ff 00 02 2d 12 01 00 00 00 10 2c 2c e7  ......-......,,.
02 00 0d 40 73 65 74 44 61 74 61 46 72 61 6d 65  ...@setDataFrame
02 00 0a 6f 6e 4d 65 74 61 44 61 74 61 03 00 06  ...onMetaData...
61 75 74 68 6f 72 02 00 06 61 75 74 68 6f 72 00  author...author.
09 63 6f 70 79 72 69 67 68 74 02 00 00 00 0b 64  .copyright.....d
65 73 63 72 69 70 74 69 6f 6e 02 00 00 00 08 6b  escription.....k
65 79 77 6f 72 64 73 02 00 00 00 06 72 61 74 69  eywords.....rati
6e 67 02 00 00 00 05 74 69 74 6c 65 02 00 00 00  ng.....title....
0a 70 72 65 73 65 74 6e 61 6d 65 02 00 06 43 75  .presetname...Cu
This frame with a full header is from channel 4, specifies a body length of 0x22d bytes and its timestamp is defined with the extended timestamp field (0x102c2ce7)

But the next frame, with a compressed header contains also the same extended timestamp:

c4 10 2c 2c e7 73 74 6f 6d 00 0c 63 72 65 61 74  ..,,.stom..creat
69 6f 6e 64 61 74 65 02 00 19 54 68 75 20 4a 61  iondate...Thu Ja
6e 20 31 33 20 31 38 3a 33 38 3a 35 35 20 32 30  n 13 18:38:55 20
31 31 0a 00 0b 76 69 64 65 6f 64 65 76 69 63 65  11...videodevice
02 00 17 4c 6f 67 69 74 65 63 68 20 51 75 69 63  ...Logitech Quic
6b 43 61 6d 20 53 35 35 30 30 00 09 66 72 61 6d  kCam S5500..fram
65 72 61 74 65 00 40 39 00 00 00 00 00 00 00 05  erate.@9........
77 69 64 74 68 00 40 84 00 00 00 00 00 00 00 06  width.@.........
68 65 69 67 68 c4 10 2c 2c e7 74 00 40 7e 00 00  heigh..,,.t.@~..

About

No description, website, or topics provided.

Resources

License

Unknown, LGPL-2.1 licenses found

Licenses found

Unknown
COPYING
LGPL-2.1
LICENSE.LGPL

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published