
Recherche avancée
Autres articles (97)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (12307)
-
create a video clip from m3u8 file using node js
12 janvier 2021, par Alan
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffmpeg = require('fluent-ffmpeg');
const process = require('process');


const args = process.argv.slice(2);
if (args.length !== 4) {
 console.error('Incorrect number of arguments');
 process.exit(1);
 }
const startTime = args[0];
const timeDuration = args[1];
const inputFile = args[2];
const outputFile=args[3];

ffmpeg.setFfmpegPath(ffmpegPath);

ffmpeg(inputFile)
 .setStartTime(startTime)
 .setDuration(timeDuration)
 .output(outputFile)
 .on('end', function(err) {
 if(!err) { console.log('conversion Done') }
 })
 .on('error', function(err){
 console.log('error: ', err)
 }).run();






Here is my index.js file which can create clips from any video file (mkv,mp4,ts,etc.).
I run


node index.js 0:15 20 ../../video/sample.mp4 ../../video/output.mp4


This command creates a new file in a specific folder of my choice. I am running slice method to remove first two arguments and extract the last 4 args to create a clip.


But I don't know how to create a clip from a m3u8 file such as




#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:12.960000,
test0.ts
#EXTINF:8.760000,
test1.ts
#EXTINF:10.520000,
test2.ts
#EXTINF:9.800000,
test3.ts
#EXTINF:10.000000,
test4.ts
#EXTINF:10.240000,
test5.ts
#EXT-X-ENDLIST






let's say I wanna create a 20 seconds file that starts the 15th second so it will start from test1.ts at 3s and then will move to the next file test2.ts and then it will take only the first 5 seconds of test3.ts to create a total 20s file and give output.


I'm pretty much stuck in this. Is there a way to do that like I'm doing using arguments ???




-
how to create a small m3u8 clip from another m3u8 clip using node
12 janvier 2021, par Alan#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:12.960000,
https://d3s84sk2607r1u.cloudfront.net/video_866552260.ts
#EXTINF:8.760000,
https://d3s84sk2607r1u.cloudfront.net/video_866552261.ts
#EXTINF:10.520000,
https://d3s84sk2607r1u.cloudfront.net/video_866552262.ts
#EXTINF:9.800000,
https://d3s84sk2607r1u.cloudfront.net/video_866552263.ts
#EXTINF:10.000000,
https://d3s84sk2607r1u.cloudfront.net/video_866552264.ts
#EXTINF:10.240000,
https://d3s84sk2607r1u.cloudfront.net/video_866552265.ts
#EXT-X-ENDLIST




So here it is an m3u8 file. I am trying to cut it and create a new clip let's say 15 seconds with the first two ts files and remove the others. This new clip will be in m3u8 format and will look like






#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:12.960000,
https://d3s84sk2607r1u.cloudfront.net/video_866552260.ts
#EXTINF:2.040000,
https://d3s84sk2607r1u.cloudfront.net/video_866552261.ts
#EXT-X-ENDLIST




I am using node js and FFmpeg. So is there a way to create a small clip which will be a m3u8 file, from this m3u8 file. I am trying to create a script that will execute. So if it's not node js then any other like java or python will be helpful for me




I am trying to create a script.js that will run on my command like


node script.js start_time end_time ./path/file.m3u8




that will generate a new m3u8 file


-
full m3u8 clip isn't getting generated from m3u8 file
12 janvier 2021, par Alan
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffmpeg = require('fluent-ffmpeg');
const process = require('process');


const args = process.argv.slice(2);
if (args.length !== 4) {
 console.error('Incorrect number of arguments');
 process.exit(1);
 }
const startTime = args[0];
const timeDuration = args[1];
const inputFile = args[2];
const outputFile=args[3];

ffmpeg.setFfmpegPath(ffmpegPath);

ffmpeg(inputFile)
 .setStartTime(startTime)
 .setDuration(timeDuration)
 .output(outputFile)
 .on('end', function(err) {
 if(!err) { console.log('conversion Done') }
 })
 .on('error', function(err){
 console.log('error: ', err)
 }).run();







here is my index.js file
I am running this command on the terminal to generate a clip from the m3u8 file

node index.js 00:00:10 46 ./path/sample.m3u8 ./path/output.m3u8

The main problem is that it is not creating a clip for more than 13 seconds. For example, the above command should generate a 46s clip but it is going near 13 seconds. So I don't get what's wrong with that. Any clip less than 13 is perfectly fine.
Is there any way to fix that ?