Recherche avancée

Médias (91)

Autres articles (47)

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

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (5202)

  • Build ffmpeg under Cygwin : Invalid relocation. Offset at address doesn't fit into 32 bits

    11 août 2022, par synner

    Trying to build ffmpeg-5.1 under Cygwin, "natively" i.e to be dependant under the cygwin DLL, not necessarily cross-compiling for pure Windows.

    


    I built separately a lot of the dependant libs.
Some of the libs were provided by the cygwin repo naturally.

    


    [ /usr/local/src/ffmpeg-5.1]λ ./configure --disable-shared --enable-static --extra-cflags="-I/usr/local/include" --extra-ldflags="-L/usr/local/lib" --enable-gpl --enable-nonfree --enable-openssl --enable-gcrypt --enable-libass --enable-libcaca --enable-libcelt --enable-libcdio --enable-libdav1d --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libsoxr --enable-libssh --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzmq --enable-pic --disable-avdevice

install prefix            /usr/local
source path               .
C compiler                gcc
C library                 newlib
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     yes
standalone assembly       yes
x86 assembler             nasm
MMX enabled               yes
MMXEXT enabled            yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
AESNI enabled             yes
AVX enabled               yes
AVX2 enabled              yes
AVX-512 enabled           yes
AVX-512ICL enabled        yes
XOP enabled               yes
FMA3 enabled              yes
FMA4 enabled              yes
i686 features enabled     yes
CMOV is fast              yes
EBX available             yes
EBP available             yes
debug symbols             yes
strip symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
postprocessing support    yes
network support           yes
threading support         pthreads
safe bitstream reader     yes
texi2html enabled         no
perl enabled              yes
pod2man enabled           yes
makeinfo enabled          yes
makeinfo supports HTML    yes
xmllint enabled           yes

...


    


    [ /usr/local/src/ffmpeg-5.1]λ ./ffmpeg -version
Cygwin runtime failure: /usr/local/src/ffmpeg-5.1/ffmpeg.exe: Invalid relocation.  Offset 0x7ffd7778b627 at address 0x100a92895 doesn't fit into 32 bits


    


    Suggestions for build options / root cause ?

    


  • is there a faster way to extract various video clips from different sources and concatenate them, using moviepy ?

    27 août 2019, par user2627082

    So I’ve made a small script using moviepy to help me with my video editing process. It basically scans a bunch of subtitle files for specified words and the time duration when it occurs. With that it extracts that particular time duration from video files corresponding to the subtitle files. The extracted mp4 clips are all concatenated and written into one big composition.

    So it’s all running fine but it’s very slow. Can someone tell me it’s possible to make it faster. Am I doing something wrong ? Or is it normal for the process to be slow.

    import os,re
    from pathlib import Path
    from moviepy.editor import *
    import datetime


    def search(words_list, sub_list):

       for x in range(len(words_list)):
           print(words_list[x])
           clips = []
           clips.clear()
           for y in range(len(sub_list)):
               print(sub_list[y])
               stamps = []
               stamps.clear()


               with open(sub_list[y]) as f:
                   paragraphs = (paragraph.split("\n") for paragraph in
               f.read().split("\n\n"))

               for paragraph in paragraphs:
                   if any(words_list[x] in line.lower() for line in paragraph):
                       stamps.append(f"[{paragraph[1].strip()}]")

               videopath = str(sub_list[y]).replace("srt", "mp4").replace(":\\",
               ":\\\\")
               my_clip = VideoFileClip(videopath)


               for stamp in stamps:
                   print(stamp)
                   pre_stamp =  stamp[1:9]
                   post_stamp = stamp[18:26]
                   format = '%H:%M:%S'

                   pre_stamp  = str(datetime.datetime.strptime(pre_stamp, format)
                   -   datetime.timedelta(seconds=4))[11:19]
                   post_stamp = str(datetime.datetime.strptime(post_stamp,format)
                   + datetime.timedelta(seconds=4))[11:19]

                   trim_clip = my_clip.subclip(pre_stamp,post_stamp)
                   clips.append(trim_clip)
                   conc = concatenate_videoclips(clips)
           print(clips)
           conc.write_videofile("C:\\Users\Sri\PycharmProjects\subscrape\movies\\" + words_list[x] + "-comp.mp4")




    words = ["does what","spins","size"]

    subs = list(Path('C:\\Users\Sri\PycharmProjects\subscrape\movies').glob('**/*.srt'))

    search(words,subs)
  • FFmpeg - Copy a (not A/V) data stream from input MP4 file [closed]

    31 mars 2023, par darkshine

    I've got an MP4 video file captured by DJI drone. The file contains the video stream (H.264) and also two data streams of unknown format. I would like to convert the video from h.264 to h.265 and also save both of the included data streams. Unfortunately, I cannot force FFmpeg to copy the data streams across from the input file into the output file.

    


    Here is the mp4 file :

    


    ffprobe DJI_0019.MP4

    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5631004c2730] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DJI_0019.MP4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : replaced_timestamp
    encoder         : DJIMavic3
  Duration: 00:01:05.66, start: 0.000000, bitrate: 128915 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160, 127648 kb/s, 29.41 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : replaced_timestamp
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1(und): Data: none (djmd / 0x646D6A64), 13 kb/s
    Metadata:
      creation_time   : replaced_timestamp
      handler_name    : DJI meta
  Stream #0:2(und): Data: none (dbgi / 0x69676264), 1190 kb/s
    Metadata:
      creation_time   : replaced_timestamp
      handler_name    : DJI dbgi
  Stream #0:3: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 960x540 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn, 90k tbc (attached pic)
