I have a server from where a single consumer me download MP4 files. I would like to add the username to the meta-data of the file at the time the user clicks "download". Amazon does something like this for the MP3 files.
Now, a slight variation to this is how would I do the same thing if the files are on Amazon Cloudfront.
Thanks!
You would have to route your request through your web server.
Logged-in user clicks
Web server downloads the MP4 file from S3 to its file system.
Web server uses an MP4 editor to add the correct MP4 metadata to the file.
Web server serves the MP4 file back to the customer as a download.
S3 is dumb file storage, so you can't do any on-the-fly editing or processing. Any such work must occur on a machine with a CPU.
As such, the question you posed could not be accomplished in any meaningful way using CloudFront, since the traffic needs to route back through your server for post-processing anyway.
Related
When I click the mp3 file's AWS S3 path, it plays in my browser, see screenshot below:
Is the mp3 downloaded/cached to my local machine? If so where is it? I tried to search for it in Chrome cache folder but did not find anything. Very curious how this works exactly.
No, S3 doesn't cache any files locally. If a file were cached it's determined by your browser, who makes the decision based on a number of factors (such as HTTP headers, see [1]).
The reason the MP3 file plays in your browser is because your browser knows it can play the MP3 file and not just download it.
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
I know this question has been asked a lot of times already but unfortunately none of the answers have helped me. I want to upload an image file to my remote Web server (Apache). In my Excel cell, I have the file path of an image and want to use VBA to upload that file to a remote server.
I can't use any 3rd party tool in conjunction (like WinSCP), because that will make my product not very "portable-friendly". I was fine with Windows FTP, but it doesn't seems to be supporting passive mode and hence I also can't use that.
There are some threads which used IE to upload the file, and some which I believe are uploading via POST request by reading file in binary mode.
I want to replicate something similar to uploading files via HTTP POST on a website.
I have a log server, where users upload archives and view their content online when needed. Currently the server unzips files, right after receiving them. Unfortunately, my peers consumed all the drive space I had. I can free up a lot of space, if there's a way of storing ZIP archives, but feeding them to users as HTML page (same as default Apache's file browser).
I know there are solutions relying on JS, like:
http://gildas-lormeau.github.io/zip.js/demos/demo2.html
https://stuk.github.io/jszip/
or I can unzip them on demand at server side and provide link to a temporary folder. However, some time ago I've heard a browser can view an archive content if proper headers are sent from Apache/nginx. Apache's mod-deflate doesn't help much here and I can't find other docs - perhaps it's not possible after all?
Cheers.
I want to do live webcast of some ceremonies. I can record .flv files using my webcam and ffmpeg software. Now, if I hire a red5 media server from some hosting company so that visitors can download from that website. Now my problem is how can I upload .flv files LIVE ( when video shooting is still in progress )
Please help how to achieve this
I assume by recording them you mean you are saving them to disk and are not streaming the video? If this is the case you simply need to use an upload form or have ftp / scp access to the hosted server. Pick one of the apps installed and place your flv files in the applications "streams" directory. Once the files are in-place you'll need a way to play them back, which will require a player (plenty of free ones out there like jwplayer). Hopefully this is what you were looking for.
Someone told me that some servers configure it that allow streaming of a file.
OR
Is it a file-encoding problem, not a server configuration problem?
Given a link of the video file, how do I check if that person allows streaming (or play only once downloaded) ? Headers?
In order for a file to be streamable, all of the information necessary to initialize the decode and playback engines must be at the beginning of the file. Not all file formats are designed in that way. (for instance, with AVI files usually the index is at the end).
But the server must also be configured to stream. Transferring a file over HTTP or FTP is a different protocol than streaming the file.
So it's both, for streaming to work everything has to be setup correctly, the server and the file must support it. If either one is not set up correctly, then transferring the file usually works. Transferring the file is the conservative or fallback solution.
As long as the encoding format is such that the information in the file is chronological with respect to the video frames, there is no theoretical possible way for a server to allow downloading but not playing. Think about it. If you have the data, and it's playable after downloading, that portion is playable before downloading is complete.