mencoder settings for PowerPoint - unix

I have a series of jpg files that I would like to encode into video with mencoder. Currently I'm using the mpeg codec like so:
mencoder mf://*.jpg -mf fps=30:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=8000 -o video.mp4
...but I've been having some problems with mp4 and PowerPoint. Can someone offer a recommendation for an encoding format that plays nicely with PowerPoint and provide an example? asf maybe? I am a newbie when it comes to video encoding.
i'm using mencoder version 4.4.6

Related

Copy all EXIF information from one jpg to another jpg in R

I read a jpg image into R as well as all of its EXIF metadata.
Then I do some manipulation to the image and write the output as jpg.
How could I copy all EXIF information to the new jpg file?
(I understand I will need to modify only few tags).
I find very useful information on how to read the EXIF metadata in R
(eg, packages Thermimage or exiftoolr), but not on writing them.
The exiftoolr package allows you to call exif_call() to run any command that the underlying exiftool can do. Examples are included here: https://exiftool.org/examples.html. So if you wanted to run the following command in R you would translate
exiftool -artist="Phil Harvey" -copyright="2011 Phil Harvey" a.jpg
into
exiftoolr::exif_call(args=c(
'-artist="Phil Harvey"',
'-copyright="2011 Phil Harvey"'
),
path="a.jpg")

Improve zbarimg qrcode recognition

I had a working system of scanning sheets of paper and then letting zbarimg recognize qrcodes on these sheets (while I don't know in which area the qrcode appears). Suddenly qrcode recognition got much worse and eventually stopped working at all.
The physical scanner generates PDFs from the scanned sheets of paper. I use ghostscript to convert it to a picture:
gs -sDEVICE=png16m -sCompression=lzw -r600x600 -dNOPAUSE -sOutputFile='scantest.png' scantest.pdf
This is the result:
When you try to read the qrcode with your smartphone, it will be recognized immediately. But when I run zbarimg:
zbarimg scantest.png
Zbarimg doesn't recognize anything:
scanned 0 barcode symbols from 1 images in 6,6 seconds
I tried to apply this solution:
https://stackoverflow.com/a/40609947/4654597
But without any luck, actually it destroyed the qrcode totally:
I also tried to apply a light blur filter like suggested in this post:
Decode QR-Code in scanned PDF
I used ImageMagick for this task:
convert scantest.png -blur 1x1 scantest_after_blur.png
I also tried 1x2, 1x3, 1x4, 1x6, 1x8 but nothing helped.
How could I get zbarimg to work again?
Here is what finally worked:
convert input.png +repage -threshold 50% -morphology open square:1 output.png
zbarimg output.png
Most important is probably applying morphology. I got the whole ImageMagick command from this post: QR code detection with ZBar from console fails for valid QR codes (ZBarCam from camera detects them fine)

Convert jpg images to webp

I'm trying to convert .jpg images to webp format.
I have site in WordPress, and I need to add webp to my images. I read https://developers.google.com/speed/webp/ but it does not work for me.
And I tried using https://wordpress.org/plugins/wp-webp/ but that also does not work.
And I tried this article, also doesn't work http://www.wpexplorer.com/webp-files-wordpress/
Can anyone help me?
apt get install moreutils
apt get install parallels
parallel -eta cwebp {} -o {.}.webp ::: *.jpg
works with *.png too 100000 images at the time if you want
One image at the time can be done with cwebp -q 100 image1.jpg -o image1.webp
Sorry got this from another thread but he missed a dot before webp
To convert images from WebP format into JPG and PNG format you can use WebPconv 6.0 (Windows only).
It's a free app and you can find it here.

unable to perform OCR on tiff and jpeg files

I am referring to " https://github.com/keensoft/alfresco-simple-ocr" to perform OCR on tiff and jpeg files but is saying "Couldn't find trailer dictionary","Couldn't read xref table"," exception Failure("Error: pdfinfo could not determine number of pages. Check the pdf input file.\n")" although the transformation from jpeg or tiff files to PDF files is working properly and the PDF file is visible on the alfresco share page" but no OCR is working on those tiff and jpeg files
Basically there are many tools which are used for performing the OCR on pdf files.It depends on the tool as well.There is one bug in alfresco.It is an library issue.Below are details of that.
Create file called transformation.sh and before adding your command in it you have to add below line in it.If you are using windows you need to create batch file accordingly.
unset LD_LIBRARY_PATH
If you are not setting above in the script file you will face an error while conversation.You can find that bug details on below link of alfresco.Its registered issue in alfresco.
https://issues.alfresco.com/jira/browse/ALF-19946
PDF to PDF conversation are very well explained in below link.
http://www.krutikjayswal.com/2016/07/ocr-on-pdf-file-in-alfresco.html
You might need to change the source code for tiff conversation.

Converting PSD file to JPG using graphic magick

I 'm trying to convert psd file to jpg format file by using following commands:
gm -convert [input file name].psd -colorspace rgb -resize 150x150 -strip -quality 92 - sharpen 2 [output file name].jpg
gm -convert -clip -negate [input file name].psd -thumbnail 150x150 [output file name].jpg
Both the commands are working fine.But for some psd file having rgb colorspace it does not generate correct rendition.
Any suggestions??
Have you tried ImageMagick? ImageMagick has the same command-line, but also have a thumbnail of PSD, get by this:
convert a.psd[0] b.jpg
The PSD reader in GraphicsMagick is not very robust and PSD is very complex and poorly documented. The best free implementation I have seen is in The GIMP.
I have just created a Node module that deals with PSD files from the CLI.
For all non-Windows users out there that don't want to crack Photoshop just to see a proper rendered file (Gimp is not really a solution and has a poor understanding of modern PSD files).
Instructions from the Github repo :
Install it :
npm install -g psd-cli
Convert myfile.psd to a new myfile.png :
psd myfile.psd
Hope you find this useful ! Any feature requests is most enjoyed, I have a ton in mind and help with improving the code is appreciated :)

Resources