Automatically convert videos in Powerpoint file (pptx) to a different format
I have been trying to convert a lot of embedded videos in pptx files to a different format lately due to compatibility issues on some systems, but have not found an easy and fast way – so I wrote this bash script.
The goal was to have a pptx with videos that can be played using Powerpoint 2010 or later on Windows as well as OS X without plugins. That seems to only be the case for MPG videos (mpeg1video codec).
To convert videos in a presentation
- make sure that ffmpeg and a zip/unzip application is installed (ffmpeg can easily be replaced by avconv, but avconv somehow could not convert some files that were no problem for ffmpeg during my tests)
- download the bash file and make it executable
- edit the options at the beginning of the file, if you want to (mainly video output format and bitrate)
- Change to the directory with the pptx file(s) and start the conversion with /path/to/pptx_video_convert.sh myPresentation.pptx
- Check if everything worked by looking at myPresentation_converted.pptx or the logs
Automatically reboot TP-Link router WDR4300 / N750 with bash script
I wanted to reboot some TP-Link WDR4300 routers automatically, because the TP-Link firmware is rather buggy and often causes WLAN problems after a few days of use.
Sadly, rebooting those routers with current firmwares is not quite as easy as it used to be (simple and short one-line curl call). You first have to generate a cookie with the name ‘Authorization’ and value
urlencode(Basic base64($admin:md5($password)))
(pseudocode). And then you have to extract some kind of one-time key from the post-login page to get the actual HTTP address of the reboot page (http://$IP/$KEY/userRpm/SysRebootRpm.htm?Reboot=Reboot ). Did I mention you also have to set your HTTP referer to the reboot page?