Recherche avancée

Médias (1)

Mot : - Tags -/vidéo

Autres articles (100)

  • 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 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (8669)

  • libavformat : add RCWT closed caption muxex

    14 janvier 2024, par Marth64
    libavformat : add RCWT closed caption muxex
    

    Signed-off-by : Marth64 <marth64@proxyid.net>

    Raw Captions With Time (RCWT) is a format native to ccextractor, a commonly
    used open source tool for processing 608/708 closed caption (CC) sources.
    It can be used to archive the original, raw CC bitstream and to produce
    a source file file for later CC processing or conversion. As a result,
    it also allows for interopability with ccextractor for processing CC data
    extracted via ffmpeg. The format is simple to parse and can be used
    to retain all lines and variants of CC.

    A free specification of RCWT can be found here :
    https://github.com/CCExtractor/ccextractor/blob/master/docs/BINARY_FILE_FORMAT.TXT
    This muxer implements the specification as of 01/05/2024, which has
    been stable and unchanged for 10 years as of this writing.

    This muxer will have some nuances from the way that ccextractor muxes RCWT.
    No compatibility issues when processing the output with ccextractor
    have been observed as a result of this so far, but mileage may vary
    and outputs will not be a bit-exact match.

    Specifically, the differences are :
    (1) This muxer will identify as "FF" as the writing program identifier, so
    as to be honest about the output's origin.

    (2) ffmpeg's MPEG-1/2, H264, HEVC, etc. decoders extract closed captioning
    data differently than ccextractor from embedded SEI/user data.
    For example, DVD captioning bytes will be translated to ATSC A53 format.
    This allows ffmpeg to handle 608/708 in a consistant way downstream.
    This is a lossless conversion and the meaningful data is retained.

    (3) This muxer will not alter the extracted data except to remove invalid
    packets in between valid CC blocks. On the other hand, ccextractor
    will by default remove mid-stream padding, and add padding at the end
    of the stream (in order to convey the end time of the source video).

    • [DH] Changelog
    • [DH] doc/muxers.texi
    • [DH] libavformat/Makefile
    • [DH] libavformat/allformats.c
    • [DH] libavformat/rcwtenc.c
    • [DH] tests/fate/subtitles.mak
  • 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.

    &#xA;

    Main Post

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

    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&#xA;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&#xA;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&#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

    where, join.txt is :

    &#xA;

    file seg-01.mp4&#xA;file seg-02.mp4&#xA;file seg-03.mp4&#xA;

    &#xA;

    ffmpeg throws the following warning :

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

  • Is there problem with 'read' command in Bash, or in Bash itself when using multiprocessing, or may be I make some mistake ? [duplicate]

    27 janvier 2023, par myQs

    First to mention that I do not have lot of experiences with Bash scripting.
    &#xA;Here is the problem that I observe :

    &#xA;When I execute read command and inside the cycle I run background processes, the read command misses some of the arguments in some very rare cases.

    &#xA;For example : if I read the output of ls -la for big number of video files and on each of them I execute ffmpeg command in a different sub-process, then in some very rare cases there are missing some of the first parameters of read command.
    &#xA;In that case the rest of parameters of the ls are wrong (having partial of their real values or wrongly assigned).

    &#xA;I most of the cases I have an output like this (which is correct) :
    &#xA;p1: &#x27;-rwxr-x---.&#x27;; p2: &#x27;1&#x27;; p3: &#x27;uman&#x27;; p4: &#x27;uman&#x27;; p5: &#x27;1080519&#x27;; p6: &#x27;Jan&#x27;; p7: &#x27;27&#x27;; p8: &#x27;05:49&#x27;; p9: &#x27;origVideo_453.mp4&#x27;

    &#xA;

    but for very few lines I have not correct output and it is like this :
    &#xA;p1: &#x27;an&#x27;; p2: &#x27;1080519&#x27;; p3: &#x27;Jan&#x27;; p4: &#x27;27&#x27;; p5: &#x27;05:49&#x27;; p6: &#x27;origVideo_454.mp4&#x27;; p7: &#x27;&#x27;; p8: &#x27;&#x27;; p9: &#x27;&#x27;

    &#xA;

    Here p1 and p2 are missing and p3 should be "uman" but is just "an". And p3 becomes p1, p4 becomes p2, etc, in this way p7, p8 and p9 remain without values.

    &#xA;

    Here is my bash script :

    &#xA;

    #!/bin/bash&#xA;&#xA;#src_dir=/tmp/text_files&#xA;src_dir=/tmp/video_files&#xA;&#xA;dest_dir=/tmp/video_files_dest&#xA;&#xA;mkdir -p $dest_dir&#xA;&#xA;handle_video() {&#xA;  echo "handling file: &#x27;$1&#x27;"&#xA;  ffmpeg -loglevel error -i $src_dir/$1  -acodec copy -vcodec copy $dest_dir/$1&#xA;}&#xA;&#xA;generate_text() {&#xA;  str=&#x27;&#x27;&#xA;  for k in {1..512}&#xA;  do&#xA;    random=$(openssl rand -hex 20)&#xA;    str="${str}${random} "&#xA;&#xA;    if [ $(( $k % 4 )) -eq 0 ]; then&#xA;      str="${str} ${new_line}"&#xA;    fi&#xA;  done&#xA;&#xA;  echo "${str}" > $src_dir/$1&#xA;}&#xA;&#xA;while read p1 p2 p3 p4 p5 p6 p7 p8 p9; do&#xA;echo "p1: &#x27;$p1&#x27;; p2: &#x27;$p2&#x27;; p3: &#x27;$p3&#x27;; p4: &#x27;$p4&#x27;; p5: &#x27;$p5&#x27;; p6: &#x27;$p6&#x27;; p7: &#x27;$p7&#x27;; p8: &#x27;$p8&#x27;; p9: &#x27;$p9&#x27;"&#xA;  if test -f $src_dir/$p9; then&#xA;    handle_video $p9 &amp;&#xA;#    generate_text $p9 &amp;&#xA;  fi&#xA;done &lt;&lt; EOF&#xA;$(ls -la $src_dir)&#xA;EOF&#xA;

    &#xA;
    &#xA;**When I run the `handle_video` not in background but in same thread** I do not have such problem (remove `&` from line 33).

    &#xA;First I thought the issue might be in the output of the command `la -ls` and I tried with other commands, but I saw the same kind of results - in most of the executions `read` has correct parameters but in very few cases they are wrong.

    &#xA;

    I also tried the script instead with handle_video (which uses ffmpeg invocation) to run different function that is executed inside read cycle : the generate_text.
    &#xA;To do this I comment lines 3 and 33 and uncomment lines 4 and 34.
    &#xA;And the interesting thing is that when executing it with handle_video problem exists but when executing with generate_text there is no such problem at all. At least I have never observed it in all my tests.
    &#xA;When executing it with handle_video I put 1200 video .mp4 files (1.1 MB each) in directory /tmp/video_files and run bash script.

    &#xA;When executing it with generate_text I generate 1200 empty files in directory /tmp/text_files and run the bash script.

    &#xA;

    I also tried to execute the read command with piping like this, but the result is the same :

    &#xA;

    ls -la $src_dir | while read p1 p2 p3 p4 p5 p6 p7 p8 p9; do&#xA;  echo "p1: &#x27;$p1&#x27;; p2: &#x27;$p2&#x27;; p3: &#x27;$p3&#x27;; p4: &#x27;$p4&#x27;; p5: &#x27;$p5&#x27;; p6: &#x27;$p6&#x27;; p7: &#x27;$p7&#x27;; p8: &#x27;$p8&#x27;; p9: &#x27;$p9&#x27;"&#xA;  if test -f $src_dir/$p9; then&#xA;    handle_video $p9 &amp;&#xA;#   generate_text $p9 &amp;&#xA;  fi&#xA;done&#xA;

    &#xA;
    &#xA;

    Bash version is : 5.2.15(1)-release
    &#xA;ffmpeg version 5.0.2
    &#xA;Guest OS : Fedora version : "36 (Workstation Edition)"
    &#xA;VirtualBox 7.0.2
    &#xA;Host OS : is Windows 10 version : 21H2
    &#xA;

    &#xA;

    Once again when I do not run the function handle_video in background (at line 33 remove the ampersand &amp;) there are no problems.
    &#xA;And when I use instead of handle_video the function generate_text again there are no problems.

    &#xA;So I wonder is there problem in the read method and how it gets the arguments, or is there problem with bash how it is being executing multiple processes, or there is something that I do not understand.
    &#xA;Any help and tips are appreciated.

    &#xA;

    Here is a snippet of real output :

    &#xA;

    p1: &#x27;-rwxr-x---.&#x27;; p2: &#x27;1&#x27;; p3: &#x27;uman&#x27;; p4: &#x27;uman&#x27;; p5: &#x27;1080519&#x27;; p6: &#x27;Jan&#x27;; p7: &#x27;27&#x27;; p8: &#x27;05:49&#x27;; p9: &#x27;origVideo_453.mp4&#x27;&#xA;handling file: &#x27;origVideo_448.mp4&#x27;&#xA;handling file: &#x27;origVideo_449.mp4&#x27;&#xA;handling file: &#x27;origVideo_44.mp4&#x27;&#xA;handling file: &#x27;origVideo_450.mp4&#x27;&#xA;handling file: &#x27;origVideo_451.mp4&#x27;&#xA;handling file: &#x27;origVideo_452.mp4&#x27;&#xA;p1: &#x27;an&#x27;; p2: &#x27;1080519&#x27;; p3: &#x27;Jan&#x27;; p4: &#x27;27&#x27;; p5: &#x27;05:49&#x27;; p6: &#x27;origVideo_454.mp4&#x27;; p7: &#x27;&#x27;; p8: &#x27;&#x27;; p9: &#x27;&#x27;&#xA;p1: &#x27;-rwxr-x---.&#x27;; p2: &#x27;1&#x27;; p3: &#x27;uman&#x27;; p4: &#x27;uman&#x27;; p5: &#x27;1080519&#x27;; p6: &#x27;Jan&#x27;; p7: &#x27;27&#x27;; p8: &#x27;05:49&#x27;; p9: &#x27;origVideo_455.mp4&#x27;&#xA;p1: &#x27;-rwxr-x---.&#x27;; p2: &#x27;1&#x27;; p3: &#x27;uman&#x27;; p4: &#x27;uman&#x27;; p5: &#x27;1080519&#x27;; p6: &#x27;Jan&#x27;; p7: &#x27;27&#x27;; p8: &#x27;05:49&#x27;; p9: &#x27;origVideo_456.mp4&#x27;&#xA;

    &#xA;