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

No comments:

Post a Comment

Modern Ubuntu web kiosk using chromium as the browser engine

 I have been working to prepare a digital atlas exhibit for the Natillik Heritage Centre in Gjoa Haven, Nunavut, Canada. Working with Indig...