mercredi 13 avril 2016

Background Recompression

1. Digital TV in the US, broadcast or cable, SD or HD, is transmitted as (possibly encrypted) MPEG2 transport streams.

2. TiVo boxes essentially just decode these streams using a CableCard and dump them onto their hard drive.

3. MPEG2 is very old and inefficient compared to modern codecs, but we are stuck with it for compatibility reasons.

4. The current de-facto standard for video on the net is AVC. It is *much* more efficient and, when run carefully, can often compress video at a fifth the size of MPEG2 at the same quality. Even using dumb or very conservative parameters, a factor of three ought to be achievable for most material.

5. Modern TiVos already have the hardware to transcode MPEG2 to AVC, either using a TiVo Stream box or the built-in equivalent of the Roamio Pro & Plus and Bolt boxes.

6. It probably would be a bad idea to convert the incoming MPEG2 video to AVCas it is recorded. Transcoding at this stage would add latency and introduce the possibility of all sorts of malfunction in a real-time loop.

7. However, idle TiVo boxes with transcoding capability could easily pick already-recorded shows and transcode them slowly and carefully to AVC in the background. Only once the entire show has been transcoded would the original MPEG2 recording be replaced. That way, there is no risk of loss if the process is interrupted (e.g., by a power outage or the transcoding hardware being suddenly required for an interactive task).

8. Big Win: Every TiVo box with transcoding capability would see its effective storage capacity grow by a factor of three or more for free! (Additional win: syncing already transcoded shows to mobile devices would be much faster.)

9. Extra Credit: If the hardware can handle it, one could transcode not to AVC, but the new HEVC standard. That would yield another 30% to 50% extra compression.

10. Extra Credit: During the transcode process, a number of other optimizations could be performed on the stream which would be impractical in real-time. These include: removal of MPEG2 artifacts, optional degraining (which further improves compression and, for many, visual quality), and automatic, heuristic detection of commercial breaks (enabling commercial skip on shows which are not already coded by TiVo).

11. Extra Credit: There are also better audio codecs. Transcoding to one of these may yield additional storage reduction (though less so, as the advancements have been smaller and audio streams tend to be small compared to video streams anyway).

Good idea?


Aucun commentaire:

Enregistrer un commentaire