
Recherche avancée
Autres articles (87)
-
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (7640)
-
Not all portions of video play well after concatenation
24 septembre 2018, par srgbndNode.JS 8.11.4, fluent-ffmpeg 2.1.2
I need to concatenate random portions of the same length of different videos in one video file. The concatenation proceeds without errors. But when I play the final concatenated file I see some portions playing well with sound, others have video "frozen" but sounds playing.
What’s the problem ? I want all portions playing well in the final concatenated file.
Concatenation config :
trex@cave:/media/trex/safe1/Development/app$ head concat_config.txt
file /media/trex/safe1/Development/app/videos/test/417912400.mp4
inpoint 145
outpoint 155
file /media/trex/safe1/Development/app/videos/test/440386842.mp4
inpoint 59
outpoint 69
file /media/trex/safe1/Development/app/videos/test/417912400.mp4
inpoint 144
outpoint 154
...In total, I have 16 portions of 2 videos. Duration of a portion is 10 sec. In the future the number of video files and portions will be much bigger.
trex@cave:/media/trex/safe1/Development/app$ ls -lh videos/test/
total 344M
-rw-r--r-- 1 trex trex 90M set 23 12:19 417912400.mp4
-rw-r--r-- 1 trex trex 254M set 23 12:19 440386842.mp4JavaScript code for the concatentaion :
const fs = require('fs');
const path = require('path');
const _ = require('lodash');
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffprobePath = require('@ffprobe-installer/ffprobe').path;
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg.setFfprobePath(ffprobePath);
function getMetadata(absPathToFile) {
return new Promise(function (resolve, reject) {
ffmpeg.ffprobe(absPathToFile, function(err, metadata) {
if (err) {
reject('get video meta: ' + err.toString());
}
resolve(metadata);
});
});
}
async function getFormat(files) {
const pArray = files.map(async f => {
const meta = await getMetadata(f);
meta.format.short_filename = meta.format.filename.split('/').pop();
return meta.format;
});
return await Promise.all(pArray);
}
function getSliceValues(duration, max = 10) {
max = duration < max ? duration * 0.5 : max; // sec
const start = _.random(0, duration * 0.9);
const end = start + max > duration ? duration : start + max;
return `inpoint ${Math.floor(start)}\noutpoint ${Math.floor(end)}\n`;
}
function addPath(arr, aPath) {
return arr.map(e => path.join(aPath, e));
}
function createConfig(meta) {
return meta.map(video => `file ${video.filename}\n${getSliceValues(video.duration)}`).join('');
}
function duplicateMeta(meta) {
for (let i = 0; i < 3; i++) {
meta.push(...meta);
}
return _.shuffle(meta);
}
const videoFolder = path.join(__dirname, 'videos/test');
const finalVideo = 'final_video.mp4';
const configFile = 'concat_config.txt';
// main
(async () => {
let videos = addPath(fs.readdirSync(videoFolder), videoFolder);
let meta = await getFormat(videos);
meta = duplicateMeta(meta); // get multiple portions of videos
fs.writeFileSync(configFile, createConfig(meta));
const mpeg = ffmpeg();
mpeg.input(configFile)
.inputOptions(['-f concat', '-safe 0'])
.outputOptions('-c copy')
.save(finalVideo);
})();Video files formats :
{ streams:
[ { index: 0,
codec_name: 'h264',
codec_long_name: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
profile: 'High',
codec_type: 'video',
codec_time_base: '1001/60000',
codec_tag_string: 'avc1',
codec_tag: '0x31637661',
width: 1920,
height: 1080,
coded_width: 1920,
coded_height: 1088,
has_b_frames: 2,
sample_aspect_ratio: '1:1',
display_aspect_ratio: '16:9',
pix_fmt: 'yuv420p',
level: 40,
color_range: 'tv',
color_space: 'bt709',
color_transfer: 'bt709',
color_primaries: 'bt709',
chroma_location: 'left',
field_order: 'unknown',
timecode: 'N/A',
refs: 1,
is_avc: 'true',
nal_length_size: 4,
id: 'N/A',
r_frame_rate: '30000/1001',
avg_frame_rate: '30000/1001',
time_base: '1/30000',
start_pts: 0,
start_time: 0,
duration_ts: 4936900,
duration: 164.563333,
bit_rate: 4323409,
max_bit_rate: 'N/A',
bits_per_raw_sample: 8,
nb_frames: 4932,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] },
{ index: 1,
codec_name: 'aac',
codec_long_name: 'AAC (Advanced Audio Coding)',
profile: 'LC',
codec_type: 'audio',
codec_time_base: '1/48000',
codec_tag_string: 'mp4a',
codec_tag: '0x6134706d',
sample_fmt: 'fltp',
sample_rate: 48000,
channels: 2,
channel_layout: 'stereo',
bits_per_sample: 0,
id: 'N/A',
r_frame_rate: '0/0',
avg_frame_rate: '0/0',
time_base: '1/48000',
start_pts: 0,
start_time: 0,
duration_ts: 7899120,
duration: 164.565,
bit_rate: 256000,
max_bit_rate: 263232,
bits_per_raw_sample: 'N/A',
nb_frames: 7714,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] } ],
format:
{ filename: '/media/trex/safe1/Development/app/videos/test/417912400.mp4',
nb_streams: 2,
nb_programs: 0,
format_name: 'mov,mp4,m4a,3gp,3g2,mj2',
format_long_name: 'QuickTime / MOV',
start_time: 0,
duration: 164.565,
size: 94298844,
bit_rate: 4584150,
probe_score: 100,
tags:
{ major_brand: 'mp42',
minor_version: '0',
compatible_brands: 'mp42mp41isomavc1',
creation_time: '2015-09-21T19:11:21.000000Z' } },
chapters: [] }
{ streams:
[ { index: 0,
codec_name: 'h264',
codec_long_name: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
profile: 'High',
codec_type: 'video',
codec_time_base: '1001/48000',
codec_tag_string: 'avc1',
codec_tag: '0x31637661',
width: 2560,
height: 1440,
coded_width: 2560,
coded_height: 1440,
has_b_frames: 2,
sample_aspect_ratio: '1:1',
display_aspect_ratio: '16:9',
pix_fmt: 'yuv420p',
level: 51,
color_range: 'tv',
color_space: 'bt709',
color_transfer: 'bt709',
color_primaries: 'bt709',
chroma_location: 'left',
field_order: 'unknown',
timecode: 'N/A',
refs: 1,
is_avc: 'true',
nal_length_size: 4,
id: 'N/A',
r_frame_rate: '24000/1001',
avg_frame_rate: '24000/1001',
time_base: '1/24000',
start_pts: 0,
start_time: 0,
duration_ts: 4206200,
duration: 175.258333,
bit_rate: 11891834,
max_bit_rate: 'N/A',
bits_per_raw_sample: 8,
nb_frames: 4202,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] },
{ index: 1,
codec_name: 'aac',
codec_long_name: 'AAC (Advanced Audio Coding)',
profile: 'LC',
codec_type: 'audio',
codec_time_base: '1/48000',
codec_tag_string: 'mp4a',
codec_tag: '0x6134706d',
sample_fmt: 'fltp',
sample_rate: 48000,
channels: 2,
channel_layout: 'stereo',
bits_per_sample: 0,
id: 'N/A',
r_frame_rate: '0/0',
avg_frame_rate: '0/0',
time_base: '1/48000',
start_pts: 0,
start_time: 0,
duration_ts: 8414160,
duration: 175.295,
bit_rate: 256000,
max_bit_rate: 262152,
bits_per_raw_sample: 'N/A',
nb_frames: 8217,
nb_read_frames: 'N/A',
nb_read_packets: 'N/A',
tags: [Object],
disposition: [Object] } ],
format:
{ filename: '/media/trex/safe1/Development/app/videos/test/440386842.mp4',
nb_streams: 2,
nb_programs: 0,
format_name: 'mov,mp4,m4a,3gp,3g2,mj2',
format_long_name: 'QuickTime / MOV',
start_time: 0,
duration: 175.295,
size: 266214940,
bit_rate: 12149345,
probe_score: 100,
tags:
{ major_brand: 'mp42',
minor_version: '0',
compatible_brands: 'mp42mp41isomavc1',
creation_time: '2015-11-15T19:30:49.000000Z' } },
chapters: [] } -
prevent ffmpeg to write metadata to m2ts file
20 septembre 2018, par jizazHow to prevent ffmpeg to write "Service name", "Service provider", "Service type" and other data to m2ts file ? Or how to remove this text Menu ?
See from Mediainfo :Menu
ID : 4096 (0x1000)
Menu ID : 1 (0x1)
Duration : 5s 339ms
List : 256 (0x100) (AVC) / 257 (0x101) (AAC, English)
Language : / English
Service name : Service01
Service provider : FFmpeg
Service type : digital television -
French CNIL recommends Piwik : the only analytics tool that does not require Cookie Consent
29 octobre 2014, par Matthieu Aubry — Press ReleasesThere has been recent and important changes in France regarding data privacy and the use of cookies. This blog post will introduce you to these changes and explain how you make your website compliant.
Cookie Consent in the data freedom law
Since the adoption of the EU Directive 2009/136/EC “Telecom Package”, Internet users must be informed and provide their prior consent to the storage of cookies on their computer. The use of cookies for advertising, analytics and social share buttons require the user’s consent :
It is necessary to inform users of the presence, purpose and duration of the cookies placed in their browsers, and the means at their disposal to oppose it.
What is a cookie ?
Cookies are tracers placed on Internet users’ hard drives by the web hosts of the visited website. They allow the website to identify a single user across multiple visits with a unique identifier. Cookies may be used for various purposes : building up a shopping cart, storing a website’s language settings, or targeting advertising by monitoring the user’s web-browsing.
Which cookies are exempt from the Cookie Consent rule ?
France has exempted certain cookies from the cookie consent rule : for those cookies that are strictly necessary to offer the service sought after by the user you do not need to ask consent to user. Examples of such cookies are :
- the shopping cart cookie,
- authentication cookies,
- short lived session cookies,
- load balancer cookies,
- certain first party analytics (such as Piwik cookies),
- persistent cookies for interface personalisation.
Asking users for consent for Analytics (tracking) Cookies
For all cookies that are not exempted from the Cookie Consent then you will need to :
- obtain consent from web users before placing or reading cookies and similar technologies,
- clearly inform web users of the different purposes for which the cookies and similar technologies will be used,
- propose a real choice to web users between accepting or refusing cookies and similar technologies.
You don’t need Cookie Consent with Piwik
The excellent news is that there is a way to bypass the Cookie Consent banner on your website :
If you are using another analytics solution other than Piwik then you will need to ask users for consent. If you do not want to ask for consent then download and install Piwik or signup to Piwik Cloud to get started.
If you are already using Piwik you need to do two simple things : (1) anonymise visitor IP addresses (at least two bytes) and (2) include the opt-out iframe solution in your website (learn more).
Note that these recommendations currently only apply in France, but because the law is European we can expect similar findings in other European countries.
CNIL recommends Piwik
We are proud that the CNIL has identified Piwik as the only tool that respects all privacy requirements set by the European Telecom law.
About the CNIL
The CNIL is an independent administrative body that operates in accordance with the French data protection legislation. The CNIL has been entrusted with the general duty to inform people of the rights that the data protection legislation allows them.
The role and responsabilities of the CNIL are :
- to protect citizens and their data
- to regulate and control processing of personal data
- to inspect the security of data processing systems and applications, and impose penalties
Piwik and Privacy
At Piwik we love Privacy – our open analytics platform comes with built-in Privacy.
Future of Privacy at Piwik
Piwik is already the leader when it comes to respecting user privacy but we plan to continue improving privacy within the open analytics platform. For more information and specific ideas see Privacy enhancing issues in our issue tracker.
References
Learn more in these articles in French [fr] or English :
- [fr] Sites web, cookies et autres traceurs
- [fr] Comment me mettre en conformité avec la recommandation “Cookies” de la CNIL ?
- [fr] Recommandation sur les cookies : obligations pour les responsables de sites ?
- CNIL Starts Controlling Cookie Settings in October 2014
- CNIL recommends Piwik for compliance with data protection laws
Contact
To learn more about Piwik, please visit piwik.org,
Get in touch with the Piwik team : Contact information,
For professional support contact Piwik PRO.