in reply to Turn network video stream into playable .avi file?

Just off the cuff here, if you can create an avi template, (i.e. the basic headers/footers) you should be able to paste,(ie. write in binmode), the packet data("actual data", not including the headers (if applicable)) in the appropriate section of that .avi template

That would be my approach. Also, I notice you're using UDP. I don't know if that's the standard protocol for streaming or not, but it would seem to me that TCP would be a lot more reliable. IE. if you're listening on a UDP port, you don't always know where the traffic comes from (to the best of my memory).


Grygonos
  • Comment on Re: Turn network video stream into playable .avi file?

Replies are listed 'Best First'.
Re^2: Turn network video stream into playable .avi file?
by jfroebe (Parson) on Aug 26, 2004 at 20:12 UTC

    hi

    UDP is preferred over TCP for multimedia because of throughput and because if a packet or two is lost, we don't want to be waiting for a retransmission of the packets... which may cause 'jittery' video/sound. If there is a bit of garbage in the video file, most of the 'modern' video players will attempt to jump past the garbage.. No guarantees though.

    For the avi header... it will have to be generated. GFF Format Summary: Microsoft RIFF contains the AVI header info

    jason

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

      For the avi header... it will have to be generated.

      I just wondered if anyone had scratched this particular itch before. Apparently not?

        I'm fairly certain I've seen programs that do this before, though perhaps not in Perl. Look around http://www.freshmeat.net.

        "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

        If anyone did, then they didn't release it to cpan or the myriad of web sites.

        jason

        No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1