Cutting a video without reencoding

ffmpeg -ss [start] -i in.mp4 --to [end] -c copy out.mp4
  • -ss specifies the start time, e. g. 00:01:10.000 or 70 (in seconds)
  • -to specifies the end time, e. g. 00:02:10.000 or 130 (in seconds)

Dealing with PST under linux

I prefer dealing with outlook archives (pst-files) by extracting the messages to a folder structure, saving each message as eml-file (Thunderbird mail-format). This can be achieved as follows:

readpst -o 'Archived Messages' -D -j 4 -r -tea -u -w -m ./some.pst

If the command cannot be found, you might need to install the package libpst first. The command creates msg and eml files with a increasing number as the filename.

Lossless optimization of JPEGs

Many digital cameras don't do a lot of processing when saving pictures. The jpegoptim command is able to save some space just by optimizing the Huffman tables. This doesn't have any impact on the quality and can save up to 40 percent of diskspace.

find -type f -name "*.jpg" -exec jpegoptim -p -P {} \;

Compare two excel files

There is a hidden tool if you are running a Professional Version of office. You find it here:

C:\Program Files (x86)\Microsoft Office\Office15\DCF\SPREADSHEETCOMPARE.EXE

Depending on the version of office that you are running the folder "Office15" can have another number. It allows you to select to files and visualize them side-by-side with a nice graphical overview of the differences

PDF OCR with Fedora 24 and Tesseract

Run the following commands:

sudo dnf install python3-pip python3-devel libffi-devel qpdf tesseract tesseract-langpack-deu tesseract-osd
sudo python3 -m pip install ocrmypdf 

Now you can convert a file like this:

ocrmypdf -l deu input.pdf output.pdf

If you don't install the tesseract-osd package, it will work but the following error message appears:

Mount Amazon S3 on Fedora 24

There is no package that is ready to be installed. You need to download and compile the code yourself. First you need to install some development libraries. Execute the following commands:

sudo dnf install fuse-devel libcurl-devel libxml2-devel
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
./autogen.sh
./configure
make
sudo make install

Then you need to create the directory where you want to mount your bucket:

Tags:

Paperless Office with Djvu

Scanning

In order to scan everything that comes in you usually need to have two scanners: a flatbed one and an AMF scanner. I use ... which is my printer at the same time and ... which is only a scanner. Most of the documents I can scan with ... which is quite fast as I can put multiple pages (maybe 10) at the same time. The flatbed scanner is used for documents which are either to thick (books) or to large (posters) for the other scanner.

Installing qtodotxt on Fedora 24

You need to run:

sudo pip3 install qtodotxt

The first time you start it, the following message will appear:

ImportError: No module named 'PyQt5'

It means that the python3-qt5 library is missing. You can download it from the link and install it by executing it.

Tags:

Migrating from Owncloud to Nextcloud on Fedora 24

Installing nextcloud on fedora is not trivial as you first need to download the code, install some dependencies and compile it.

git clone https://github.com/nextcloud/client_theming.git
git submodule update --init --recursive
sudo dnf install cmake gcc-c++ openssl-devel sqlite-devel qt5-qtwebkit-devel libqt5keychain-devel
mkdir build-linux
cd build-linux
cmake -D OEM_THEME_DIR=`pwd`/../nextcloudtheme ../client
make
sudo make install

Without installing the dependencies you would get the following error messages:

Tags:

Using a .NET FileWatcher with a dfs properly

There is not a lot of information with practical experience about the Microsoft .NET File Watcher Technology available in the internet. So here some advices.

How it works

It is basically a wrapper around the windows api function ReadDirectoryChangesW.

Possible restrictions with remote locations

There might be several limitations in place that you usually cannot see:

Tags:

Pages

Subscribe to uhlme.ch RSS