Output Thumbs interval in % ElasticTranscoder - amazon-web-services

I'm using the ElasticTranscoder from Amazon and my app it's almost finished now.
The problem I have is as follow:
Users can upload some video's and I want from every video 5 thumbnails.
Now i want the preset interval in procents, so i have 5 different thumbnails between the whole video.
Does someone here know, if its possible?

I have a lame solution, it works but maybe there are resolutions thats better then myn.
Now i list all objects in a bucket/ folder, takes 5 files, removes the others and rename's te files that's remain.

Related

Integrating an image into my executable file

I have an application that relies on many images. I have no problem loading the images on to the window. I would like to make my application have the images integrated into it where there are no actual image files in the folder. Also, I would like to know how to do this, because if I sell the application I don't want the user to be able to go to the directory my .exe is located in an get the image file (I am aware that they can print screen it). So, how can I integrate the image into my application. I am using the WinAPI with C++.
I have searched this multiple times and have not found anything on this. I have found one question on another forum, but it was asked a long time ago and was not answered. I did find one other place that had this, but It did not specifically work with my question.
You can bind images (as well as pretty much any pieces of data) as resources to your binary.

How to batch download large number of high resolution satellite images from Google Map directly?

I'm helping a professor working on a satellite image analysis project, we need 800 images stitching together for a square area at 8000x8000 resolution each image from Google Map, it is possible to download them one by one, however I believe there must be a way to write a script for batch processing.
Here I would like to ask how can I implement this using shell or python script, and how could I download images by google maps url ?
Here is an example of the url:
https://maps.google.com.au/maps/myplaces?ll=-33.071009,149.554911&spn=0.027691,0.066047&ctz=-660&t=k&z=15
However I'm not able to analyse the image direct download link from this.
Update:
Actually, I solved this problem, however due to Google's intention, I would not post the way for doing this.
Have you tried the Google static maps API?
You get 25 000 free requests, but you're limited to 640x640, so you'll need to do ~160 requests at a higher zoom level.
I suggest downloading the images as so: Downloading a picture via urllib and python
URL to start with: http://maps.googleapis.com/maps/api/staticmap?center=-33.071009,149.554911&zoom=15&size=640x640&sensor=false&maptype=satellite
It's been long time since I solved the problem, sorry for the delay.
I posted my code to github here, plz star or fork as you like :)
The idea is to use a virtual web browser at a very high resolution to load the google map page, then do the page capture. The defect is there will be google symbol all around on each image, the solution is to apply over sampling on the resolution on each of the image, then use the stiching technique to stick them all together.

How do I survive from Joomla K2 image handling?

