Recherche avancée

Médias (1)

Mot : - Tags -/blender

Autres articles (14)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (3031)

  • Cutting and rejoining videos causes audio de-synchronization using ffmpeg [closed]

    10 décembre 2023, par Donotalo

    This is the original post. I'm not getting any answer there so I thought may be the programming community knows the answer.

    


    Main Post

    


    I'm trying to cut a video into pieces and rejoin them using ffmpeg on Windows 11 x64. Here's the details of ffmpeg :

    


    ffmpeg version 2023-11-22-git-0008e1c5d5-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads
--disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
--enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt
--enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2
--enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d
--enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx
--enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
--enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg
--enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc
--enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo
--enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt
--enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame
--enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite
--enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 32.100 / 58. 32.100
  libavcodec     60. 34.100 / 60. 34.100
  libavformat    60. 17.100 / 60. 17.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 13.100 /  9. 13.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100


    


    I've a video file in MKV format. I've cut it into 3 pieces using the following command :

    


    ffmpeg.exe -ss 0:0:0 -i input.mkv -t 0:54:15 -c:v hevc_amf -b:v 3M -c:s mov_text seg-01.mp4
ffmpeg.exe -ss 0:54:29 -i input.mkv -t 0:35:35 -c:v hevc_amf -b:v 3M -c:s mov_text seg-02.mp4
ffmpeg.exe -ss 1:30:12 -i input.mkv -t 0:4:10 -c:v hevc_amf -b:v 3M -c:s mov_text seg-03.mp4


    


    The audio is copied in all 3 pieces like original. Now I'm joining them using the following command :

    


    ffmpeg.exe -y -f concat -safe 0 -i .\join.txt -c:v hevc_amf -c:a copy -c:s copy -fflags +genpts out.mp4


    


    where, join.txt is :

    


    file seg-01.mp4
file seg-02.mp4
file seg-03.mp4


    


    ffmpeg throws the following warning :

    


    [mp4 @ 000002a5cf9cc040] Non-monotonic DTS in output stream 0:1; previous: 156240896, current: 156240084; changing to 156240897.
This may result in incorrect timestamps in the output file.
[mp4 @ 000002a5cf9cc040] Non-monotonic DTS in output stream 0:1; previous: 258720980, current: 258720462; changing to 258720981.
This may result in incorrect timestamps in the output file.


    


    I've observed that audio is de-synchronized after the places where I cut.

    


    How to keep audio, video and subtitle synchronized after cutting and rejoining the video using ffmpeg ?

    


  • Cannot seem to work with mp3 files in pydub

    14 janvier 2023, par NegativePotato

    I have been trying to open mp3 files on pydub, I have ffmpeg in path and whatnot, but I get errors whenever I attempt to use pydub with mp3 files. Wav files work fine of course.
This is my code for testing purposes (copied directly from online) :

    


    from os import path
from pydub import AudioSegment

# files                                                                         
src = "Meet.mp3"
dst = "test.wav"

