Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: 2d animation

by wanna_code_perl (Pilgrim)
on Aug 15, 2011 at 22:40 UTC ( #920363=note: print w/ replies, xml ) Need Help??


in reply to Re: 2d animation
in thread 2d animation

I meant streaming to the encoder (e.g., ffmpeg) in the Unix pipelining sense, not streaming to the end user. Offline encoding is indeed what I want, "exported as any reasonable movie format". Sorry if that wasn't clear.


Comment on Re^2: 2d animation
Re^3: 2d animation
by BrowserUk (Pope) on Aug 15, 2011 at 23:11 UTC

    Hm. OKay, but still at somepoint, someone is going to watch these movies right?

    Drawing, compressing, shipping and displaying 60 frames a second of video in order to display 60 individual numeric values per second is a laborious, time & space consuming way of allowing them to see it. Especially if there are going to be many such videos.

    It would be far more cost effective to construct a simple application that reads the raw timestamp/value pairs from a file and draws the scrolling line trace on the users screen on demand. Then you give the user(s) the application once and send them the raw data files -- which will compress readily -- as they become available.

    My estimate is that 10 minutes of raw data -- say 2 x 64-bit float values per reading -- 16 * 60 * 60 * 10 = 1/2 Mb uncompressed and reasonably, less than half that zipped.

    The same information captured as 640x480 video will run to ~60MB. Even if you radically compress it with a lossy codec, you'll be very lucky to get much below 30-35MB. And the results would be hideously blurry, blocky and inaccurate. Effectively useless for anything other than "Ooh. Look at that!".

    I also seriously doubt that you'll be able to render the movies in real-time, which means you'll first have to record the data, and then play it back -- via some application that renders the scroll line trace -- so you can record that as the movie.

    So, you'll need a line tracer anyway to create the movies. Once you have that, why not just give a copy to the user(s) and let them see the actual trace rather than wait for you to produce and ship some huge, blotchy movie of it?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      The moving graph is composited on top of raw multi-camera footage, along with some other control information. This is in fact why I wanted to export the graph in a video format.

      Hard to believe, yes, but sometimes the OP actually knows what they want. :-)

        The moving graph is composited on top of raw multi-camera footage, along with some other control information.

        That compositing could also be done at the client for a considerable saving.

        But it is your own and your clients cpu, bandwidth and time, therefore money, that you are spending. Not mine. Good luck.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
Re^3: 2d animation
by salva (Monsignor) on Aug 16, 2011 at 08:02 UTC
    There is a FFmpeg module on CPAN that wraps the C libraries. Have you investigated it?
      There is a FFmpeg module on CPAN that wraps the C libraries. Have you investigated it?

      Thanks! It looks like it might actually offer some efficiency and simplicity benefits (depending on the underlying implementation, which I haven't looked into). I'm planning on benchmarking and comparing the output of both. (I.e., FFmpeg module and CLI, and probably Mencoder as well.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://920363]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-09-22 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (205 votes), past polls