Recherche avancée

Médias (91)

Autres articles (69)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (12231)

  • mmsh:_implement a minimal mmsh_seek() so the stream position can be found out.

    31 octobre 2011, par Michael Niedermayer

    mmsh:_implement a minimal mmsh_seek() so the stream position can be found out.

  • fate : fix MSS2 tests on big endian

    10 janvier 2014, par Michael Niedermayer
    fate : fix MSS2 tests on big endian
    

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] tests/fate/microsoft.mak
  • python [WinError 2] the System Cannot Find the File Specified

    15 août 2024, par user26831166

    Code cant create a certain file&#xA;The thing is code isn't mine a took it from a friend and my friend get it from another person&#xA;and this 2 person can run code without any problem&#xA;but i have.

    &#xA;

    import os&#xA;import random&#xA;import shutil&#xA;import subprocess&#xA;&#xA;# Путь к папке с видео&#xA;video_folder = r&#x27;D:\bots\ttvidads\VID\Videorez&#x27;&#xA;&#xA;# Путь к папке для сохранения результатов&#xA;output_folder = r&#x27;D:\bots\ttvidads\VID\ZAGOTOVKI\Videopod1&#x27;&#xA;&#xA;# Очищаем содержимое конечной папки перед сохранением&#xA;for file in os.listdir(output_folder):&#xA;    file_path = os.path.join(output_folder, file)&#xA;    try:&#xA;        if os.path.isfile(file_path):&#xA;            os.unlink(file_path)&#xA;    except Exception as e:&#xA;        print(f"Failed to delete {file_path}. Reason: {e}")&#xA;&#xA;# Получаем список видеофайлов&#xA;video_files = [os.path.join(video_folder, file) for file in os.listdir(video_folder) if file.endswith((&#x27;.mp4&#x27;, &#x27;.avi&#x27;))]&#xA;&#xA;# Выбираем случайное видео&#xA;random_video = random.choice(video_files)&#xA;&#xA;# Получаем длительность видео в секундах&#xA;video_duration_command = f&#x27;ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "{random_video}"&#x27;&#xA;video_duration_process = subprocess.Popen(video_duration_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)&#xA;video_duration_output, _ = video_duration_process.communicate()&#xA;video_duration = float(video_duration_output)&#xA;&#xA;# Выбираем случайное начальное время для вырезания&#xA;random_start = random.randrange(0, int(video_duration) - 19, 8)&#xA;&#xA;# Получаем ширину и высоту исходного видео&#xA;video_info_command = f&#x27;ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "{random_video}"&#x27;&#xA;video_info_process = subprocess.Popen(video_info_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)&#xA;video_info_output, _ = video_info_process.communicate()&#xA;video_width, video_height = map(int, video_info_output.strip().split(b&#x27;x&#x27;))&#xA;&#xA;# Вычисляем новые координаты x1 и x2 для обрезки&#xA;max_x1 = video_width - int(video_height * 9 / 16)&#xA;random_x1 = random.randint(0, max_x1)&#xA;random_x2 = random_x1 &#x2B; int(video_height * 9 / 16)&#xA;&#xA;# Формируем команду для FFmpeg для выборки случайного отрезка видео с соотношением 9:16&#xA;ffmpeg_command = f&#x27;ffmpeg -hwaccel cuda -ss {random_start} -i "{random_video}" -t 19 -vf "crop={random_x2-random_x1}:{video_height}:{random_x1}:0" -c:v h264_nvenc -preset default -an -c:a aac -b:a 128k "{output_folder}\\temp.mp4"&#x27;&#xA;&#xA;# Выполняем команду с помощью subprocess&#xA;subprocess.run(ffmpeg_command, shell=True)&#xA;&#xA;# Изменяем яркость, контрастность и размываем видео&#xA;brightness_factor = random.uniform(-0.18, -0.12)  # Случайный коэффициент яркости&#xA;contrast_factor = random.uniform(0.95, 1.05)  # Случайный коэффициент контрастности&#xA;blur_factor = random.uniform(4, 5)  # Случайный коэффициент размытия&#xA;&#xA;# Формируем команду для FFmpeg для изменения яркости, контрастности и размытия видео&#xA;ffmpeg_modify_command = f&#x27;ffmpeg -hwaccel cuda -i "{output_folder}\\temp.mp4" -vf "eq=brightness={brightness_factor}:contrast={contrast_factor},boxblur={blur_factor}:{blur_factor}" -c:v h264_nvenc -preset default -an -c:a aac -b:a 128k "{output_folder}\\temp_modify.mp4"&#x27;&#xA;&#xA;# Выполняем команду с помощью subprocess&#xA;subprocess.run(ffmpeg_modify_command, shell=True)&#xA;&#xA;# Растягиваем видео до нужного разрешения (1080x1920)&#xA;ffmpeg_stretch_command = f&#x27;ffmpeg -hwaccel cuda -i "{output_folder}\\temp_modify.mp4" -vf "scale=1080:1920" -c:v h264_nvenc -preset default -an -c:a aac -b:a 128k -r 30 "{output_folder}\\final_output.mp4"&#x27;&#xA;&#xA;# Выполняем команду с помощью subprocess&#xA;subprocess.run(ffmpeg_stretch_command, shell=True)&#xA;&#xA;# Удаляем временные файлы&#xA;os.remove(os.path.join(output_folder, &#x27;temp.mp4&#x27;))&#xA;os.remove(os.path.join(output_folder, &#x27;temp_modify.mp4&#x27;))&#xA;&#xA;print("Видеофайл успешно обработан и сохранен.")&#xA;

    &#xA;

    Error i got after run the code

    &#xA;

    = RESTART: D:\Bots\2vidpod.py&#xA;Traceback (most recent call last):&#xA;  File "D:\Bots\2vidpod.py", line 71, in <module>&#xA;    os.remove(os.path.join(output_folder, &#x27;temp.mp4&#x27;))&#xA;FileNotFoundError: [WinError 2] Не удается найти указанный файл: &#x27;D:\\bots\\ttvidads\\VID\\ZAGOTOVKI\\Videopod1\\temp.mp4&#x27;&#xA;</module>

    &#xA;

    so things i checked is&#xA;path is right&#xA;programs is installed FFMPEG and PYTHON all additional libraries downloaded&#xA;i pretty sure error caused by regular path and i wanna know if absolute path can do the thing

    &#xA;