Hacker News new | ask | show | jobs
by londons_explore 968 days ago
> even mp4 -> mp2 transmuxing was considered too resource intensive.

Really? Muxing generally doesn't require one to decode the actual data - merely shuffle around blocks of data with memcpy() so should be really cheap.

1 comments

memcpy is ±99%. The 1% involves bit shifting (nal unit reshuffling, avc3/avc1 fixups).

So indeed, repackaging mp4 <-> mp2 containers is pretty trivial. Nevertheless, Apple initially choose mpeg2TS because it conveniently allowed them to shove the reassembled media segments straight into the dedicated AV chip.