Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (57)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (5996)

  • Pass argument through .bat file to .exe file that converted by 'PyInstaller'

    23 novembre 2019, par Ayoub Ocarina

    I got an error when passing arguments through .bat file to .exe file that converted by PyInstaller
    In my python script I import the following libraries :

    import time
    from contextlib import closing
    from PIL import Image
    import subprocess
    from audiotsm import phasevocoder
    from audiotsm.io.wav import WavReader, WavWriter
    from scipy.io import wavfile
    import numpy as np
    import re
    import math
    from shutil import copyfile, rmtree
    import os
    import argparse
    from pytube import YouTube
    import cv2
    from datetime import datetime
    import datetime
    import os.path
    import shutil
    import webbrowser

    and this is my .bat file content :

    mode con: cols=100 lines=40
    @echo off
    COLOR 0A
    title VideoCuts
    :LOOP
    if "%~1"=="" goto :END
    ShortCut.exe --input_file "%~1" --silent_threshold 0.1 --silent_speed 9999999.00 --frame_margin 5 --sample_rate 48000 --frame_quality 1 --output_file "%~n1_%date:~-10,2%%date:~-7,2%%date:~-4,4%_%time:~0,2%%time:~3,2%%time:~6,2%_videocuts.mp4"
    pause

    I also tested using this .bat file :

    ShortCut.exe --input_file="%~1" --silent_threshold=0.1 --silent_speed=9999999.00 --frame_margin=5 --sample_rate=48000 --frame_quality=1 --output_file="videocuts.mp4"

    this is my error message images during processing

  • After downloading the file i got 0 byte file size, I dont know how to solve this error ? [closed]

    7 octobre 2024, par Saurabh Chauhan

    This is the handler function which converts a given format to another format but when i provide additional options(like trim audio,bitrate,codec,sample rate etc) to audio and video then it gives me 0 byte file after converting and if i do not include additional options then it gave me correct file.

    


    Please look into this and provide me solution.

    


    const handleConvert = async () => {

  if (!ffmpeg) return;

  setConverting(true);

  for (let uploadedFile of uploadedFiles) {
    const { file } = uploadedFile;
    const fileNameWithoutExtension = getFileNameWithoutExtension(file.name);
    const inputFile = file.name;
    let outputFile;
    let outputFormat;
    const { bitrate, channels, codec, sampleRate, trimStart, trimEnd, volume } = optionsdata;

    try {
      await ffmpeg.writeFile(inputFile, await fetchFile(file));
      let command = ['-i', inputFile];
      // Handle audio conversion with advanced options
> if (supportedAudioFormats.some(ext => file.name.endsWith(ext)) || supportedVideoFormats.some(ext => file.name.endsWith(ext))) {
        outputFile = `${fileNameWithoutExtension}.${audioFormat}`;
        outputFormat = audioFormat;

        // Add trim options if they exist
        if (trimStart && trimEnd) {
          command.push('-ss', trimStart, '-to', trimEnd);
        } else if (trimStart) {
          command.push('-ss', trimStart);
        }

        // Adjust volume if specified
        if (volume && volume !== 'no change') {
          command.push('-filter:a', `volume=${volume}`);
        }
        
        // Apply advanced audio settings like codec, bitrate, and channels
        if (codec) {
          command.push('-c:a', codec);
        }
        if (bitrate) {
          command.push('-b:a', `${bitrate}k`);
        }
> if (channels && channels !== 'no change') {
          command.push('-ac', channels === 'mono' ? '1' : '2');
        }
        if (sampleRate && sampleRate !== 'no change') {
          command.push('-ar', sampleRate);
        }

        // Add output file to the command
        command.push(outputFile);
        console.log('Command Array:', command);
        // Execute FFmpeg command
        await ffmpeg.exec(command);

      } else if (supportedImageFormats.some(ext => file.name.endsWith(ext))) {
        // Image conversion logic
        outputFile = `${fileNameWithoutExtension}.${imageFormat}`;
        outputFormat = imageFormat;
        command.push(outputFile);
        await ffmpeg.exec(command);

      } else if (supportedSubtitleFormats.some(ext => file.name.endsWith(ext))) {
        // Subtitle conversion logic
        outputFile = `${fileNameWithoutExtension}.${subtitleFormat}`;
        outputFormat = subtitleFormat;
        command.push(outputFile);
        await ffmpeg.exec(command);

      } else {
        console.error('Unsupported file type: ', file.name);
        continue; // Skip unsupported files
      }
      // Create Blob and URL for the converted file
      const data = await ffmpeg.readFile(outputFile);
      const convertedBlob = new Blob([data.buffer], {
        type: outputFormat === 'png' ? 'image/png' : `audio/${outputFormat}` || `text/vtt`,
      });
      const convertedUrl = URL.createObjectURL(convertedBlob);

      setConvertedFiles((prevFiles) => [
        ...prevFiles,
        { name: outputFile, url: convertedUrl, format: outputFormat },
      ]);
    } catch (error) {
      console.error('Conversion error:', error);
    }
  }

  setConversionFinished(true);
  setConverting(false);
  setoptionsdata({
    'codec':'',
    'bitrate':'',
    'channels':'',
    'volume':'',
    'sampleRate':'',
    'trimStart':'',
    'trimEnd':''
  });
};



    


  • pass argement through .bat file to .exe file that converted by Pyinstaller

    23 novembre 2019, par Ayoub Ocarina

    i got an error whene passing argements through .bat file to .exe file that converted by Pyinstaller
    my python script have the following libraries :

    import time
    from contextlib import closing
    from PIL import Image
    import subprocess
    from audiotsm import phasevocoder
    from audiotsm.io.wav import WavReader, WavWriter
    from scipy.io import wavfile
    import numpy as np
    import re
    import math
    from shutil import copyfile, rmtree
    import os
    import argparse
    from pytube import YouTube
    import cv2
    from datetime import datetime
    import datetime
    import os.path
    import shutil
    import webbrowser

    and this is my .bat file content :

    mode con: cols=100 lines=40
    @echo off
    COLOR 0A
    title VideoCuts
    :LOOP
    if "%~1"=="" goto :END
    ShortCut.exe --input_file "%~1" --silent_threshold 0.1 --silent_speed 9999999.00 --frame_margin 5 --sample_rate 48000 --frame_quality 1 --output_file "%~n1_%date:~-10,2%%date:~-7,2%%date:~-4,4%_%time:~0,2%%time:~3,2%%time:~6,2%_videocuts.mp4"
    pause

    i also tested with this .bat file :

    ShortCut.exe --input_file="%~1" --silent_threshold=0.1 --silent_speed=9999999.00 --frame_margin=5 --sample_rate=48000 --frame_quality=1 --output_file="videocuts.mp4"

    this is my error message images during processing