Unsupported codec with id 0 for input stream 1
Unsupported codec with id 0 for input stream 2


    


    I tried the command below :

    


    ffmpeg -i DJI_0019.MP4 -map 0 -c:v libx265 -crf 25 -c:d copy -copy_unknown DJI_0019.v2.MP4

    


    The command fails with the following error. The output file is empty.

    


    [mp4 @ 0x556d0180ced0] Could not find tag for codec none in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --


    


    Note that for "-c:d" option I tried different suggested values, none of them succeeded :

    


    copy
none
bin
bin_data
data
null
file


    


    In the meantime an attempt to save the data streams to separate files succeeds for the both of them with the commands :

    


    ffmpeg -i DJI_0019.MP4 -map 0:d:0 -c copy -copy_unknown -f data DJI_0019.data0.bin

    


    ffmpeg -i DJI_0019.MP4 -map 0:d:1 -c copy -copy_unknown -f data DJI_0019.data1.bin

    


    Question :

    


    How to force FFmpeg to copy the data streams from input to output ?

    


    This is the ffmpeg's info :

    


    ffmpeg version 4.4.3 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.3.0 (Gentoo 11.3.0 p5)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 
--docdir=/usr/share/doc/ffmpeg-4.4.3/html --mandir=/usr/share/man --enable-shared 
--cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar 
--nm=x86_64-pc-linux-gnu-nm --strip=x86_64-pc-linux-gnu-strip 
--ranlib=x86_64-pc-linux-gnu-ranlib --pkg-config=x86_64-pc-linux-gnu-pkg-config 
--optflags='-O2 -pipe -march=native' --disable-static --enable-avfilter --enable-avresample 
--disable-stripping --disable-optimizations --disable-libcelt --disable-indev=oss 
--disable-indev=jack --disable-indev=sndio --disable-outdev=oss --disable-outdev=sndio 
--enable-nonfree --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt 
--enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv 
--disable-libxml2 --disable-lzma --enable-network --disable-opencl --disable-openssl 
--enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --disable-vaapi 
--disable-vdpau --disable-vulkan --enable-xlib --enable-libxcb --enable-libxcb-shm 
--enable-libxcb-xfixes --enable-zlib --enable-libcdio --disable-libiec61883 
--disable-libdc1394 --enable-libcaca --disable-openal --disable-opengl --enable-libv4l2 
--disable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb 
--disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --enable-libfdk-aac 
--disable-libopenjpeg --disable-libbluray --disable-libgme --disable-libgsm 
--disable-libaribb24 --disable-mmal --disable-libmodplug --disable-libopus 
--disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt 
--disable-librsvg --disable-ffnvcodec --disable-libvorbis --disable-libvpx --disable-libzvbi 
--disable-appkit --disable-libbs2b --disable-chromaprint --disable-cuda-llvm 
--disable-libflite --disable-frei0r --disable-libvmaf --disable-libfribidi 
--disable-fontconfig --disable-ladspa --enable-libass --disable-libtesseract 
--disable-lv2 --disable-libfreetype --disable-libvidstab --disable-librubberband 
--disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-amf 
--disable-libvo-amrwbenc --disable-libkvazaar --disable-libaom --enable-libmp3lame 
--disable-libopenh264 --disable-librav1e --disable-libsnappy --disable-libsvtav1 
--disable-libtheora --disable-libtwolame --disable-libwebp --enable-libx264 --enable-libx265 
--enable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon 
--disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 
--disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow 
--disable-amd3dnowext --disable-aesni --disable-avx --disable-avx2 --disable-fma3 
--disable-fma4 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop 
--cpu=host --disable-doc --disable-htmlpages --enable-manpages
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100