Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (75)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

Sur d’autres sites (8488)

  • Bash script for re-encode file if re-encoded file does not already exist for all in directory

    25 octobre 2022, par steve

    I have a bash script that takes 1 argument (a file) and runs an ffmpeg command to create a duplicate of the file encoded with a different codec.

    


    #!/bin/bash

ffmpeg -i "$1" -vn -acodec aac "$(basename "${1/.wav}").aac"


    


    I just want to modify this bash script so instead of taking an argument, it instead just checks for all files in the directory to see if the re-encoded file already exists, and if it does not, creates it. Does anyone know how to do this ?

    


    Thanks for your help

    


    EDIT : the solution below is working with slight modification :

    


    #!/bin/bash

for file in ./*.wav; do
    [ -e "$file" ] || continue # check if any file exists
    if [[ ! -f "${file}.aac" ]]; then
       ffmpeg -i "${file}" -vn -acodec aac "$(basename "${file}").aac"
    fi;
done;


    


  • .exe file, works different than .py file

    29 août 2024, par r_b

    I've made the YouTube Dowbloader App. Everything is working properly (run in PyCharm), but when I try to make it into an executable with pyinstaller, it does not work.

    


    This is the link to the repo :

    


    YouTube Downloader

    


    Command for making exe file :
pyinstaller project.spec

    


    project.spec file :

    


    # project.spec
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(
    ['gui.py'],
    pathex=['.'],
    binaries=[],
    datas=[('static_files/*', 'static_files')],
    hiddenimports=[],
    hookspath=[],
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    [],
    exclude_binaries=True,
    name='YouTube Downloader',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    icon='static_files/logo.ico'
)
coll = COLLECT(
    exe,
    a.binaries,
    a.zipfiles,
    a.datas,
    strip=False,
    upx=True,
    upx_exclude=[],
    name='YouTube Downloader'
)

app = BUNDLE(
    coll,
    name='YouTube Downloader',
    icon='static_files/logo.ico',
    bundle_identifier=None
)


    


    The file structure :

    


    project/
├── backend.py
├── gui.py
├── temp_mp3 # temporary mp3 for Audio player
├── static_files/
│   ├── icon.ico
│   ├── image1.png
│   ├── image2.png
│   └── setup.json  # setup.json file
└── project.spec


    


    Search block diagram :
Search block diagram

    


    After searching and fetching the YouTube URL, the app downloads an MP3 file (in temp_mp3) for the audio player section.

    


    And here is the difference between .exe and the .py, when I run .exe the APP downloads the audio segment from the URL in .webm format and stops there. Even if the format is different, it should be converted to MP3 (in PyCharm does).

    


    Find possible problem with moviepy/ffmpeg.exe (library for converting files).

    


    project.spec

    


    a = Analysis(
    ['gui.py'],
    pathex=['.'],
    binaries=[('C:\\path\\to\\ffmpeg\\bin\\ffmpeg.exe', 'ffmpeg')],
    datas=[('static_files/*', 'static_files')],


    


    Added binaries => path to ffmpeg.exe , but it still doesn't work.

    


  • ffmpeg same input as output file (temporary file needed but how ?)

    7 janvier 2021, par tomato planet

    I don't know much about .bat files or ffmpeg and spent the last hour on the internet searching how I can solve my problem, but didn't find anything.
I want to make .bat file which removes the audio of a video and replaces it with the no-audio version. I already made a folder with my .bat file and ffmpeg and added an option to the context menu to open my .bat file.

    


    That's my .bat file currently :

    


    ffmpeg -i %1 -an -vcodec copy %1


    


    But ffmpeg can't overwrite the file it's currently reading. It would be great if somebody helps me how to create a temporary file without the audio, and then replace the input file with the temporary one.

    


    Thanks a lot in advance !