
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (48)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (10133)
-
Ffmpeg "no directory found" when passing in a path to the mp3 file
21 février 2020, par Eugene LevinsonHow my code should work :
Join the voice channel with the user who sent the command
Download the video using the link
Save it as random 16 digit number .mp3
Then pass the path to the FFmpeg player to play
My code :
The random 16 digit number
def get_digits(amount):
st = ""
for i in range(amount):
n = random.randint(0,9)
st = st + str(n)
return int(st)Downloading the file
def get_path(url):
#checking if the directory exists
os.makedirs('Music', exist_ok=True)
title = YouTube(url).streams.get_highest_resolution().title
current_directory = pathlib.Path(__file__).parent.absolute()
print(str(current_directory))
#name for the music
name = str(get_digits(16))
YouTube(url).streams.filter(only_audio=True).order_by("bitrate").desc().first().download("Music",name )
return str(str(current_directory) + "/Music/" + name + ".mp3")This gets called on command play
#function to connect to a voice chat
async def join_auth(ctx):
try:
channel = ctx.author.voice.channel
vc = await channel.connect()
return vc
except Exception as e:
logg("Exception occured when joining a voice channel: " + str(e),"error",str(ctx.guild.name), str(ctx.guild.id))The error I get :
C:\Users\Eugene\Desktop\Discord bot/Music/4343941300524002.mp3: No such file or directory
But the directoryC:\Users\Eugene\Desktop\Discord bot\Music
exists and it does contain the4343941300524002.mp3
file. Does anyone know why do I get the error ? -
rtmpproto : Include the full path as app when "slist=" is found
11 novembre 2015, par Martin Storsjö -
Nodejs ffmpeg "The input file path can not be empty" error, but files exist
29 octobre 2022, par 0sziI'm trying to merge an audio file with a video file from the same source (Youtube)


In the following code I first read in the console parameters wirh commander then i define the videoOutput dir and download the highset res. video from youtube with node-ytdl-core. After that I download the audio for the video. and in the callback of the video.on("end", ....)
i call the function merge()


const path = require('path');
const fs = require('fs');
const readline = require("readline");
const ytdl = require('ytdl-core');
const { program } = require('commander');
const ffmpeg = require('ffmpeg');

program
 .option("--url, --url <url>", "Youtube video url")
 .option("--name, --name <name>", "Name of the video in hard drive")

program.parse(process.argv);


const options = program.opts();
let url = options.url;
let name = options.name;

let videoOutput = path.resolve(`./video${name}.mp4`);

let video = ytdl(url, {
 quality: "highestvideo"
});

let starttime = 0;

video.pipe(fs.createWriteStream(videoOutput));

video.once('response', () => {
 starttime = Date.now();
});

video.on('progress', (chunkLength, downloaded, total) => {
 const percent = downloaded / total;
 const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;
 const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;
 readline.cursorTo(process.stdout, 0);
 process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);
 process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);
 process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);
 process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);
 readline.moveCursor(process.stdout, 0, -1);
 });

 video.on('end', () => {
 process.stdout.write('\n\n');
 });


// repeat for audio
video = ytdl(url, {
 quality: "highestaudio"
});
 
starttime = 0;

let audioOutput = path.resolve(`./audio${name}.mp3`);

video.pipe(fs.createWriteStream(audioOutput));

video.once('response', () => {
 starttime = Date.now();
});

video.on('progress', (chunkLength, downloaded, total) => {
 const percent = downloaded / total;
 const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;
 const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;
 readline.cursorTo(process.stdout, 0);
 process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);
 process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);
 process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);
 process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);
 readline.moveCursor(process.stdout, 0, -1);
 });


function merge(){
 ffmpeg()
 .input("./videotest.mp4") //your video file input path
 .input("./audiotest.mp3") //your audio file input path
 .output("./finished.mp4") //your output path
 .outputOptions(['-map 0:v', '-map 1:a', '-c:v copy', '-shortest'])
 .on('start', (command) => {
 console.log('TCL: command -> command', command)
 })
 .on('error', (error) => console.log("errrrr",error))
 .on('end',()=>console.log("Completed"))
 .run() 
}

video.on('end', () => {
 process.stdout.write('\n\n');
 merge();
});

</name></url>


But even though the files are there ffmpeg throws me this error :



I also tried this in the video-end callback, because maybe the audio is finished downloading before the video, still doesn't work. I've also tried to rename the outputDirs for the files and keep the old files and rerun the script so the files are 100% there. Still doesn't work.


I have also tried absolute paths ("C :/..." also with backslash "C :\...") but I still get the error message that the input file path can't be empty.


Appreciate any piece of advise or help !