Recherche avancée

Médias (0)

Mot : - Tags -/configuration

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (35)

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

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (5029)

  • FFmpeg / python - command works when run from shell but fails when run from python

    4 avril 2019, par artembus

    I have a python script which should run an ffmpeg command with this function :

    def transcode(in_path, out_path):
       cmd = ["ffmpeg", "-y", "-i", in_path, '-vf smartblur=lr=1']
       cmd += ["-an", out_path]
       print("Running:", " ".join(cmd))
       subprocess.run(cmd, stdout=cmdout, stderr=cmdout)

    When I run the python script it fails with this ffmpeg error :

    Running: ffmpeg -y -i raid/orig/scenes/train/5786088.mp4 -vf smartblur=lr=1 -an raid/4K/scenes/train/5786088.mp4
    ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Unrecognized option 'vf smartblur=lr=1'.
    Error splitting the argument list: Option not found

    You can see the command it tries to execute in the first line, when I run it in the command line it works fine. When I run the command in the shell it outputs the same version and parameters of the ffmpeg as written in the error above.

    I feel like I missed something simple yet crucial, anyone can point me to the right direction ?

  • How to force A/V sync using mkvmerge and external time-codes ?

    19 avril 2017, par b..

    Background

    I’m working on a project where video and audio are algorithmic interpretations of an MKV source file where I use ffmpeg -ss and -t to extract a particular region of audio and video to separate files. I use scene changes in the video in the audio process (i.e. the audio changes on video scene change), so sync is crucial.

    Audio is 48khz, using 512 sample blocks.
    Video is 23.976fps (I also tried 24).

    I store the frame onset of sceneChanges in a file in terms of cumulative blocks :

    blocksPerFrame = (48000 / 512) / 23.976
    sceneOnsetBlock = sceneOnsetFrame*blocksPerFrame

    I use these blocks in my audio code to treat the samples associated with each scene as a group.

    When I combine the audio and video back together (currently using ffmpeg to generate mp4(v) mp3(a) in an MKV container), the audio and video start off in sync but increasingly drifts until it ends up being 35 seconds off. The worst part is that the audio lag is nonlinear ! By non-linear, I mean that if I plot the lag against the location of that lag in time, I don’t get a line, but what you see in the image below). I can’t just shift or scale the audio to fit the video because of this nonlinearity. I cannot figure out the cause of this nonlinearly increasing audio delay ; I’ve double and triple checked my math.

    Cumulative lag against time

    Since I know the exact timing of scene changes, I should be able to generate "external timecodes" (from the blocks above) for mkvmerge to perfectly sync the output !

    Subquestions :

    1. Is this the best approach (beyond trying to figure out what went wrong in the first place) ? As I’m using my video frames as a
      reference, if I use the scene changes as timecodes for the audio,
      will it force the video to match the audio or vice versa ? I’m much less concerned with the duration than the sync. The video was much more laborious to produce, so I’d rather loose some sound than some frames.

    2. I’m not clear on what numbers to use in the timecodes file.
      According to mkvmerge documentation "For video this is exactly
      one frame, for audio this is one packet of the specific audio type."
      Since I’m using MP3, what is the packet size ? Ideally, I could specify a packetsize (in the audio-encoder ?) that matches my block size (512) to keep things consistent and simple. Can I do this with ffmpeg ?

    Thank you !

  • python3 openCV VideoCapture only black image (Raspbian Stretch)

    21 juin 2018, par PrimuS

    I have a little python function that analyzes a video, chunks it into one image per second and gives me the most dominant color for that image. (Code can be found here : https://github.com/primus852/python-movie-barcode)

    This works great on my Windows testing environment. However, on my Rasbian Stretch Raspberry Pi Setup it only produces a black image, as the source seems to be black.

    I compiled OpenCV (3.4.1) myself with this great article : https://www.pyimagesearch.com/2017/09/04/raspbian-stretch-install-opencv-3-python-on-your-raspberry-pi/, and it worked perfectly fine. I am using python3 and a virtualenv.

    I tried adding the ffmpeg package : apt install ffmpeg, to no avail.

    2 ideas

    • I compiled the openCV source without support for mkv/mp4/similar ? If so, how would I check that and can I just "re-compile" the whole package ?
    • I am missing codecs, where would I be able to check that ?

    The crucial code (I think) is this :

    cap = cv2.VideoCapture(full_path) are there other options that do not break the majority of my code ? I read about skvideo.io from scikit-video but that does not seem to work with my code...

    I am new to python, any hint is appreciated

    // EDIT, I think it is not a duplicate because I pass the I get no error that the capture cannot be opened and :

    OpenCV FFMPEG support :

    • python -c "import cv2; print(cv2.getBuildInformation())" | grep -i ffmpeg
      • returns : FFMPEG: YES

    FFMPEG Codec :

    • ffmpeg -codecs | grep -i avc (file is using AVC)
      • returns : DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_mmal h264_vdpau ) (encoders: libx264 libx264rgb h264_omx h264_vaapi )

    File PATH

    It exists and the path is correct...

    Any other ideas ? Could it possibly the virtualenv ?

    //EDIT2

    Tried with an AVI file

    works...