
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (50)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (7478)
-
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 !


-
Python yt-dlp and ffmpeg error "merging of multiple formats but ffmpeg is not installed"
27 mai, par T Tea TieI am using the latest version of
yt-dlp
with Python 3.9.

I am trying to download a youtube video in mp4 format with outputname as the
youtubeid.mp4
and with best resolution not more than 4K.

This is my Python code :


ytid = '4cDqaLxrt6Q'
url = 'https://www.youtube.com/watch?v='+ytid
output_filename = ytid+".mp4"
 
with YoutubeDL({'format': 'bestvideo[height<=?4K]+bestaudio/best', 'output': output_filename}) as ydl:
 ydl.download(url)`#TODO debug FFmpeg and check if outputname is ok



I expected to have an
.mp4
file in my current working directory.

Then I installed the latest version of
FFmpeg
fromffmpeg-master-latest-win64-gpl.zip
and putffmpeg.exe
,ffplay.exe
andffprobe.exe
in Scripts python folder (whereyt-dlp.exe
is). I also installedffmpeg
usingpip install
.

The
Traceback
is :



[youtube] Extracting URL : https://www.youtube.com/watch?v=4cDqaLxrt6Q
[youtube] 4cDqaLxrt6Q : Downloading webpage
[youtube] 4cDqaLxrt6Q : Downloading android player API JSON
[youtube] 4cDqaLxrt6Q : Downloading MPD manifest
[youtube] 4cDqaLxrt6Q : Downloading MPD manifest
[info] 4cDqaLxrt6Q : Downloading 1 format(s) : 243+251
ERROR : You have requested merging of multiple formats but ffmpeg is not installed. Aborting due to —abort-on-error
Traceback (most recent call last) :


File "C :\Users\t\OneDrive\Documents\Python Scripts\project\main.py", line 88, in 
ydl.download(url)


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3353, in download
self.__download_wrapper(self.extract_info)(


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3328, in wrapper
res = func(*args, **kwargs)


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1486, in extract_info
return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1497, in wrapper
return func(self, *args, **kwargs)


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1594, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1653, in process_ie_result
ie_result = self.process_video_result(ie_result, download=download)


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 2767, in process_video_result
self.process_info(new_info)


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3189, in process_info
self.report_error(f'msg. Aborting due to —abort-on-error')


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1007, in report_error
self.trouble(f'self._format_err("ERROR :", self.Styles.ERROR) message', *args, **kwargs)


File "C :\Users\t\anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 947, in trouble
raise DownloadError(message, exc_info)


DownloadError : ERROR : You have requested merging of multiple formats but ffmpeg is not installed. Aborting due to —abort-on-error




-
FFMPEG Kit issue in Banuba Video SDK : "FFmpegKit failed to start on brand"
10 mai 2023, par Vivek MakwanaI am trying to integrate Banuba Video Editor sdk in flutter.


The issue i am facing is as below


Banuba sdk works with native code for Android in Flutter


So Banuba requires FFMPEG dependency to define in Native Android


And I am already using 'ffmpeg_kit_flutter' plugin for flutter.


So both the FFMPEG kits are conflicted and some of the functions are not found. due to that I am receiving the below error.


When the app is launched I am receiving this Crash as mentioned


**java.lang.Error: FFmpegKit failed to start on brand: google, model: sdk_gphone_x86, device: generic_x86_arm, api level: 30, abis: x86 armeabi-v7a armeabi, 32bit abis: x86 armeabi-v7a armeabi, 64bit abis: .
** at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:50)
 at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKit(NativeLoader.java:189)
 at com.arthenica.ffmpegkit.FFmpegKitConfig.<clinit>(FFmpegKitConfig.java:145)
 at com.arthenica.ffmpegkit.FFmpegKitConfig.enableFFmpegSessionCompleteCallback(FFmpegKitConfig.java:864)
 at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.registerGlobalCallbacks(FFmpegKitFlutterPlugin.java:168)
 at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.init(FFmpegKitFlutterPlugin.java:652)
 at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.onAttachedToActivity(FFmpegKitFlutterPlugin.java:198)
 at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.attachToActivityInternal(FlutterEngineConnectionRegistry.java:351)
 at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.attachToActivity(FlutterEngineConnectionRegistry.java:324)
 at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:194)
 at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:498)
 at com.sound.it.MainActivity.onCreate(MainActivity.kt:43)
 at android.app.Activity.performCreate(Activity.java:8000)
 at android.app.Activity.performCreate(Activity.java:7984)
 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
 at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
 at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
 at android.os.Handler.dispatchMessage(Handler.java:106)
 at android.os.Looper.loop(Looper.java:223)
 at android.app.ActivityThread.main(ActivityThread.java:7656)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
**Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "av_log_default_callback" referenced by "/data/app/~~umF3qlB9U53L4peU9nKYuQ==/com.sound.it-agqiFlNmMe17AHMK5gYIHw==/lib/x86/libffmpegkit.so"...**
 at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
 at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
 at java.lang.System.loadLibrary(System.java:1664)
 at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:48)
</clinit>


Looking for the solutions