Recherche avancée

Médias (91)

Autres articles (81)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (6647)

  • Server Move For multimedia.cx

    1er août 2014, par Multimedia Mike — General

    I made a big change to multimedia.cx last week : I moved hosting from a shared web hosting plan that I had been using for 10 years to a dedicated virtual private server (VPS). In short, I now have no one to blame but myself for any server problems I experience from here on out.

    The tipping point occurred a few months ago when my game music search engine kept breaking regardless of what technology I was using. First, I had an admittedly odd C-based CGI solution which broke due to mysterious binary compatibility issues, the sort that are bound to occur when trying to make a Linux binary run on heterogeneous distributions. The second solution was an SQLite-based solution. Like the first solution, this worked great until it didn’t work anymore. Something else mysteriously broke vis-à-vis PHP and SQLite on my server. I started investigating a MySQL-based full text search solution but couldn’t make it work, and decided that I shouldn’t have to either.

    Ironically, just before I finished this entire move operation, I noticed that my SQLite-based FTS solution was working again on the old shared host. I’m not sure when that problem went away. No matter, I had already thrown the switch.

    How Hard Could It Be ?
    We all have thresholds for the type of chores we’re willing to put up with and which we’d rather pay someone else to perform. For the past 10 years, I felt that administering a website’s underlying software is something that I would rather pay someone else to worry about. To be fair, 10 years ago, I don’t think VPSs were a thing, or at least a viable thing in the consumer space, and I wouldn’t have been competent enough to properly administer one. Though I would have been a full-time Linux user for 5 years at that point, I was still the type to build all of my own packages from source (I may have still been running Linux From Scratch 10 years ago) which might not be the most tractable solution for server stability.

    These days, VPSs are a much more affordable option (easily competitive with shared web hosting). I also realized I know exactly how to install and configure all the software that runs the main components of the various multimedia.cx sites, having done it on local setups just to ensure that my automated backups would actually be useful in the event of catastrophe.

    All I needed was the will to do it.

    The Switchover Process
    Here’s the rough plan :

    • Investigate options for both VPS providers and mail hosts– I might be willing to run a web server but NOT a mail server
    • Start plotting several months in advance of my yearly shared hosting renewal date
    • Screw around for several months, playing video games and generally finding reasons to put off the move
    • Panic when realizing there are only a few days left before the yearly renewal comes due

    So that’s the planning phase. BTW, I chose Digital Ocean for VPS and Zoho for email hosting. Here’s the execution phase I did last week :

    • Register with Digital Ocean and set up DNS entries to point to the old shared host for the time being
    • Once the D-O DNS servers respond correctly using a manual ‘dig’ command, use their servers as the authoritative ones for multimedia.cx
    • Create a new Droplet (D-O VPS), install all the right software, move the databases, upload the files ; and exhaustively document each step, gotcha, and pitfall ; treat a VPS as necessarily disposable and have an eye towards iterating the process with a new VPS
    • Use /etc/hosts on a local machine to point DNS to the new server and verify that each site is working correctly
    • After everything looks all right, update the DNS records to point to the new server

    Finally, flip the switch on the MX record by pointing it to the new email provider.

    Improvements and Problems
    Hosting on Digital Ocean is quite amazing so far. Maybe it’s the SSDs. Whatever it is, all the sites are performing far better than on the old shared web host. People who edit the MultimediaWiki report that changes get saved in less than the 10 or so seconds required on the old server.

    Again, all problems are now my problems. A sore spot with the shared web host was general poor performance. The hosting company would sometimes complain that my sites were using too much CPU. I would have loved to try to optimize things. However, the cPanel interface found on many shared hosts don’t give you a great deal of data for debugging performance problems. However, same sites, same software, same load on the VPS is considerably more performant.

    Problem : I’ve already had the MySQL database die due to a spike in usage. I had to manually restart it. I was considering a cron-based solution to check if the server is running and restart it if not. In response to my analysis that my databases are mostly read and not often modified, so db crashes shouldn’t be too disastrous, a friend helpfully reminded me that, “You would not make a good sysadmin with attitudes like ‘an occasional crash is okay’.”

    To this end, I am planning to migrate the database server to a separate VPS. This is a strategy that even Digital Ocean recommends. I’m hoping that the MySQL server isn’t subject to such memory spikes, but I’ll continue to monitor it after I set it up.

    Overall, the server continues to get modest amounts of traffic. I predict it will remain that way unless Dark Shikari resurrects the x264dev blog. The biggest spike that multimedia.cx ever saw was when Steve Jobs linked to this WebM post.

    Dropped Sites
    There are a bunch of subdomains I dropped because I hadn’t done anything with them for years and I doubt anyone will notice they’re gone. One notable section that I decided to drop is the samples.mplayerhq.hu archive. It will live on, but it will be hosted by samples.ffmpeg.org, which had a full mirror anyway. The lower-end VPS instances don’t have the 53 GB necessary.

    Going Forward
    Here’s to another 10 years of multimedia.cx, even if multimedia isn’t as exciting as it was 10 years ago (personal opinion ; I’ll have another post on this later). But at least I can get working on some other projects now that this is done. For the past 4 months or so, whenever I think of doing some other project, I always remembered that this server move took priority over everything else.

  • Calculate frames to remove to get timelapse of desired length

    12 juin 2016, par Espen Birk

    I’ve got lots of images stored on a server, and a reference in a MySQL database so that i can easily query it for image from specific dates/time.

    Images is taken with an interval of 7 images/hour.

    Lets say i want to create a timelapse from the last 4 days, and make a 5 sec movie. How can i calculate how to evenly drop frames to get to that desired length of 5 seconds ?

    This is what i got so far.

    Total images : 4 Days * 24 hours * 7 images/hour = 672 images
    Required images at 24 fps : 24 * 5 = 120 images

    Divide the total images with the required images to find out which/every frame i need to keep

    672 / 120 = 5.6

    Then i loop trough all 672 images, and every 5th or 6th time i store a reference to the image in an array.

    Here is my problem. If i round up i get a video thats longer than i want, and if i round down i get a video thats shorter.

    If i keep every 5th image when looping : 134 images / 24 fps = 5.6 sec video
    If i keep every 6th image when looping : 112 images / 24 fps = 4.6 sec video

    Is it possible to get it better, and still skip images evenly ?

    Solved this using xxfelixxx’s answer in PHP
    Heres the code in PHP :

    $start  = 1;
    $stop   = 672; // Total Images

    $dur    = 5;   // Video Duration
    $n      = 24 * $dur; // Required frames - 24 FPS * Duration
    $next   = $start;
    $step = ( $stop - $start ) / $n;

    $frames = array();

    for ($i = 1; $i <= $n; $i++) {
       $frames[] = round($next);
       $next += $step;
    };

    var_dump($frames);
  • ffmpeg - continuous file streaming over RTMP

    1er mai 2013, par Sébastien Renauld

    I've been looking around for a simple (or perhaps not-so-simple) walkaround for a problem I am having in my set up for a simple test case : video streaming over red5 media server.

    I have built a small-ish library of FLV files scraped from YouTube and managed to play them in succession with the following perl script :

    use Cwd;
    use strict;
    use warnings;
    use DBI;
    use DBD::mysql;

    our $db = DBI->connect();
    my $dst = "/home/seb/youtube/";
    sub streamFile {
       my $r = $db->prepare("SELECT name FROM music_flvs ORDER BY RAND() LIMIT 1");
       $r->execute();
       my @data = $r->fetchrow_array();
       my $filename = $data[0]
       my $t = `ffmpeg -re -i '${dst}${filename}' -ab 48k -ac 1 -vcodec libx264 -crf 30 -s "640x480" -acodec libfaac -ar 44100 -threads 4 -f flv 'rtmp://server/oflaDemo/music'`;
       return 1;
    }
    while (&streamFile()) {
    }

    This script does its purpose extremely well : it plays files one by one through ffmpeg. However, it does so with a crucial problem : it causes an Unpublish event every time it swaps songs, which causes all the clients to disconnect. I would like to prevent this. The event manifests itself in ActionScript as this :

    16:33:54:209 - Playback - NetStream.Play.UnpublishNotify
    16:33:54:209 - Playback - NetStream.Play.PublishNotify

    I have seen the concat demuxer and believe that it might somewhat help me. The question is pretty simple : what is the best way to make ffmpeg stream a playlist to a RTMP server without ever causing an Unpublish event ?