codeblog code is freedom — patching my itch

April 28, 2005

video editing with gopchop

Filed under: Multimedia — kees @ 10:16 am

Well, in the last few weeks, after finally getting MPEG2-PS streams out of my series 2 TiVo, I’ve been actively using gopchop again. It had stagnated, but it seems that people with hardware MPEG2 encoders continue to use it. I should have realized sooner that they are gopchop’s audience. It’s traditionally been a rather fragile bit of code for software-generated MPEG2-PS streams, but pretty stable for the more regular hardware-encoder streams. Between my recent increase in its use, and two large patch bundles I was sent, I’m trying to pick up development again.

One thing that has been particularly frustrating when dealing with MPEG2 video has been dealing with the rendering of the pictures. MPEG2 stores its pictures “out of order”. And by “order” I mean display order. They’re in order for decoding, but not for display. libmpeg2 handles all this for me, except for the part where I need to stop on a specific picture. For an accurate GOP splitting UI, I need to display the last picture of a GOP. Depending on the stream, libmpeg2 may not have rendered the last picture, since it’s waiting for more B or P frames before it knows the decoding is done. (For example, B frames depend on frames in the future, so you can’t render them until you see further down the stream, etc.)

My plan to deal with this is to force-feed libmpeg2 with End-Of-Stream packets, and not render stuff until I’m on the picture I want. For example, to display the initial B or P frames from a GOP, I may need to process the entire prior GOP first. For some types of streams, this may end up being very CPU expensive, since they may have hundreds of pictures in each GOP. But, this is why MPEG2 editing is hard. :)

© 2005, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.
CC BY-SA 4.0

April 21, 2005

officially an RSS junkie

Filed under: Blogging — kees @ 6:23 am

Well, I think I’m officially an RSS junkie. I had ignored RSS for so long, I nearly forgot about it, but when I was shown planet.openclipart.org, I was reminded how powerful RSS is. Figured it was once again time to look around for an aggregator I could use. (Although I still think polling is a bad design for event management.)

Most of the reason I had ignored RSS was because every aggregator I had tried was buggy or had a frustrating interface. I guess enough time has passed, and when I tried straw a few days ago, it worked perfectly well. So, I started collecting all the RSS feeds from all the websites I’d been collecting on my firefox tab bar. It was getting pretty big, and I hated having to reload every tab each morning.

I realize I’m way late to the party on this, but I still think it’s great fun. I even hunted down a little RSS writer for my Photo Blog and got it built in so I could aggregate it too. :) (And it’s really cool to add Creative Commons tags to each and every thing in the RSS feed.)

© 2005, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.
CC BY-SA 4.0

April 19, 2005

they be spinnin’

Filed under: Health — kees @ 8:52 pm

In an effort to use my addictive personality against my lazy personality, I’ve started watching half an episode of Buffy The Vampire Slayer every morning while riding my bike on a stationary trainer. I can’t thank Doug Mandell enough for letting me borrow his trainer while I was trying to figure out if this scheme would actually work for me.

© 2005, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.
CC BY-SA 4.0

April 16, 2005

referer headers

Filed under: Multimedia,Security — kees @ 2:33 pm

I’m surprised that anyone still uses referer headers as a “security” measure. I’ve come across this several times recently. I’ll select a URL out of firefox, and paste it onto a curl -O command line, only to end up with a 0-sized file. And usually if I just add -e [site URL] to the command line, poof there’s my file. Most recently, I found this when trying to download the freely available Nine Inch Nails samples.

Seriously, what’s the point of doing this test? I don’t understand at all. If you want people to download a file in their web browser, do you think they can’t figure this out?

© 2005, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.
CC BY-SA 4.0

Powered by WordPress