# convert wav to mp3                                                            
sound = AudioSegment.from_mp3(src)
sound.export(dst, format="wav")


    


    And this is my output for that code :

    


    C:\Users\aiden\OneDrive\Desktop\VietnameseAudioConnector>py test.py&#xA;Traceback (most recent call last):&#xA;  File "C:\Users\aiden\OneDrive\Desktop\VietnameseAudioConnector\test.py", line 9, in <module>&#xA;    sound = AudioSegment.from_mp3(src)&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "C:\Users\aiden\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\audio_segment.py", line 796, in from_mp3&#xA;    return cls.from_file(file, &#x27;mp3&#x27;, parameters=parameters)&#xA;           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "C:\Users\aiden\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\audio_segment.py", line 773, in from_file&#xA;    raise CouldntDecodeError(&#xA;pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1&#xA;&#xA;Output from ffmpeg/avlib:&#xA;&#xA;ffmpeg version 2023-01-12-git-fc263f073e-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 12.2.0 (Rev7, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      57. 43.100 / 57. 43.100&#xA;  libavcodec     59. 56.100 / 59. 56.100&#xA;  libavformat    59. 35.100 / 59. 35.100&#xA;  libavdevice    59.  8.101 / 59.  8.101&#xA;  libavfilter     8. 53.100 /  8. 53.100&#xA;  libswscale      6.  8.112 /  6.  8.112&#xA;  libswresample   4.  9.100 /  4.  9.100&#xA;  libpostproc    56.  7.100 / 56.  7.100&#xA;[mp3 @ 000002d24d29e500] Failed to read frame size: Could not seek to 44209.&#xA;Meet.mp3: Invalid argument&#xA;</module>

    &#xA;

    Sorry if this ends up being obvious, I am new to using python. Thank you for the help !

    &#xA;

  • Converting `webm` to `mov` format using ffmpeg loses transparency - how can I keep it ?

    10 mars 2023, par M.A Shahbazi

    I am trying to convert a webm video to mov format without losing quality and transparency using the following command :

    &#xA;

    ffmpeg -c:v libvpx-vp9 -i input.webm ouput.mov&#xA;

    &#xA;

    The video gets converted, but it loses transparency and the background of video is black.

    &#xA;

    I also tried the following command :

    &#xA;

    ffmpeg -c:v png -i input.webm output.mov&#xA;

    &#xA;

    But it gives me the following error output :

    &#xA;

      libavutil      58.  3.100 / 58.  3.100&#xA;  libavcodec     60.  4.100 / 60.  4.100&#xA;  libavformat    60.  4.100 / 60.  4.100&#xA;  libavdevice    60.  2.100 / 60.  2.100&#xA;  libavfilter     9.  4.100 /  9.  4.100&#xA;  libswscale      7.  2.100 /  7.  2.100&#xA;  libswresample   4. 11.100 /  4. 11.100&#xA;  libpostproc    57.  2.100 / 57.  2.100&#xA;[png @ 0000028041ca7000] Invalid PNG signature 0x824983420031F031.&#xA;[matroska,webm @ 0000028041c91240] Could not find codec parameters for stream 0 (Video: png, none(pc, progressive), 800x800): unspecified pixel format&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;Input #0, matroska,webm, from &#x27;hero.webm&#x27;:&#xA;  Metadata:&#xA;    COMPATIBLE_BRANDS: qt&#xA;    creation_time   : 2023-02-23T10:43:46.703800Z&#xA;    MAJOR_BRAND     : qt&#xA;    MINOR_VERSION   : 537199360&#xA;    ENCODER         : Lavf59.35.100&#xA;  Duration: 00:00:09.00, start: 0.000000, bitrate: 1378 kb/s&#xA;  Stream #0:0: Video: png, none(pc, progressive), 800x800, SAR 1:1 DAR 1:1, 24 fps, 24 tbr, 1k tbn&#xA;    Metadata:&#xA;      alpha_mode      : 1&#xA;      ENCODER         : Lavc59.56.100 libvpx-vp9&#xA;      DURATION        : 00:00:09.000000000&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;[png @ 0000028041ca7680] Invalid PNG signature 0x824983420031F031.&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;Cannot determine format of input stream 0:0 after EOF&#xA;Error marking filters as finished&#xA;Conversion failed!&#xA;

    &#xA;

    How can I maintain transparency when converting from webm to mov format ?

    &#xA;

    Here's the video info in case it can be helpful :

    &#xA;

    {&#xA;    "streams": [&#xA;        {&#xA;            "index": 0,&#xA;            "codec_name": "vp9",&#xA;            "codec_long_name": "Google VP9",&#xA;            "profile": "Profile 0",&#xA;            "codec_type": "video",&#xA;            "codec_tag_string": "[0][0][0][0]",&#xA;            "codec_tag": "0x0000",&#xA;            "width": 800,&#xA;            "height": 800,&#xA;            "coded_width": 800,&#xA;            "coded_height": 800,&#xA;            "closed_captions": 0,&#xA;            "film_grain": 0,&#xA;            "has_b_frames": 0,&#xA;            "sample_aspect_ratio": "1:1",&#xA;            "display_aspect_ratio": "1:1",&#xA;            "pix_fmt": "yuv420p",&#xA;            "level": -99,&#xA;            "color_range": "tv",&#xA;            "field_order": "progressive",&#xA;            "refs": 1,&#xA;            "r_frame_rate": "24/1",&#xA;            "avg_frame_rate": "24/1",&#xA;            "time_base": "1/1000",&#xA;            "start_pts": 0,&#xA;            "start_time": "0.000000",&#xA;            "disposition": {&#xA;                "default": 0,&#xA;                "dub": 0,&#xA;                "original": 0,&#xA;                "comment": 0,&#xA;                "lyrics": 0,&#xA;                "karaoke": 0,&#xA;                "forced": 0,&#xA;                "hearing_impaired": 0,&#xA;                "visual_impaired": 0,&#xA;                "clean_effects": 0,&#xA;                "attached_pic": 0,&#xA;                "timed_thumbnails": 0,&#xA;                "captions": 0,&#xA;                "descriptions": 0,&#xA;                "metadata": 0,&#xA;                "dependent": 0,&#xA;                "still_image": 0&#xA;            },&#xA;            "tags": {&#xA;                "alpha_mode": "1",&#xA;                "ENCODER": "Lavc59.56.100 libvpx-vp9",&#xA;                "DURATION": "00:00:09.000000000"&#xA;            }&#xA;        }&#xA;    ],&#xA;    "format": {&#xA;        "filename": ".\\hero.webm",&#xA;        "nb_streams": 1,&#xA;        "nb_programs": 0,&#xA;        "format_name": "matroska,webm",&#xA;        "format_long_name": "Matroska / WebM",&#xA;        "start_time": "0.000000",&#xA;        "duration": "9.000000",&#xA;        "size": "1550466",&#xA;        "bit_rate": "1378192",&#xA;        "probe_score": 100,&#xA;        "tags": {&#xA;            "COMPATIBLE_BRANDS": "qt  ",&#xA;            "creation_time": "2023-02-23T10:43:46.703800Z",&#xA;            "MAJOR_BRAND": "qt  ",&#xA;            "MINOR_VERSION": "537199360",&#xA;            "ENCODER": "Lavf59.35.100"&#xA;        }&#xA;    }&#xA;}&#xA;

    &#xA;