
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (27)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (7062)
-
Compress video from Android before upload to server
26 juillet 2016, par Rahul PatelI am working with compress video using FFmpeg library.
selectedImagePath = getPath(selectedImage); // this is video path from gallery
File dir = new File(Environment.getExternalStorageDirectory().getPath(), "MyAPP" + "/" + "Video");
if (!dir.exists()) {
dir.mkdirs();
}
long time = System.currentTimeMillis();
String ffmpegCode = "ffmpeg -y -i " + selectedImagePath + " -strict experimental -s 480x320 -r 25 -vcodec mpeg4 -b 900k -ab 48000 -ac 2 -ar 22050 " + dir + "/" + time + "out.mp4";using this code I can compress video, but if there is
space between selected image path then this is not working
.I found the below solution from this LINK.
// Use this format to support files that contains spaces and special characters
String[] complexCommand = {"ffmpeg","-y" ,"-i", selectedImagePath,"-strict","experimental","-s", "480x320","-r","25", "-vcodec", "mpeg4", "-b", "900k", "-ab","48000", "-ac", "2", "-ar", "22050", dir + "/" + time + "out.mp4"};
Runtime.getRuntime().exec("chmod 744 "+dir + "/");
Process p = Runtime.getRuntime().exec(complexCommand);and Logcat :
07-26 18:59:24.609 29512-29535/com.examples.ffmpeg4android_demo I/OpenGLRenderer: Initialized EGL, version 1.4
07-26 18:59:24.616 29512-30045/com.examples.ffmpeg4android_demo W/System.err: java.io.IOException: Error running exec(). Command: [ffmpeg, -y, -i, /storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20160726-WA0001.mp4, -strict, experimental, -s, 480x320, -r, 25, -vcodec, mpeg4, -b, 900k, -ab, 48000, -ac, 2, -ar, 22050, /storage/emulated/0/MyAPP/Video/1469539764559out.mp4] Working Directory: null Environment: null
07-26 18:59:24.622 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.lang.ProcessManager.exec(ProcessManager.java:211)
07-26 18:59:24.622 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.lang.Runtime.exec(Runtime.java:174)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.lang.Runtime.exec(Runtime.java:129)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at com.examples.ffmpeg4android.SimpleExample$TranscdingBackground1.doInBackground(SimpleExample.java:577)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at com.examples.ffmpeg4android.SimpleExample$TranscdingBackground1.doInBackground(SimpleExample.java:531)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:295)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.lang.Thread.run(Thread.java:818)
07-26 18:59:24.623 29512-30045/com.examples.ffmpeg4android_demo W/System.err: Caused by: java.io.IOException: Permission denied
07-26 18:59:24.624 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.lang.ProcessManager.exec(Native Method)
07-26 18:59:24.624 29512-30045/com.examples.ffmpeg4android_demo W/System.err: at java.lang.ProcessManager.exec(ProcessManager.java:209)
07-26 18:59:24.624 29512-30045/com.examples.ffmpeg4android_demo W/System.err: ... 10 moreI already given permission
android.permission.WRITE_EXTERNAL_STORAGE
how can I compress video before upload to server like whatsapp and facebook ? Is there any other solution ?
Please guide me.
-
create a timelapse video using MediaRecorder API ( and ffmpeg ? )
24 août 2022, par The Blind HawkSummary


I have a version of my code already working on Chrome and Edge (Mac Windows and Android), but I need some fixes for it to work on IOS (Safari/Chrome).

My objective is to record around 25 minutes and download a timelapse version of the recording.

final product requirements :

speed: 3fps
length: ~25s

(I need to record one frame every 20 seconds for 25 mins)



this.secondStream settings :


this.secondStream = await navigator.mediaDevices.getUserMedia({
 audio: false,
 video: {width: 430, height: 430, facingMode: "user"}
});



My code for IOS so far :


