
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (8)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (2919)
-
How to check if video have visually corrupted frames ?
1er février, par B LoloI'm using ffmpeg to convert and analyze video, mostly avi to mkv. Sometimes video that I work on have one frame corrupted in random place, , it looks like :






How to check if frame is visually corrupted in ffmpeg ?



It's not file corruption (not byte corruption), I know that because this video artifact is present in source file, it's just visual corruption.



This command line gives error free result : 
 ffmpeg -i myinput.avi params out.mkv 2> error_log.txt



How to find if similar pattern is on any more frames in video file ? Can something from signalstats could be helpful ?


-
How can I improve the up-time of my coffee pot live stream ?
26 avril 2017, par tww0003Some Background on the Project :
Like most software developers I depend on coffee to keep me running, and so do my coworkers. I had an old iPhone sitting around, so I decided to pay homage to the first webcam and live stream my office coffee pot.
The stream has become popular within my company, so I want to make sure it will stay online with as little effort possible on my part. As of right now, it will occasionally go down, and I have to manually get it up and running again.
My Setup :
I have nginx set up on a digital ocean server (my nginx.conf is shown below), and downloaded an rtmp streaming app for my iPhone.
The phone is set to stream to
example.com/live/stream
and then I use an ffmpeg command to take that stream, strip the audio (the live stream is public and I don’t want coworkers to feel like they have to be careful about what they say), and then make it accessible atrtmp://example.com/live/coffee
andexample.com/hls/coffee.m3u8
.Since I’m not too familiar with ffmpeg, I had to google around and find the appropriate command to strip the coffee stream of the audio and I found this :
ffmpeg -i rtmp://localhost/live/stream -vcodec libx264 -vprofile baseline -acodec aac -strict -2 -f flv -an rtmp://localhost/live/coffee
Essentially all I know about this command is that the input stream comes from,
localhost/live/stream
, it strips the audio with-an
, and then it outputs tortmp://localhost/live/coffee
.I would assume that
ffmpeg -i rtmp://localhost/live/stream -an rtmp://localhost/live/coffee
would have the same effect, but the page I found the command on was dealing with ffmpeg, and nginx, so I figured the extra parameters were useful.What I’ve noticed with this command is that it will error out, taking the live stream down. I wrote a small bash script to rerun the command when it stops, but I don’t think this is the best solution.
Here is the bash script :
while true;
do
ffmpeg -i rtmp://localhost/live/stream -vcodec libx264 -vprofile baseline -acodec aac -strict -2 -f flv -an rtmp://localhost/live/coffee
echo 'Something went wrong. Retrying...'
sleep 1
doneI’m curious about 2 things :
- What is the best way to strip audio from an rtmp stream ?
- What is the proper configuration for nginx to ensure that my rtmp stream will stay up for as long as possible ?
Since I have close to 0 experience with nginx, ffmpeg, and rtmp streaming any help, or tips would be appreciated.
Here is my nginx.conf file :
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
allow 127.0.0.1;
}
location /stat.xsl {
root html;
}
location /hls {
root /tmp;
add_header Cache-Control no-cache;
}
location /dash {
root /tmp;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
}
}
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
hls on;
hls_path /tmp/hls;
dash on;
dash_path /tmp/dash;
}
}
}edit :
I’m also running into this same issue : https://trac.ffmpeg.org/ticket/4401 -
The complete guide on tracking your websites and web apps into multiple Piwiks and how to do it easily & efficiently
23 février 2017, par InnoCraft — Community, DevelopmentGetting the tracking of your website and apps right is crucial to your success as you need to ensure the measured data is meaningful and correct. That’s why we, at InnoCraft, help our clients setting up their web tracking and digital measurement strategy. Some challenges include tracking your analytics data into multiple Piwik services as well as the tracking of single-page websites and web applications (covered in a previous article). In this blog post, we explain how to track your data into multiple Piwik websites correctly.
Embedding the tracking code
First of all you need to embed your JavaScript tracking code into your website or app as usual. If you haven’t done this yet : Log in to your Piwik, click on “Administration” in the top right and go to “Tracking Code”. There you have various options to adjust your tracking code to your needs.
Tracking the same data into different websites
Let’s assume you have set up the regular JavaScript tracking code and you want to track the same data into a second Piwik website. This second Piwik website can be either on the same Piwik installation or on a different Piwik. To do this, add the following line to your tracking code :
_paq.push(['addTracker', 'https://$yourPiwikDomain/piwik.php', idSite]);
It should look like this :
var u = '//$yourPiwikDomain';
_paq.push(['addTracker', u + '/piwik.php', var idSite = 2]); // adds an additional tracker
_paq.push(['setSiteId', '1']); // configures your regular Piwik tracker
_paq.push(['setTrackerUrl', u + 'piwik.php']);This will track the same data into website 1 and website 2 of your Piwik installation. You can also change the domain in
addTracker
to point it to a different Piwik installation :_paq.push(['addTracker', '//$differentPiwikDomain/piwik.php', var idSite = 2]);
All Piwik tracker methods that you call afterwards will be applied to all trackers. Say you call
_paq.push(['disableCookies']); _paq.push(['trackPageView']);
, then both methods will be called on all tracker instances assuring they will behave the same and will track the same data into both Piwik websites.Tracking different data into different websites
If you want to track only certain data into one website, and different data into an additional website, you need to configure the trackers differently. For example, you want to enable link tracking only for one tracker, but not for the other. The problem is that calling
_paq.push(['enableLinkTracking']);
enables link tracking on all of your trackers. To workaround this limitation, you can configure your trackers differently like this :window.piwikAsyncInit = function () {
Piwik.on('TrackerSetup', function (tracker) {
if (tracker.getSiteId() == 2
|| tracker.getTrackerUrl() === '//$yourPiwikDomain/piwik.php') {
tracker.enableLinkTracking();
}
});
};Now it enables link tracking only for the tracker that is configured for a certain website ID or Piwik domain.
Accessing a previously generated tracker instance
When you configure a tracker via
_paq.push
, you create a so called “Async tracker” because Piwik will be loaded asynchronously and create the tracker instance as soon as it is loaded. If you need to get the instance of such a tracker, you can use the methodPiwik.getAsyncTracker(trackerUrl, idSite)
. This can be useful if you have a single-page website and want to track different data into different websites :window.addEventListener('hashchange', function() {
if ('undefined' === typeof Piwik) {
// Piwik might not be loaded yet
return;
}
var tracker1 = Piwik.getAsyncTracker('//$yourPiwikDomain/piwik.php', var idSite = 1);
var tracker2 = Piwik.getAsyncTracker('//$yourPiwikDomain/piwik.php', var idSite = 2);
tracker1.setCurrentUrl('/' + window.location.hash.substr(1));
tracker2.setCurrentUrl('/mywebsite/' + window.location.hash.substr(1));
});Tracking different data into multiple Piwik installations without using “_paq”
Some users prefer to not use
_paq.push
and instead directly create tracker instances themselves using the methodPiwik.getTracker(trackerUrl, idSite)
like this :window.piwikAsyncInit = function () {
var tracker1 = Piwik.getTracker('//$yourPiwikdomain/piwik.php', var idSite = 1);
tracker1.disableCookies();
var tracker2 = Piwik.getTracker('//$yourPiwikdomain/piwik.php', var idSite = 2);
tracker2.enableLinkTracking();
tracker1.trackPageView();
tracker2.trackPageView();
};We usually don’t recommend creating trackers manually as it is more complicated and you need to make sure to configure trackers in the right order. For example to prevent the setting of any cookies, it is recommended to call
disableCookies
before calling any other methods. If you want to create your trackers manually and you use any of the following methods, make sure to call them in this order :disableCookies(), setAPIUrl(), enableCrossDomainLinking(), setCookiePath(), setCookieDomain(), setDomains(), setUserId(), enableLinkTracking()
Roll-Up Reporting – the easy and efficient way
Often users track data into multiple websites because they need aggregated data over all their websites. They want to see all statistics for a single website, but also which pages were viewed across all their websites, or how much traffic they got from a specific website or search engine across all websites. This means they add a second tracker to all their websites and track data not only into the regular Piwik website, but also into one additional website that gives them statistics over all websites. This has several disadvantages :
- Complexity in getting the tracking code right and the time needed to integrate and maintain it
- Slower website performance because everything needs to be tracked into several websites. This can decrease your conversions and sales
- Slower Piwik performance because it has to handle twice as much traffic. This means tracking becomes slower, generating the report becomes slower, and the database gets twice as big
Luckily, there is a better solution called Roll-Up Reporting. With Roll-Up Reporting, you can get aggregated data over all websites and / or for a group of websites without any of these disadvantages. It lets you create as many Roll-Ups as you wish and you can choose which websites’ data should be aggregated together into a new website.
We had customers who were able to remove one Piwik tracker because of this feature which resulted in less server costs, a faster website, and a faster Piwik. On top of all these advantages, it also lets you view the Visitor Log, Real-time Map, and other widgets and reports across several websites.
Questions ?
If you got any questions, please let us know and get in touch with us. You can find more information about the Piwik JavaScript tracker on the Piwik Developer Zone. There is a section dedicated to Multiple Piwik Trackers.