# Dynamic video processing



### Choice of video codecs for audiovisual art and media art



TL;DR: Use MPEG2 instead of MP4(H.264) for your projects.

Video codecs use two main approaches to compression: intra-frame and inter-frame techniques. Intra-frame compression treats each frame as an independent image, similar to how JPEG compression works. Common examples of intra-frame codecs include Motion JPEG (MJPEG) and ProRes. These codecs excel at frame-accurate editing since each frame stands alone without dependencies. They also offer better resilience to errors or corruption, since problems in one frame won't affect others. Additionally, they have lower encoding latency since they don't need to analyze multiple frames. However, this independence comes at the cost of larger file sizes. Due to these characteristics, intra-frame codecs are frequently used in professional video editing, security cameras, and medical imaging applications.

In contrast, inter-frame codecs employ temporal compression by encoding the differences between frames rather than storing each frame completely. Popular inter-frame codecs include H.264/AVC, H.265/HEVC, VP9, and AV1. These codecs typically use three types of frames: I-frames (keyframes) which are complete frames similar to intra-frame coding, P-frames which store differences from previous frames, and B-frames which can reference both past and future frames. This approach achieves much better compression ratios and requires lower bandwidth for streaming, making it ideal for online video delivery. However, inter-frame compression is more computationally intensive to encode and decode, less suitable for editing, and can suffer from error propagation where problems in one frame affect subsequent frames that reference it.



{% hint style="info" %}
Video and image files to download:

[https://we.tl/t-VG9yAtbuEA](https://we.tl/t-VG9yAtbuEA)
{% endhint %}

{% embed url="https://www.youtube.com/watch?v=_mR3EcpHHHM" %}
'choreograph1 - water' ,Hiroaki Umeda
{% endembed %}



### Jumping time + Dilation and compression of video time

<figure><img src="https://510937649-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjQUmn9q3i7gpMtKYvCss%2Fuploads%2FaJYbOebnfF6i1RgR1RrP%2FvideoJumpingTime-2.png?alt=media&#x26;token=7a03c4e9-9162-434c-a68f-dbaf9e98d3f6" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Assigment

Write a SynthDef in SuperCollider (maybe a drone?) that changes randomly in time and "pushes" the video when changes occur.&#x20;
{% endhint %}



```
// Write the code for SC!
```



###