startIOSVideoRecording: function() {
 console.log("setting up recorder");
 var self = this;
 this.data = [];

 if (MediaRecorder.isTypeSupported('video/mp4')) {
 // IOS does not support webm, so I will be using mp4
 var options = {mimeType: 'video/mp4', videoBitsPerSecond : 1000000};
 } else {
 console.log("ERROR: mp4 is not supported, trying to default to webm");
 var options = {mimeType: 'video/webm'};
 }
 console.log("options settings:");
 console.log(options);

 this.recorder = new MediaRecorder(this.secondStream, options);

 this.recorder.ondataavailable = function(evt) {
 if (evt.data && evt.data.size > 0) {
 self.data.push(evt.data);
 console.log('chunk size: ' + evt.data.size);
 }
 }

 this.recorder.onstop = function(evt) {
 console.log('recorder stopping');
 var blob = new Blob(self.data, {type: "video/mp4"});
 self.download(blob, "mp4");
 self.sendMail(videoBlob);
 }

 console.log("finished setup, starting")
 this.recorder.start(1200);

 function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms));}

 async function looper() {
 // I am trying to pick one second every 20 more or less
 await sleep(500);
 self.recorder.pause();
 await sleep(18000);
 self.recorder.resume();
 looper();
 }
 looper();
 },



Issues


Only one call to getUserMedia()


I am already using
this.secondstream
elsewhere, and I need the settings to stay as they are for the other functionality.

On Chrome and Edge, I could just callgetUserMedia()
again with different settings, and the issue would be solved, but on IOS callinggetUserMedia()
a second time kills the first stream.

The settings that I was planning to use (works for Chrome and Edge) :

