Friday, 17 July 2015

Lossless rotation of MJPEG video

Write out the JPEG frames:

avconv -i WHOOPS.AVI -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg


Rotate them losslessly:

exiftran -i -2 frame*.jpg


Reassemble the frames and grab the audio from the original file to create a new complete file:

avconv -framerate 29.97 -i frame_%d.jpg -i WHOOPS.AVI -codec copy /
   -map 0:v -map 1:a ROTATED.AVI

 

Update: When this was originally written, Ubuntu was using the avconf fork of ffmpeg. These days, try replacing `avconv` in the commands above with `ffmpeg`.

No DHCP IP on eth0 with Ubuntu Server 26.04 (64-bit) on Raspberry Pi 4b

This week I was attempting to get up and running with Ubuntu Server 26.04 (64-bit) on a Pi 4b using Raspberry Pi Imager 1.8.5. I noticed t...