My favourite eclipse settings

Preferences>PyDev>Editor>Code Style>Code Formatter – Tick “Right trim lines?”

Preferences>PyDev>Editor>Typing – untick After ‘(‘ indent to its level (indents by
tabs if unchecked)

Number of indentation levels to add: 1

Switch pylint off so pydev code analysis can do its job:

Preferences>PyDev>Editor>PyLint Untick “Use pylint?”.

Preferences>General>Editors>Text Editors>Annotations>Occurences (PyDev) set to #6BF459 so bright enough to see when very small but can read text on top.

Preferences>General>Editors>Text Editors>

Displayed tab width: 4

Tick “Insert spaces for tabs”
Tick “Show print margin” and set to 80.

Tick “Show line numbers”.

Rotate video (and cope with frame rate problem)

The problem – I had taken a video on a smart phone upside down and needed to rotate it (Note – rotating is not the same as flipping). Here is the successful command I used on Ubuntu:

avconv -i "my_input_video.mp4" -r 25 -vf transpose=1,transpose=1 my_output_video.mp4

Note – I needed to rotate it so chaining two 90 degree transpose commands (transpose=1 is a single 90 degree transposition) worked (see How can I rotate video by 180 degrees with avconv).

Note the -r 25. I don’t pretend to understand all the options of ffmpeg/avconv but the -r 25 forced the conversion to use a manageable number of frames. Without it, converting one particular video was failing, thrashing the CPU, and taking forever. There was a message in the ffmpeg/avconv output about MB rate > level limit. Another video worked fine without -r 25 but if you have the same problem with MB rate give -r 25 a try. Or better yet, learn more about what you’re doing ;-). I didn’t have the time or inclination so tried to do the least I could to get a good result.

Update – needed to alter aspect ratio as per:

avconv -i "my_image.MOD" -aspect 0.487 -r 25 -vf transpose=1,transpose=1,transpose=1 -strict -2 "my_image.mp4"