<div>Hi everyone,</div><div><br></div><div>I'm working on an application to record from a camera/microphone through first Flash (tested with 10.2), then Flash Media Server (tested with 3.5.7) and finally RTMPdump (tested with 2.4). The end problem is that the dumped/recorded FLV is malformed, our at least doesn't have the necessary headers to play anywhere -- or to be converted through ffmpeg.</div>
<div><br></div><div>That's the short version, there's a long one too. The flow is this:</div><div>a) I start a Flash application, which connects to FMS and attaches a NetStream with the camera and mic. The app publishes to a specific stream on the media server (sending "live", but alternatives "record" or "append" do not change the outcome):</div>
<div><br></div><div> stream.attachCamera(camera);</div><div> stream.attachAudio(microphone);</div><div> stream.publish('mp4:myvideo.f4v?awesomelysecret', 'live');</div><div><br></div><div>b) Anywhere else, I can connect to the FMS stream and play back the video/audio from the live stream from a Flash player.</div>
<div><br></div><div>c) In order to record video from the stream, I use RTMPdump:</div><div><br></div><div> rtmpdump -V -v -r "rtmp://<a href="http://fml.4407.edgecastcdn.net/204407/mp4:myvideo.f4v">fml.4407.edgecastcdn.net/204407/mp4:myvideo.f4v</a>" -o output.flv</div>
<div><br></div><div>(I know there's some confusion in formats here, but that's mostly for setting the recording container within FMS. The stream itself is Sorensen/H.263 and FLV)</div><div><br></div><div>The resulting FLV does not seem to have correct headers and cannot be played/read anywhere. I'm wondering either how have RTMPdump write correct headers? Or how to reconstruct the video correctly from from the dump? (This flow, btw, works beautifully when I'm not using the built-in Adobe Flash encoder. When streaming through FMLE or Wirecast, dumps are well-formed. Debug information below.)</div>
<div><br></div><div>Any help is greatly appreciated -- thank you so much, </div><div>Steffen</div><div><br></div><div><br></div><div><br></div><div><br></div><div>HEX DUMP OF HEADERS</div><div>00000000 46 4c 56 01 01 00 00 00 09 00 00 00 00 09 00 1e |FLV.............|</div>
<div>00000010 1b 00 00 00 00 00 00 00 12 00 00 84 f3 00 9e 72 |...............r|</div><div>00000020 25 d5 37 ea 84 b5 57 c3 fb 60 1d ad 5e 02 96 50 |%.7...W..`..^..P|</div><div>00000030 2c cf 98 ce 19 55 07 01 ec c1 80 34 06 00 54 4a |,....U.....4..TJ|</div>
<div>00000040 06 00 40 4b 06 01 a4 7c 25 17 04 01 ff 84 bf 7c |..@K...|%......||</div><div>00000050 49 55 e0 60 61 47 e0 a1 53 6f cb b0 74 a9 5a 9c |IU.`aG..So..t.Z.|</div><div>00000060 fd 50 3a b0 7a 22 9b 51 06 00 84 18 04 1b ef 78 |.P:.z".Q.......x|</div>
<div>00000070 18 00 d0 60 1a 74 21 89 02 32 a1 27 41 81 79 12 |...`.t!..2.'A.y.|</div><div>00000080 37 04 6f d1 1f dc c0 3d fd 98 d2 8a 75 50 1c 07 |7.o....=....uP..|</div><div>00000090 ab 06 01 88 03 87 e0 c0 12 2a 08 00 18 01 aa 82 |.........*......|</div>
<div>000000a0 18 21 89 31 5c 8a bf 97 de a3 ef 97 76 37 e0 60 |.!.1\.......v7.`|</div><div>000000b0 7e af 17 f5 6c f4 7f c7 72 d6 24 bb ad b4 18 45 |~...l...r.$....E|</div><div>000000c0 00 70 30 03 20 c0 36 83 00 2c 0c 03 48 40 a3 e5 |.p0. .6..,..H@..|</div>
<div>000000d0 6a d5 84 01 f8 96 ab df 12 4b a7 3e 3e 96 fd 59 |j........K.>>..Y|</div><div>000000e0 70 07 97 35 b6 72 17 ed 8a 73 2a 93 4f 7f 7f fd |p..5.r...s*.O...|</div><div>000000f0 73 f5 82 1c 15 bf 86 72 71 57 c9 de 4f be 04 33 |s......rqW..O..3|</div>
<div>00000100 84 fb 5f 4e 52 0b 78 22 f7 c2 7d ac 02 f0 43 01 |.._NR.x"..}...C.|</div><div>00000110 52 5e 55 57 18 bd 50 cd f0 99 00 5c 22 c5 78 02 |R^UW..P....\".x.|</div><div><br></div><div>OUTPUT VIDEO FROM RTMPDUMP</div>
<div><a href="http://refresh.dk/rtmpdump/output.flv">http://refresh.dk/rtmpdump/output.flv</a></div><div><br></div><div>DEBUG INFO FROM RTMPDUMP</div><div><a href="http://refresh.dk/rtmpdump/rtmpdump-output.txt">http://refresh.dk/rtmpdump/rtmpdump-output.txt</a></div>
<div><br></div><div><div>FLASH/FLEX CLASS USED TO PUBLISH</div><div><a href="http://refresh.dk/rtmpdump/VisualCamera.as">http://refresh.dk/rtmpdump/VisualCamera.as</a></div></div><div><br></div>