<p>I would like my website to record flvs using webcams. These flvs need to play smoothly so I can play with them afterwards, for example transcoding them to avis.</p>

<p>I've tried many different servers to handle the flv recording. The resulting flvs play OK in Wimpy FLV Player, for example, except that the progress indicator doesn't move smoothly or in a regular fashion. This is a sign that there is something wrong and if I try to transcode them using "ffmpeg -i input.flv output.avi" (with or without the framerate option "-r 15") I don't get the right avi.</p>

<p>Here's what I tried and the kind of problem I get:</p>

<ol>
<li><p>Using <a href="http://osflash.org/red5" rel="nofollow noreferrer">red5</a> (v 0.6.3 and 0.7.0,
both on OS X 10.5.4 and Ubuntu 8.04)
and the publisher.html example it
includes. Here's the <a href="http://www.marc-andre.ca/posts/blog/webcam/test-red5-publisher.flv" rel="nofollow noreferrer">resulting
flv</a>. The indicator jumps towards
the end very rapidly.</p></li>
<li><p>Still using red5, but publishing "live" and starting the recording after a couple of seconds. I used <a href="http://sziebert.net/posts/server-side-stream-recording-with-red5/" rel="nofollow noreferrer">these example files</a>. Here's the <a href="http://www.marc-andre.ca/posts/blog/webcam/test-red5-live-sziebert.flv" rel="nofollow noreferrer">resulting flv</a>. The indicator still jumps to the end very rapidly, no sound at all with this method...</p></li>
<li><p>Using <a href="http://www.wowzamedia.com/products.html" rel="nofollow noreferrer">Wowza Media Server Pro</a> (v 1.5.3, on my mac). The progress indicator doesn't jump to the end, but it moves more quickly at the very beginning. This is enough that conversion to other formats using ffmpeg will have the visual not synchronized properly with the audio. Just to be sure I tried the <a href="http://www.marc-andre.ca/posts/blog/webcam/test-wowza.flv" rel="nofollow noreferrer">video recorder that comes with it</a>, as well as using red5's publisher.html (with <a href="http://www.marc-andre.ca/posts/blog/webcam/test-wowza-publisher.flv" rel="nofollow noreferrer">identical results</a>).</p></li>
<li><p>Using Flash Media Server 3 through an account hosted at <a href="http://www.influxis.com" rel="nofollow noreferrer">www.influxis.com</a>. I get yet another progression pattern. The progress indicator jumps a bit a the beginning and then becomes regular. Here's <a href="http://www.marc-andre.ca/posts/blog/webcam/test-influxis.flv" rel="nofollow noreferrer">an example</a>.</p></li>
</ol>

<p>I know it is possible to record a "flawless" flv because facebook's video application does it (using red5?) Indeed, it's easy to look at the HTML source of facebook video and get the http URL to download the flvs they produce. When played back in Wimpy, the progress indicator is smooth, and transcoding with "ffmpeg -i facebook.flv -r 15 facebook.avi" produces a good avi. Here's <a href="http://www.marc-andre.ca/posts/blog/webcam/test-facebook.flv" rel="nofollow noreferrer">an example</a>.</p>

<p>So, can I manage to get a good flv with a constant framerate?</p>

<p>PS: Server must be either installable on Linux or else be available at a reasonably priced hosting provider.</p>

<p>Edit: As pointed out, maybe the problem is not framerate per say but something else. I am not knowledgeable in video and I don't know how to inspect the examples I gave to check things out; maybe someone can shed some light on this.</p>

[{'answer_id': 67560, 'author': 'Gilles', 'author_id': 10024, 'author_profile': 'https://Stackoverflow.com/users/10024', 'pm_score': 0, 'selected': False, 'text': '<p>Your problem might not be with the framerate but with keyframes and markers.</p>\n'}, {'answer_id': 108667, 'author': 'user19670', 'author_id': 19670, 'author_profile': 'https://Stackoverflow.com/users/19670', 'pm_score': 2, 'selected': False, 'text': '<p>Looking at your red5 example flv in <a href="http://www.richapps.de/?p=66" rel="nofollow noreferrer">richflv</a> (very handy flv editing tool) we can see that you have regular keyframes but the duration metadata isn\'t set.</p>\n\n<p>The facebook example flv has hardly any keyframes (which would mean you wouldn\'t be able \'seek\' within it very well) however the metadata duration is correct.</p>\n\n<p>I\'d look into flvtool2 and flvtool++ (which is a more memory efficient alternative for long files) to insert the correct metadata post capture.</p>\n'}]
['https://Stackoverflow.com/questions/67536', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8279/']