navigator.mediaDevices.getUserMedia({
 audio: false,
 video: { 
 width: 360, height: 240, facingMode: "user", 
 frameRate: { min:0, ideal: 0.05, max:0.1 } 
 },
}



The timelapse library I am using does not support mp4 (ffmpeg as alternative ?)


I am forced to use mp4 on IOS apparently, but this does not allow me to use the library I was relying on so I need an alternative.

I am thinking of usingffmpeg
but cannot find any documentation to make it interact with the blob before the download.

I do not want to edit the video after downloading it, but I want to be able to download the already edited version, so no terminal commands.

MediaRecorder pause and resume are not ideal


On Chrome and Edge I would keep one frame every 20 seconds by setting the frameRate to 0.05, but this does not seem to work on IOS for two reasons.

First one is related to the first issue of not being able to change the settings ofgetUserMedia()
without destroying the initial stream in the first place.

And even after changing the settings, It seems that setting the frame rate below 1 is not supported on IOS. Maybe I wrote something else wrong, but I was not able to open the downloaded file.

Therefore I tried relying on pausing and resuming the MediaRecorder, but this brings forth another two issues :

I am currently saving 1 second every 20 seconds and not 1 frame every 20 seconds, and I cannot find any workarounds.

Pause and Resume take a little bit of time, making the code unreliable, as I sometimes pick 2/20 seconds instead of 1/20, and I have no reliability that the loop is actually running every 20 seconds (might be 18 might be 25).

My working code for other platforms


This is my code for the other platforms, hope it helps !

Quick note : you will need to give it a bit of time between setup and start.

The timelapse library is here


 setupVideoRecording: function() {
 let video = { 
 width: 360, height: 240, facingMode: "user", 
 frameRate: { min:0, ideal: 0.05, max:0.1 } 
 };
 navigator.mediaDevices.getUserMedia({
 audio: false,
 video: video,
 }).then((stream) => {
 // this is a video element
 const recVideo = document.getElementById('self-recorder');
 recVideo.muted = true;
 recVideo.autoplay = true;
 recVideo.srcObject = stream;
 recVideo.play();
 });
 },

 startVideoRecording: function() {
 console.log("setting up recorder");
 var self = this;
 this.data = [];

 var video = document.getElementById('self-recorder');

 if (MediaRecorder.isTypeSupported('video/webm; codecs=vp9')) {
 var options = {mimeType: 'video/webm; codecs=vp9'};
 } else if (MediaRecorder.isTypeSupported('video/webm')) {
 var options = {mimeType: 'video/webm'};
 }
 console.log("options settings:");
 console.log(options);

 this.recorder = new MediaRecorder(video.captureStream(), options);

 this.recorder.ondataavailable = function(evt) {
 self.data.push(evt.data);
 console.log('chunk size: ' + evt.data.size);
 }

 this.recorder.onstop = function(evt) {
 console.log('recorder stopping');
 timelapse(self.data, 3, function(blob) {
 self.download(blob, "webm");
 });
 }

 console.log("finished setup, starting");
 this.recorder.start(40000);
 }



-
The new GDPR data protection regulation and potential consequences on Piwik
GDPR is a new data protection related regulation in Europe. GDPR stands for General Data Protection Regulation.
The purpose of this European regulation is to strengthen and unify data protection for all individuals within the European Union. This also includes entities outside Europe willing to do business with European citizens. GDPR is a set of processes you need to follow within your organization to protect the privacy of European citizens.
GDPR will start to apply in May 2018. It is recognized to be dissuasive because of the potential penalty of up to 4% of the yearly turnover, in case of infringement.
Many articles have been written about GDPR including our previous article. Few of them are explaining how it will affect web analytics vendors : this is what this article is about.
Am I really impacted by GDPR if I am a Piwik user ?
As Piwik can collect personal data, the answer is yes. Piwik analytics data is impacted by the GDPR.
As GDPR is a general concept, we decided from the official guidelines to assume what will be the potential consequences on the use of Piwik.
There are 2 potential scenarios we can identify :
- 1 – You are collecting personal data with Piwik
- 2 – You are not collecting personal data with Piwik
1 – Personal data collection with Piwik
According to GDPR : IP addresses, cookies, UserID are personal data.
IP addresses are personal data, so you will have to anonymize them unless you receive explicit consent from the visitor. Please view the following article in order to learn : how can I anonymize IP addresses in Piwik ?
According to GDPR, cookies are personal data too. But as all cookies are not created equal it may be possible that some need to require user consent whereas other not. Whatever will be the final decision, you can learn about the first-party cookies created by Piwik and how to disable all tracking cookies in Piwik ?
User ID, you are impacted if the User ID you assign is specific to an individual or if you can cross the User ID data further and find back the individual personal data.
Any extra personal data you may collect with Piwik, it could be for example : first names, family names, e-mail address… You are able to collect such data using custom dimensions, custom variables…
What are the rules I have to comply with ?
By collecting personal data, you will have to respect EU citizens rights, which include :
- The possibility for them to view the data you collected on them
- The possibility to rectify some data concerning them
- The possibility to delete their data when they request about it
As you can imagine, for the first obligation, you will have to export all the data. So if a user is requesting it, you will have to export the data linked to his IP address(es). It can be easily exported as a .csv file for example.
In order to do that, just create a segment according to the IP address of the user who requested it and then export the “Visitor log” report.
If the personal data is not linked with the IP address but other attributes such as User ID or a custom dimension, you can provide the same data export by using the segment function and filtering on the personal data field.The data edit and deletion process on Piwik is a bit trickier as it currently requires administration system skills. We are planning to develop a new plugin for GDPR compliance (which will be available for free on the Marketplace). This plugin will let you edit and easily delete data of a particular user. Currently you can delete a specific user’s data by accessing the Piwik database and directly delete the different records for this specific user.
2 – You are not collecting personal data with Piwik
Unfortunately it is not because you do not collect personal data that you will not be affected by GDPR.
The details of GDPR are not confirmed yet and GDPR could involve enabling the DoNotTrack setting by default on all browsers.
Yes, you read it well, by default, unless the internet user uncheck this option, Piwik respecting DoNoTrack would not be able to track any user. If one needed to collect data anyway, Piwik Log Analytics and server-side tracking can be considered.If you need help regarding how to set up your Piwik installation in order to be GDPR compliant :
Do you have a Piwik experience you would like to share with the community ? Please share it with us by contacting Piwik core team.