Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (84)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • 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 ;

Sur d’autres sites (8365)

  • youtube-dl doesn't see ffmpeg in the executable

    30 novembre 2019, par Михаил Муратов

    I am writing a program to download music and videos via youtube-dl in python. Next, I pack the script into an executable file via pyinstaller.

    The problem is that youtube-dl (in the executable) doesn’t see ffmpeg and ffprobe, even though I add them to the spec file.

    As far as I know youtube-dl has the ffmpeg_location parameter, but that’s only in the console version. Maybe it is also for python ? But I didn’t find any information about it.

    How do I solve the problem ?


    command to create executable :

    pyinstaller --upx-dir=c:\users\exe-builder c:\users\exe-builder\youtubedownloader\main.spec

    .spec file :

    # -*- mode: python -*
    block_cipher = None

    a = Analysis(['C:\\Users\\Exe-Builder\\YoutubeDownloader\\main.py'],
                pathex=['C:\\Users\\Exe-Builder\\YoutubeDownloader'],
                binaries=[],
                datas=[],
                hiddenimports=[],
                hookspath=[],
                runtime_hooks=[],
                excludes=[],
                win_no_prefer_redirects=False,
                win_private_assemblies=False,
                cipher=block_cipher,
                noarchive=False)

    a.binaries += [('ffmpeg.exe','C:\\Users\\Exe-Builder\\YoutubeDownloader\\ffmpeg.exe', "Binary"),
                  ('ffprobe.exe','C:\\Users\\Exe-Builder\\YoutubeDownloader\\ffprobe.exe', "Binary")]

    pyz = PYZ(a.pure, a.zipped_data,
                cipher=block_cipher)
    exe = EXE(pyz,
             a.scripts,
             a.binaries,
             a.zipfiles,
             a.datas,
             [],
             name='MediaDownloader',
             debug=False,
             bootloader_ignore_signals=False,
             strip=False,
             upx=True,
             upx_exclude=['vcruntime140.dll'],
             runtime_tmpdir=None,
             console=True)

    very small example :

    import youtube_dl

    url = 'https://www.youtube.com/watch?v=MIk55C1s0ns'
    outtmpl = '\\%(title)s.%(ext)s'
    ydl_opts = {'format': 'bestaudio/best',
               'outtmpl': outtmpl,
               'postprocessors': [{'key': 'FFmpegExtractAudio',
                                   'preferredcodec': 'mp3',
                                   'preferredquality': '128'}]}

    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
       info_dict = ydl.extract_info(url, download=True)

    error message :

    youtube_dl.utils.DownloadError: ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one.

  • converting complex ffmpeg command to python3

    14 janvier 2020, par Martin

    I have a complicated ffmpeg command that takes audio and image as input, and exports a music video.

    ffmpeg -loop 1 -framerate 2 -i "front.png" -i "testWAVfile.wav" \
       -vf "scale=2*trunc(iw/2):2*trunc(ih/2),setsar=1,format=yuv420p" \
       -c:v libx264 -preset medium -tune stillimage \
       -crf 18 -c:a aac -shortest -vf scale=1920:1080  "outputVideo.mp4"

    I’m trying to write a python3 program cmdMusicVideo.py which will run this command in pure Python. I know that to run this command you need the ffmpeg program, I’m trying to write it in pure python3, where I’m not just spawning a separate process to run the bash command where the user needs to have ffmpeg installed.

    I’ve looked at the various solutions to running ffmpeg in python3, and they’re either :

    • A : Just running the ffmpeg command as a subprocess, where the user needs to have ffmpeg installed
    • or B : An ffmpeg pip program like ffmpeg-python

    The pip libraries I’ve checkout out all use incredibly different formatting, and I haven’t found a way to replicate my ffmpeg command. I’ve searched the loop command in their python package documentation and it doesn’t appear anywhere.

    Is there a way to convert my ffmpeg command into a python3 program where the user doesn’t need to already have ffmpeg installed on their computer ?

    The plan is to eventually turn this into its own pip package, and my concern is that if I use the A method, there would be a case where somebody tries to run my pip command but doesn’t have ffmpeg installed on their terminal (maybe using a python3 specific terminal ?)

  • ffmpeg-python : mp3 + jpg = mp4

    15 janvier 2020, par Martin

    I’m trying to make a python program using ffmpeg-python that will combine an audio file and image into a music video mp4 file. I’ve done this in a working ffmpeg bash command before, but now I’m trying to do it in a pure python3 program, I’ve ran some of the example ffmpeg python applications to ensure it works, but haven’t found any examples related to my case. So far I have this :

    import ffmpeg
    print('test')

    audioInput = ffmpeg.input('fighter.mp3')
    imageInput = ffmpeg.input('front.jpg')
    (
       ffmpeg
       .filter([audioInput, imageInput], 'overlay', 10, 10)
       .output('out.mp4')
       .run()
    )

    But that just leads to an error saying Stream specifier '' in filtergraph description [0][1]overlay=10:10[s0] matches no streams.. Can anyone with experience using this ffmpeg-python library help ?