I have started a news website for a specific area of business one year ago. The website lists news and for every post there is a featured image. Unfortunately, there have been posted about 1500 news in a year and the website is taking 1,07Gbytes of space. This seemed totally insane to me as joomla is had been only some Mbytes and there were no big additions from my side (like files or graphics etc.).
I did a HUGE mistake. I trusted the joomlaworks guys and installed K2. The main reason I did this was that the default joomla article manager did not offer to save a featured image for each post. But this was added in the new 3.0 version !
K2 does something extremely foolish. If you save a photo of 2 Mbytes, then it will save the original and 4 additional ones, one for each size (Small, Large, Medium, XL). Insanely, you upload a 2Mb image and it ends occupying 4Mbytes of space !
The hosting provider gives me 2Gbytes of space to store my files. I have started to lose my sleep at night because the space expands day by day and If gone beyond 2Gbytes, I will have to upgrade the hosting plan and I do not have the money to do this.
I believe I have three choices:
Move all items, categories, images from K2 back to Joomla articles that is much faster and then upgrade to version 3.0 which supports featured images. This seems extremely difficult and I do not know If it's possible at all. Even If I move all table rows from K2 to Joomla, I don't feel comfortable with 1500 ones and the images' paths are not saved in the db. Chaos.
Move everything to wordpress. No idea how to do that at all.
Compress the images that are in cache or search for ways to stop K2 doing that.
k2 saves the images in two different folders. One folder holds exclusively the originals, and the other folder holds all the resized versions. Technically you can just delete the folder with the originals because those are not the ones used in the articles or anywhere else on the website. Let's not speak poorly of k2 because they save the originals. I think it's a good feature. I once needed to go into that folder on my host and find a file that was deleted from my computer. Also you could easily in the future use that folder to rebuild all the resized files in case you want to change the sizing in layout.
I would just back up the folder every once in a while and delete the copy on your host. That should save a lot of space. Also you can set an option that the resized files are lowered in quality so they don't take up so much space. There is an option in the back-end. At 70-80% the photo quality is still great.
Why do you think that creating small, medium and big image is extremely bad? Do you actually have preview of the image, where it appears in a smaller size? If so - this is a wise way to do it.
If you really do not use any of smaller images - I would recommend go line by line through K2 plugin (or whatever it is) and find where exactly are the lines with saving these additional images and comment them.
Just another thing. How you ended up with 2 Mb images for a news site. In my opinion this should be really high resolution images, because the normal size is like 300kb.
In the folder www__TemplateName__\media\k2\items you will see two subffolders "cache" and "src" - the later one is for source files. Contents can be safely moved out to a local drive once a month. Yet, I'd say if you end up with 1.5k news, datadase would take lots of space too. And most hosters count database space in too. And you won't be able to do ANYTHING about it - you just can't throw away DB...
Then, most likely you have email server on the same host even though you don't use it (probably). If you have 1.5k news in one year - I can imagine how much spam would end up in your mail folder - that takes space out of your 2 gigs at hoster... Check your mail folder - kill all what you don't need there...
You're saying "I need an answer from a joomla expert here" - Joomla expert won't tell you much - k2 expert is needed. And the answer was given - reduce the quality of image cashed by k2 to 70% - it'll do just great - save lots of space and the quality drop won't be visible - this setting is set once and works for all authors...
In the case with DB, I'd highly recommend to have http://extensions.joomla.org/extensions/access-a-security/site-security/site-protection/14087 installed and then click Clean Temp and Repare Tables - it helps too.
Then, one other thing is to batch resize files in original's folder for k2 - there're tonns of different scripts for that in the pit of internet. Run it there from time to time and crazy big files from your users will shrink unbelievably!
But most of all - in these days, having a host of 2gigs??? That's crazy low. In my case $50 per year give me 6gigs - and that's not the cheapest host here... So... Change your host!

django image management

In my project I'am working with images. I don't know how to organize the management of images.
I need to dynamically upload the pictures and resize them.
First question - what is the best way to dynamically upload images with progress bar and without flash? I found this and this, but I believe there is a better way.
Second question. I have to save one image in different sizes. I won't use these thumbnails on my pages, but another application will. Many clients could upload images at the same time. This means that I can not resize all the images at the same time. How should I organize this process?
Is there are a better ready-to-use solution for image management issue?
django-photologue could be a good starting point for organizing the management of your images.
The PhotoSize model can be used to automatically resize/crop your images, and the GalleryUpload model allows the user to upload an archive of images.
You can also create PhotoSize models with pre_cache = False. This means that your images will dynamically created the first time they are requested.
For your second question you might use a task queue, like django-celery or django-tasks.
For the image crop, try Python Imaging Library (PIL)

Simple audio manipulation library?

I want to make an application that can split an mp3 into pieces. Ex: if I give t a 3 minute song, and want 3 parts, I would expect 3 new mp3s at 1 minute each.
Thanks
I'd try this: http://mp3splt.sourceforge.net/mp3splt_page/about.php
It claims to have a GUI, and command-line interface, and even a library. I'd probably start with the GUI or CLI and see how it goes.
Lame should be able to do any basic encoding and decoding you would need.
http://lame.sourceforge.net/