
Recherche avancée
Autres articles (8)
-
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)
Sur d’autres sites (4046)
-
Merge commit ’6fe2641d6e410b7bc203138fa97e1118b411f16d’
29 mars 2015, par Michael NiedermayerMerge commit ’6fe2641d6e410b7bc203138fa97e1118b411f16d’
* commit ’6fe2641d6e410b7bc203138fa97e1118b411f16d’ :
lavc : add profile define for DTS ExpressConflicts :
doc/APIchanges
libavcodec/version.hSee : 11fe56c8bbf39cd0c3edbf0cd404dea400ff7e0c
Merged-by : Michael Niedermayer <michaelni@gmx.at> -
Discord bot not playing any audio
7 mars 2023, par MarkixI'm making a discord music bot with Discord.js v14,
@discordjs/voice
, and Typescript and I have this play command but it doesn't seem to be working. It successfully joins, throws no exceptions but... no audio.

This is my code :


import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import { joinVoiceChannel, createAudioPlayer, getVoiceConnections, StreamType, AudioPlayerStatus } from "@discordjs/voice";
import { createAudioResource } from "@discordjs/voice";
import ytdl from 'ytdl-core';

module.exports = {
 data: new SlashCommandBuilder()
 .setName('play')
 .setDescription('Play příkaz')
 .addStringOption(option => 
 option
 .setName("link")
 .setDescription("Youtube link!")
 .setRequired(false)
 ),

async execute(interaction: CommandInteraction) {
 const link = interaction.options.get('link')?.value?.toString();
 const player = createAudioPlayer();
 const resource = createAudioResource(ytdl(`${link}`, { filter: "audioonly" }), { inlineVolume: 1.0, inputType: StreamType.WebmOpus });

 player.play(resource);

 const connection = joinVoiceChannel({
 channelId: "775815628619251743",
 guildId: "775761665786511370",
 adapterCreator: interaction.guild?.voiceAdapterCreator,
 selfMute?: false,
 selfDeaf: false
 });

 const subscription = connection.subscribe(player);
 interaction.reply("Now playing: .-.");
}



This is
"dependencies"
in my package.json

"dependencies": {
 "@discordjs/builders": "^1.2.0",
 "@discordjs/rest": "^1.5.0",
 "@discordjs/voice": "^0.14.0",
 "@types/express": "^4.17.14",
 "discord.js": "^14.4.0",
 "dotenv": "^16.0.2",
 "express": "^4.18.1",
 "ffmpeg": "^0.0.4",
 "ffmpeg-static": "^5.1.0",
 "libsodium-wrappers": "^0.7.11",
 "opusscript": "^0.0.8",
 "sequelize": "^6.23.2",
 "sqlite3": "^5.1.2",
 "ts-node": "^10.9.1",
 "ytdl-core": "^4.11.2"
 }



(And yes I also have ffmpeg installed globally)


markix@pop-os-lenovo-laptop:~$ apt list --installed | grep -i ffmpeg 

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

chromium-codecs-ffmpeg-extra/jammy,now 1:85.0.4183.83-0ubuntu2 amd64 [installed,upgradable to: 1:85.0.4183.83-0ubuntu2.22.04.1]
ffmpeg/jammy-security,jammy-updates,now 7:4.4.2-0ubuntu0.22.04.1 amd64 [installed,automatic]



What am I doing wrong ?


-
Promise chaining and resolution
23 janvier 2019, par Shourya SharmaI am trying to convert videos one by one with the help of promises. i am using ffmpeg for conversion and multer for uploading multiple files.
multer uploads multiple files at once after which i have to chain the conversions one by one. as of now it just converts the 1st file.
i thought chaining of promises ..like in an array should work but i am confused if i can define new promises in an array as ffmpeg also returns a promise
My router :
const router = require('express').Router();
const multer = require('multer');
const ffmpeg = require('ffmpeg');
let str;
const storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, './uploads');
},
filename: (req, file, cb) => {
str = file.originalname.replace(/\.[^/.]+$/, "");
str = str.replace(/[^a-z0-9+]+/gi, '_') + '.' + file.originalname.replace(/^.*\./, '');
cb(null, str);
}
});
const upload = multer({ storage: storage }).array('files', 12);
router.post('/upload', (req, res, next) => {
// req.files is an array of files
// req.body will contain the text fields, if there were any
function uploadFile() {
return new Promise((resolve, reject) => {
upload(req, res, (err) => {
if (err) {
res.send(err) // Pass errors to Express.
reject(`Error: Something went wrong!`);
} else if (req.files == undefined) {
res.send(`No File selected.`);
resolve();
} else if (!err && req.files.length > 0) {
res.status(201).send(`${req.files.length} File(s): ${req.files} uploaded successfully.`);
console.log('uploaded');
resolve();
}
});
});
}
uploadFile().then(() => {
try {
var process = new ffmpeg('./uploads/' + str);
process.then(function (video) {
console.log('The video is ready to be processed');
video.addCommand('-hide_banner', '');
video.addCommand('-y', '');
video.addCommand('-c:a', 'aac');
video.addCommand('-ar', '48000');
video.addCommand('-c:v', 'h264');
video.addCommand('-profile:v', 'main');
video.addCommand('-crf', '20');
video.addCommand('-sc_threshold', '0');
video.addCommand('-g', '50');
video.addCommand('-keyint_min', '50');
video.addCommand('-hls_time', '4');
video.addCommand('-hls_playlist_type', 'vod');
video.addCommand('-vf', 'scale=-2:720');
video.addCommand('-b:v', '1400k');
video.addCommand('-maxrate', '1498k');
video.addCommand('-bufsize', '2100k');
video.addCommand('-b:a', '128k');
video.save('./converted/' + str, function (error, file) {
if (!error)
console.log('Video file: ' + file);
});
}, function (err) {
console.log('Error: ' + err);
});
} catch (e) {
console.log(e.code);
console.log(e.msg);
}
}).catch((err) => {
console.log(Error, err);
});
});
module.exports = router;