Recherche avancée

Médias (91)

Autres articles (8)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

Sur d’autres sites (1798)

  • FFmpeg to convert "many" mp3 files to wav files

    21 janvier 2020, par ab123

    I wish to convert some hundred thousand small-duration(< 5 sec) mp3 files to wav files. But the process presently takes several days to complete. I would like to know if there is a faster way than what I am currently doing.

    Currently, I am just spawning threads and calling ffmpeg via subprocess module in Python. When I use subprocess.Popen() I quickly get memory errors because too many threads get started. Using subprocess.call() works error-free. Additionally, I am using threading.Semaphore() to limit maximum number of working threads.

    Code :

    import threading
    import subprocess

    maxthreads = 50
    sema = threading.Semaphore(value=maxthreads)
    threads = []

    def task(mp3_path):  # mp3 file path taken from the list of file_ids `mp3_list` below
       sema.acquire()
       subprocess.call(['ffmpeg', '-y',  '-i', mp3_path, '-preset', 'ultrafast', '-ar', '8000', wav_file_path])
       # provide file path and destination path
       sema.release()


    def conv_to_wav_():
       for i in mp3_list:
           thread = threading.Thread(target=task,args=([i]))
           threads.append(thread)
           thread.start()

    I am working on Windows 10 and have a CUDA-enabled Nvidia GPU available as well, if that’s helpful.

  • Ffmpeg concatenate video file with hw acceleration using cuvid

    9 mars 2023, par Jack Kwakman

    I am trying to use Nvidia hardware acceleration for FFmpeg using cuvid. I want to merge multiple h264 / mp4 files using a complex filter (simplified example) :

    &#xA;&#xA;

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input.ts -y -fflags &#x2B;genpts -filter_complex "[0:v:0][0:a:0]concat=n=1:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" output.mp4&#xA;

    &#xA;&#xA;

    I use the following version FFmpeg and Ubuntu 16.04 :

    &#xA;&#xA;

    version 3.4.2-1~16.04.york0.2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609&#xA;

    &#xA;&#xA;

    If i run the command i get the following error :

    &#xA;&#xA;

    Impossible to convert between the formats supported by the filter &#x27;Parsed_concat_0&#x27; and the filter &#x27;auto_scaler_0&#x27;&#xA;Error reinitializing filters!&#xA;Failed to inject frame into filter network: Function not implemented&#xA;

    &#xA;&#xA;

    When i remove the hwaccel flag the command runs but i get a massive CPU load. How can i use a concat complex_filter in combination with cuvid hw acceleration ?

    &#xA;&#xA;

    SOLUTION

    &#xA;&#xA;

    The concat demuxing worked. The output of the encoder is now in h264. I group the files in a list.txt :

    &#xA;&#xA;

    file &#x27;/path/to/file1&#x27;&#xA;file &#x27;/path/to/file2&#x27;&#xA;file &#x27;/path/to/file3&#x27;&#xA;

    &#xA;&#xA;

    Then run ffmpeg :

    &#xA;&#xA;

    ffmpeg -y -f concat -safe 0 -i list.txt -c copy result.mp4&#xA;

    &#xA;

  • FFmpeg Impossible to convert between the formats supported by the filter

    17 avril 2020, par Changer098

    I'm trying to do GPU accelerated HDR tonemapping (HDR->SDR) with ffmpeg and opencl, but I keep running into this error : Impossible to convert between the formats supported by the filter &#x27;Parsed_hwupload_1&#x27; and the filter &#x27;auto_scaler_1&#x27;.
    &#xA;I've tried using the documentation filtergraph with this command

    &#xA;&#xA;

    ffmpeg -loglevel debug -y -hwaccel cuvid -init_hw_device opencl:0.0 -threads 1 -i \ &#xA;hdr.mkv -filter_complex&#xA;"format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010, \&#xA;hwdownload,format=p010" \&#xA;-c:a copy -scodec copy -c:v hevc_nvenc -preset slow -level 5.1 -rc:v vbr_hq -cq:v \&#xA; 19 -b:v 17500k \&#xA;-maxrate:v 22000k ~/Desktop/sdr.mkv&#xA;

    &#xA;&#xA;

    which results in this log

    &#xA;&#xA;

    Applying option init_hw_device (initialise hardware device) with argument opencl:0.0.&#xA;[AVHWDeviceContext @ 0x5587b5542fc0] 1 OpenCL platforms found.&#xA;[AVHWDeviceContext @ 0x5587b5542fc0] 1 OpenCL devices found on platform "NVIDIA CUDA".&#xA;[AVHWDeviceContext @ 0x5587b5542fc0] 0.0: NVIDIA CUDA / Graphics Device&#xA;[AVHWDeviceContext @ 0x5587b5542fc0] The cl_intel_va_api_media_sharing extension is required for QSV to OpenCL mapping.&#xA;[AVHWDeviceContext @ 0x5587b5542fc0] QSV to OpenCL mapping not usable.&#xA;{{ Shortened }}&#xA;[hevc @ 0x5587b60c8e00] Initializing CUDA frames context: sw_format = yuv420p10le, width = 3840, height = 2160&#xA;[AVHWFramesContext @ 0x5587b7573f00] Pixel format &#x27;yuv420p10le&#x27; is not supported&#xA;[hevc @ 0x5587b60c8e00] Error initializing a CUDA frame pool&#xA;cuvid hwaccel requested for input stream #0:0, but cannot be initialized.&#xA;[hevc @ 0x5587b60c8e00] Error parsing NAL unit #6.&#xA;Error while decoding stream #0:0: Operation not permitted&#xA;{{ Shortened }}&#xA;[Parsed_format_0 @ 0x5587b6330c40] Setting &#x27;pix_fmts&#x27; to value &#x27;p010&#x27;&#xA;[Parsed_tonemap_opencl_2 @ 0x5587b632d3c0] Setting &#x27;t&#x27; to value &#x27;bt2020&#x27;&#xA;[Parsed_tonemap_opencl_2 @ 0x5587b632d3c0] Setting &#x27;tonemap&#x27; to value &#x27;linear&#x27;&#xA;[Parsed_tonemap_opencl_2 @ 0x5587b632d3c0] Setting &#x27;format&#x27; to value &#x27;p010&#x27;&#xA;[Parsed_format_4 @ 0x5587b6331d40] Setting &#x27;pix_fmts&#x27; to value &#x27;p010&#x27;&#xA;[graph 0 input from stream 0:0 @ 0x5587b6359f40] Setting &#x27;video_size&#x27; to value &#x27;3840x2160&#x27;&#xA;[graph 0 input from stream 0:0 @ 0x5587b6359f40] Setting &#x27;pix_fmt&#x27; to value &#x27;64&#x27;&#xA;[graph 0 input from stream 0:0 @ 0x5587b6359f40] Setting &#x27;time_base&#x27; to value &#x27;1/1000&#x27;&#xA;[graph 0 input from stream 0:0 @ 0x5587b6359f40] Setting &#x27;pixel_aspect&#x27; to value &#x27;1/1&#x27;&#xA;[graph 0 input from stream 0:0 @ 0x5587b6359f40] Setting &#x27;frame_rate&#x27; to value &#x27;24000/1001&#x27;&#xA;[graph 0 input from stream 0:0 @ 0x5587b6359f40] w:3840 h:2160 pixfmt:yuv420p10le tb:1/1000 fr:24000/1001 sar:1/1&#xA;[format @ 0x5587b6359e00] Setting &#x27;pix_fmts&#x27; to value &#x27;yuv420p|nv12|p010le|yuv444p|p016le|yuv444p16le|bgr0|rgb0|cuda&#x27;&#xA;[auto_scaler_0 @ 0x5587b7581a00] w:iw h:ih flags:&#x27;bilinear&#x27; interl:0&#xA;[Parsed_format_0 @ 0x5587b6330c40] auto-inserting filter &#x27;auto_scaler_0&#x27; between the filter &#x27;graph 0 input from stream 0:0&#x27; and the filter &#x27;Parsed_format_0&#x27;&#xA;[auto_scaler_1 @ 0x5587b634e8c0] w:iw h:ih flags:&#x27;bilinear&#x27; interl:0&#xA;[Parsed_tonemap_opencl_2 @ 0x5587b632d3c0] auto-inserting filter &#x27;auto_scaler_1&#x27; between the filter &#x27;Parsed_hwupload_1&#x27; and the filter &#x27;Parsed_tonemap_opencl_2&#x27;&#xA;Impossible to convert between the formats supported by the filter &#x27;Parsed_hwupload_1&#x27; and the filter &#x27;auto_scaler_1&#x27;&#xA;Error reinitializing filters!&#xA;Failed to inject frame into filter network: Function not implemented&#xA;Error while processing the decoded data for stream #0:0&#xA;

    &#xA;&#xA;

    I'm using cuvid because I haven't been able to get ffmpeg to compile with nvdec support even though my GPU supports it. Any help would be appreciated !

    &#xA;