Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (50)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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, par

    Talk 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, par

    La 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 0szi

    I'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(&#x27;path&#x27;);&#xA;const fs = require(&#x27;fs&#x27;);&#xA;const readline = require("readline");&#xA;const ytdl = require(&#x27;ytdl-core&#x27;);&#xA;const { program } = require(&#x27;commander&#x27;);&#xA;const ffmpeg = require(&#x27;ffmpeg&#x27;);&#xA;&#xA;program&#xA;    .option("--url, --url <url>", "Youtube video url")&#xA;    .option("--name, --name <name>", "Name of the video in hard drive")&#xA;&#xA;program.parse(process.argv);&#xA;&#xA;&#xA;const options = program.opts();&#xA;let url = options.url;&#xA;let name = options.name;&#xA;&#xA;let videoOutput = path.resolve(`./video${name}.mp4`);&#xA;&#xA;let video = ytdl(url, {&#xA;  quality: "highestvideo"&#xA;});&#xA;&#xA;let starttime = 0;&#xA;&#xA;video.pipe(fs.createWriteStream(videoOutput));&#xA;&#xA;video.once(&#x27;response&#x27;, () => {&#xA;  starttime = Date.now();&#xA;});&#xA;&#xA;video.on(&#x27;progress&#x27;, (chunkLength, downloaded, total) => {&#xA;    const percent = downloaded / total;&#xA;    const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;&#xA;    const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;&#xA;    readline.cursorTo(process.stdout, 0);&#xA;    process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);&#xA;    process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);&#xA;    process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);&#xA;    process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);&#xA;    readline.moveCursor(process.stdout, 0, -1);&#xA;  });&#xA;&#xA;  video.on(&#x27;end&#x27;, () => {&#xA;    process.stdout.write(&#x27;\n\n&#x27;);&#xA;  });&#xA;&#xA;&#xA;//   repeat for audio&#xA;video = ytdl(url, {&#xA;  quality: "highestaudio"&#xA;});&#xA;  &#xA;starttime = 0;&#xA;&#xA;let audioOutput = path.resolve(`./audio${name}.mp3`);&#xA;&#xA;video.pipe(fs.createWriteStream(audioOutput));&#xA;&#xA;video.once(&#x27;response&#x27;, () => {&#xA;  starttime = Date.now();&#xA;});&#xA;&#xA;video.on(&#x27;progress&#x27;, (chunkLength, downloaded, total) => {&#xA;    const percent = downloaded / total;&#xA;    const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;&#xA;    const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;&#xA;    readline.cursorTo(process.stdout, 0);&#xA;    process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);&#xA;    process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);&#xA;    process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);&#xA;    process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);&#xA;    readline.moveCursor(process.stdout, 0, -1);&#xA;  });&#xA;&#xA;&#xA;function merge(){&#xA;    ffmpeg()&#xA;    .input("./videotest.mp4") //your video file input path&#xA;    .input("./audiotest.mp3") //your audio file input path&#xA;    .output("./finished.mp4") //your output path&#xA;    .outputOptions([&#x27;-map 0:v&#x27;, &#x27;-map 1:a&#x27;, &#x27;-c:v copy&#x27;, &#x27;-shortest&#x27;])&#xA;    .on(&#x27;start&#x27;, (command) => {&#xA;      console.log(&#x27;TCL: command -> command&#x27;, command)&#xA;    })&#xA;    .on(&#x27;error&#x27;, (error) => console.log("errrrr",error))&#xA;    .on(&#x27;end&#x27;,()=>console.log("Completed"))&#xA;    .run()  &#xA;}&#xA;&#xA;video.on(&#x27;end&#x27;, () => {&#xA;  process.stdout.write(&#x27;\n\n&#x27;);&#xA;  merge();&#xA;});&#xA;&#xA;</name></url>

    &#xA;

    But even though the files are there ffmpeg throws me this error :&#xA;enter image description here

    &#xA;

    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.

    &#xA;

    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.

    &#xA;

    Appreciate any piece of advise or help !

    &#xA;

  • Python yt-dlp and ffmpeg error "merging of multiple formats but ffmpeg is not installed"

    27 mai, par T Tea Tie

    I am using the latest version of yt-dlp with Python 3.9.

    &#xA;

    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.

    &#xA;

    This is my Python code :

    &#xA;

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

    &#xA;

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

    &#xA;

    Then I installed the latest version of FFmpeg from ffmpeg-master-latest-win64-gpl.zip and put ffmpeg.exe, ffplay.exe and ffprobe.exe in Scripts python folder (where yt-dlp.exe is). I also installed ffmpeg using pip install.

    &#xA;

    The Traceback is :

    &#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

    &#xA;

  • FFMPEG Kit issue in Banuba Video SDK : "FFmpegKit failed to start on brand"

    10 mai 2023, par Vivek Makwana

    I am trying to integrate Banuba Video Editor sdk in flutter.

    &#xA;

    The issue i am facing is as below

    &#xA;

    Banuba sdk works with native code for Android in Flutter

    &#xA;

    So Banuba requires FFMPEG dependency to define in Native Android

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

    **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: .&#xA;**  at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:50)&#xA;    at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKit(NativeLoader.java:189)&#xA;    at com.arthenica.ffmpegkit.FFmpegKitConfig.<clinit>(FFmpegKitConfig.java:145)&#xA;    at com.arthenica.ffmpegkit.FFmpegKitConfig.enableFFmpegSessionCompleteCallback(FFmpegKitConfig.java:864)&#xA;    at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.registerGlobalCallbacks(FFmpegKitFlutterPlugin.java:168)&#xA;    at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.init(FFmpegKitFlutterPlugin.java:652)&#xA;    at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.onAttachedToActivity(FFmpegKitFlutterPlugin.java:198)&#xA;    at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.attachToActivityInternal(FlutterEngineConnectionRegistry.java:351)&#xA;    at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.attachToActivity(FlutterEngineConnectionRegistry.java:324)&#xA;    at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:194)&#xA;    at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:498)&#xA;    at com.sound.it.MainActivity.onCreate(MainActivity.kt:43)&#xA;    at android.app.Activity.performCreate(Activity.java:8000)&#xA;    at android.app.Activity.performCreate(Activity.java:7984)&#xA;    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)&#xA;    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)&#xA;    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)&#xA;    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)&#xA;    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)&#xA;    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)&#xA;    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)&#xA;    at android.os.Handler.dispatchMessage(Handler.java:106)&#xA;    at android.os.Looper.loop(Looper.java:223)&#xA;    at android.app.ActivityThread.main(ActivityThread.java:7656)&#xA;    at java.lang.reflect.Method.invoke(Native Method)&#xA;    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)&#xA;    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)&#xA;**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"...**&#xA;    at java.lang.Runtime.loadLibrary0(Runtime.java:1087)&#xA;    at java.lang.Runtime.loadLibrary0(Runtime.java:1008)&#xA;    at java.lang.System.loadLibrary(System.java:1664)&#xA;    at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:48)&#xA;</clinit>

    &#xA;

    Looking for the solutions

    &#xA;