An experiment with cat, Squeak and mpeg files

John Hinsley jhinsley at telinco.co.uk
Fri Dec 21 00:03:08 UTC 2001


John.Maloney at disney.com wrote:
> 
> John,
> 
> I'm surprised mtvp plays the result of concatenating two MPEG files,
> but I don't really know much about the MPEG file format.

Me neither!

> Perhaps
> mtvp was extended to read concatenating MPEG files since it's so
> much in the Unix style to do that. It would be interesting to see if
> the resulting file would play under, say, the Windows Media Player
> or Quicktime.

I tried it the other night and Windows Media Player does manage the
cated together ones! (I was surprised!) -- If anyone else is reading
this, I should point out that, for sure, using *nix cat to edit  mpeg
files is *not* recommended practice (!) but, that mtvp and Windows Media
Player play the results perfectly well: if you choose the files you cat
together carefully, you "really" can't see the join! (But if you want
files you can later run in Squeak, copy them before you cat!)
  
> 
> If this is a bug in the Squeak MPEG primitives, it's really an issue
> with the library itself, which is written in C and simply glued in
> by John McIntosh. I think it's unlikely that anyone on the Squeak
> list will want to dive into this library to fix it. (Although if anyone
> does, there are some other MPEG library bugs I'd love to see fixed!)

I'm unsure whether this is at a primitive level or not: I was pretty
much guessing that somewhere Squeak was picking up more than one header
(using cat must, I think, result in having superfluous headers). -- Next
experiment: see if I can edit out the extra headers! 

But I'll try and take a look at mtvp (the advantages are that it doesn't
use a widget set, and, at least, we have the code) and see if any kind
of trickery is going on.
 
> 
> A different approach to manipulating movies would be to convert
> both movies to Squeak JPEG movies, then write a concatention program
> in Squeak to paste them together. If you've got a utility that can convert
> a directory full of frames into an MPEG movie, you could even write
> some Squeak code to dump out the frames of the JPEG movie and
> get an MPEG movie back. The long way around, perhaps, but you
> can write it all in Squeak.

That would certainly be the best bet, especially if a UI could be put
together for it (I'm thinking here of kids using it).

There are lots of (non-Squeak) utilities to do stuff like this: problem
is, most of them then need a scripting layer to re-write the frames into
a format that's Squeak friendly. -- although aKtion will output .xpm
which Squeak can do nice things with. I think there are utilities in the
Mpeg3tools which will enable the sound to be extracted too!

Cheers

John

-- 
Reputed to be the reason Windows 2000 was nearly a year late, (paid in
shares M$Ds needed the cash and kudos) Netproject's Eddie Bleasdale has
renewed his challenge to virus writers. The first person to infect his
Linux box wins 10,000 pounds.

http://www.silicon.com/bin/bladerunner?30REQEVENT=&REQAUTH=21046&14001REQSUB=REQINT1=48211




More information about the Squeak-dev mailing list