Recherche avancée

Médias (0)

Mot : - Tags -/médias

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (23)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (5687)

  • Smartly concatenating gopro mp4 files - file-001.mp4 + file-002.mp4

    12 décembre 2017, par molly78

    Hello much smarter than me people out there...

    I have a folder of GoPro files which I have already renamed using this awesome utility : https://github.com/kcha/gopro_renamer

    However, I now have a folder of 110 files which should make up about 50 continuous videos...

    Some of which have only filename-001.mp4 parts, some are filename-001.mp4 and filename-002.mp4 parts. It could go on an on to say 10 parts per video, for argument sake.

    I’d like to get a hand with a script that would scan the folder and then join all the parts together into a new file.

    In windows 10 I know I can do a simple

    copy /b "C:\Filename-001.mp4" + "C:\Filename-002.mp4" Filename.mp4

    Just a bit lost how to loop thru this scenario with a (python is fine) script. I do not wish to re-encode them, simply join the parts that correspond to the base filename.

    So go from files looking like

    filename1-001.mp4 - 87 MB
    filename2-001.mp4 - 100 MB
    filename2-002.mp4 - 100 MB
    filename2-003.mp4 - 22 MB
    filename3-001.mp4 - 100 MB
    filename3-002.mp4 - 34 MB

    after concatenating the parts it would look like :

    filename1.mp4 - 87 MB (nothing done other than rename)
    filename2.mp4 - 222 MB (all joined)
    filename3.mp4 - 134 MB (all joined)

    Your help is greatly appreciated.

  • How to embed ffmpeg and ffprobe to a python gui.exe file in Windows or Mac ?

    10 décembre 2023, par sburakc

    I prepared a Pyhton Gui script in Windows that gets a subtitle then converts an audio file. But at the end of the script I realized that the script uses the ffmpeg from my computer's local ffmpeg and didn't give any error. But, when I try in another computer that doesn't include ffmpeg, it's given the error in the terminal below :
pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work Processing text 1/2 pydub\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work Error occurred: [WinError 2] System cannot find the specified file

    


    I tried many ways such as :

    


    pyinstaller -F --add-data "./ffmpeg/*;./ffmpeg/" gui.py

    


    pyinstaller -F --add-data "C:\Users\sbura\Desktop\gom\ffmpeg\ffmpeg.exe;ffmpeg" --add-data "C:\Users\sbura\Desktop\gom\ffmpeg\ffprobe.exe;ffmpeg" gui.py

    


    OR

    


    tried to gui.spec file adding :

    


    exe = EXE(pyz,
          a.scripts,
          binaries=[('C:\\Users\\sbura\\Desktop\\gom\\ffmpeg_bin\\ffmpeg.exe', 'ffmpeg.exe'), 
                    ('C:\\Users\\sbura\\Desktop\\gom\\ffmpeg_bin\\ffprobe.exe', 'ffprobe.exe')],
          a.zipfiles,
          a.datas,
          [],
          ...



    


    I also created a folder with the name of "ffmpeg" where I put the files of ffmpeg.exe and ffprobe.exe.

    


    Also I added to my code that :

    


    import sys
from pydub import AudioSegment

def resource_path(relative_path):
    if hasattr(sys, '_MEIPASS'):
        return os.path.join(sys._MEIPASS, relative_path)
    return os.path.join(os.path.abspath("."), relative_path)

AudioSegment.converter = resource_path('ffmpeg\\ffmpeg.exe')
AudioSegment.ffprobe = resource_path('ffmpeg\\ffprobe.exe')


    


    But any of these didn't work. Thank you for your help.

    


  • Iterate recursively in every subfolder and run a batch file

    6 août 2018, par Gokul Nair

    Please look at the following scenario wherein a folder A has many subfolders with different names. These subfolders have n number of .jpg files, which I am trying to scale and crop.

    Folder A\
     SubFolder 01\*.jpg
     SubFolder 02\*.jpg
     .
     .
     .
     SubFolder xx\*.jpg

    These sub-folders are with different names and do not have a trend when it comes to its names.

    I have created a batch file which would scale and crop images. This is working perfectly. I need to run the following command (name of file : ScaleCrop.bat) in each SubFolder xx :

    for %%I in (.) do set CurrDirName=%%~nxI
    for %%a in ("*.JPG") do ffmpeg -i "%%a" -vf ^"scale=-1:260, crop=250:250^" "..\ScaledImages\%CurrDirName%\%%a.JPG"
    for %%a in ("*.JPG") do ffmpeg -i "%%a" -vf ^"scale=260:-1, crop=250:250^" "..\ScaledImages\%CurrDirName%\%%a.JPG"
    pause

    The command Scales and crops the image in the folder and saves these files in to a folder named SacledImages, which too has subfolders of the same name (SubFolder 01, SubFolder 02,…,SubFolderxx).

    I have created another .bat file which I used to copy ScaleCrop.bat to each subfolder.

    for /d %%a in ("C:\Users\Name\Desktop\Folder A\*") do copy " C:\Users\Name\Desktop\Folder A\ScaleCrop.bat" "%%a"

    How could I code a batch file run and execute ScaleCrop.bat from each of these subfolders ?

    I tried using the following code, but this just calls the .bat file inside each subfolder, however it is not executing :

    for /f %%f in ('dir /ad /b') do start %%f\ScaleCrop.bat

    I Tried the following as well, this does the trick, but all images are getting overwritten as the scaled-cropped images are saved on to /SacledImages Folder and not inside ScaledImages/SubFolderxx :

    for /r "C:\ Users\Name\Desktop\Folder A " %%a in (.) do (
     pushd %%a
    for %%I in (.) do set CurrDirName=%%~nxI
    for %%a in ("*.JPG") do ffmpeg -i "%%a" -vf ^"scale=-1:260, crop=250:250^" "..\ScaledImages\%CurrDirName%\%%a.JPG"
    for %%a in ("*.JPG") do ffmpeg -i "%%a" -vf ^"scale=260:-1, crop=250:250^" "..\ScaledImages\%CurrDirName%\%%a.JPG"
    pause
     popd
     )