Which linux file system is more suitable to serve for video file streaming? - ext4

Currently I'm choosing among XFS, ReiserFS and ext4, not sure which one will be better.
My application is a video on demand service, with thousands of video files.
Any suggestions?

Related

make it impossible to download the audio files

So guys, how do I prevent users from downloading audio files on my web app (running springboot in backend) by accessing the s3 url !
I want to make it impossible to download the audio files in my website ! Any suggestions pls ?
I assume you mean that you want to make it impossible to download the audio files, but still allow streaming them for playback.
You can't.
If it can be played, it can be downloaded. Simple as that.
At best, you can sign your S3 URLs so that they expire after a short period of time. This gives you control over who accesses your audio files, and prevents them from showing up in searches, or linked to from other sites. You can also look into Encrypted Media Extensions, but it's not all that useful for audio since audio is trivially digitally captured on the output.

How to get Apache to cache video files in memory?

I'm hosting an HLS stream with XAMPP / Apache, which basically means I have a folder in my document root that contains a couple of incrementally numbered 10-second video files.
Every 10 seconds, a new video file is saved into the folder and the oldest video file in the folder is deleted.
Apart from these video files, the document root also contains some other files, such as PHP scripts and playlist files.
My server has plenty of RAM and a pretty fast CPU, but is using a comparatively slow hard disk.
Given the fact that the constant downloading of these video files is likely what's going to make or break the server performance, it seems like a good idea to cache these files in memory.
If Apache were to keep all video files (with a .ts extension) that're downloaded by a user's video player, in it's memory for about 60 seconds, the next user would then be able to download the file much faster. Apache could rely on the files not changing after the first open and on the fact that the files won't be requested anymore after those 60 seconds.
All other files do not (necessarily) have to be cached, since they're rather small and are regularly modified.
Is anyone able to give me directions on how to get started?
Modern operating systems already cache accessed files in memory. The whole process is managed by the kernel automatically.
Apache in-memory caching won't help you since it needs all the files at start-up.
If you want some level of control over the caching you could use vmtouch. Check the manual.

how to upload .flv to remote red5 server LIVE in real time?

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.

Suppose a server is hosting a video file. Why is it that sometimes, it requires a full download before playing. Sometimes, I can stream it?

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.

Newbie question on Flash video players, products/SDKs, and API

I'm a C programmer and a total newbie to Flash/video/web world. Don't know where/how to start, and so would greatly appreciate your initial help.
Question
If I need to host flash videos off of my website (instead of embedding YouTube links on my webpages),
AND
If I need to provide player API like YouTube's that can be used, say, for supporting chromeless player versions customizable via this custom API of mine...
THEN
What do I need to do essentially...?
Write a custom Flash video player?
If yes, how? I mean, using which Adobe products / tools / SDKs / language(s)?
Is there anything free/opensource available for doing this? Especially, for Linux platform?
Write a new browser (firefox) plugin for users visiting my site?
Not sure how my custom Flash video player will get to the user visiting my site for the first time?
Any books, resources that cover this problem well?
Does the Flash content need to hosted off of a Windows server only?
Currently lost. Thanks in advance,
/SD
Flash has video playback support built-in, so all you need to do is use the Flash authoring environment or Flex to compile a .SWF file that uses the video API, with some buttons to stop and start the stream, volume, seeking, anything else you want your player to do.
Many people have already done this for you, in a way you can easily use from simple HTML. See eg. OSFLV, Flowplayer, JW...
Write a new browser (firefox) plugin for users visiting my site? Does the Flash content need to hosted off of a Windows server only?
Lord no! Flash video would never have taken off if it was just another custom-server+custom-plugin piece of unpleasantness. Though special streaming servers are possible, for the most part it's just an FLV file sitting on a web server.
(FLV is the video format supported by the Flash video playing functions. There are many, many tools you can use to convert other formats to it; I use Avidemux.)
If you are planning to use a "Progressive Download" approach, then your FLV files can be hosted on a Windows or a Linux box. Be aware that:
it is no as efficient as true
streaming.
you may not use it for live events
nor only for stored video files.
it cannot automatically detect the
end user's connection speed.
it is not possible to jump ahead to
another part while it's downloaded.
the video file will be saved on the
end user's computer.
If you are planning to use a "Streaming" approach then you can either buy and use Adobe's solution (Flash Media Server, available on both Windows and Linux box) or sign up for a hosted solution. On this page you will find recommended providers by Adobe. I personally have been using Influxis's hosting with success for a couple of years already.
You can also write your own streaming server but that would be a lot of hard work. If you are interested in that, I would recommend you have a look a Red5 which is an open source Flash Server written in Java.