Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (75)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (9758)

  • ffmpeg command not interpreted correcly from cron

    16 avril 2022, par Andre Lörchner

    on my raspberry pi I'm trying to run a script every 30 minutes that restarts a video stream. Reason is the stream is consistently running into hickups after roughly 35 minutes and stops a few minutes after.
I tried fixing the root problem without any success so far, so an easier and valid workaround is to just restart the stream.

    


    I created a script restart_stream.sh that kills the previous stream and immediately starts it again.

    


    #!/bin/bash&#xA;&#xA;killall -r libcamera-vid ffmpeg&#xA;libcamera-vid -t 0 --framerate 30 --width 1280 --height 720 -b 2000000 -o - --nopreview | ffmpeg -f h264 -thread_queue_size 4096 -i - -f pulse -ar 44100 -ac 2 -acodec pcm_s16le -thread_queue_size 4096 -i default -vcodec copy -acodec aac -ab 128k -fflags genpts -fflags igndts -f fifo -fifo_format flv -map 0:v -map 1:a? -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 2 rtmp://a.rtmp.youtube.com/live2/<key>&#xA;</key>

    &#xA;

    cron job

    &#xA;

    */30 7-19 * * * /bin/restart_stream.sh >/tmp/stream.log 2>&amp;1&#xA;

    &#xA;

    Running this script manually from the ssh console works perfectly fine but once I run it from cron it fails with the following error

    &#xA;

    [1:41:01.657471459] [2138]  INFO RPI raspberrypi.cpp:1326 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unic>&#xA;[1:41:01.658232799] [2136]  INFO Camera camera.cpp:1028 configuring streams: (0) 1280x720-YUV420&#xA;[1:41:01.659060988] [2138]  INFO RPI raspberrypi.cpp:747 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor >&#xA;[1:41:01.698525343] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: Saturation = 1.000000&#xA;[1:41:01.698798789] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: Contrast = 1.000000&#xA;[1:41:01.698840990] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: Brightness = 0.000000&#xA;[1:41:01.698877617] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: AwbMode = 0&#xA;[1:41:01.698910745] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: Sharpness = 1.000000&#xA;[1:41:01.698947187] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: ExposureValue = 0.000000&#xA;[1:41:01.698983203] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeExposureMode = 0&#xA;[1:41:01.699014646] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: FrameDurationLimits = [ 33333, 33333 ]&#xA;[1:41:01.699050903] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeMeteringMode = 0&#xA;[1:41:01.699082938] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: NoiseReductionMode = 1&#xA;ffmpeg version 4.3.3-0&#x2B;rpt2&#x2B;deb11u1 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 10 (Raspbian 10.2.1-6&#x2B;rpi1)&#xA;  configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/arm-linux-gn>&#xA;  WARNING: library configuration mismatch&#xA;  avutil      configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avcodec     configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avformat    configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avdevice    configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avfilter    configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avresample  configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  swscale     configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  swresample  configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  postproc    configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;Input #0, h264, from &#x27;pipe:&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 30 fps, 30 tbr, 1200k tbn, 60 tbc&#xA;default: No such process&#xA;

    &#xA;

    It seems to interpret the command differently and not treat default within the ffmpeg call as a parameter.

    &#xA;

  • ffmpeg command not interpreted correctly from cron

    16 avril 2022, par Andre Lörchner

    on my raspberry pi I'm trying to run a script every 30 minutes that restarts a video stream. Reason is the stream is consistently running into hickups after roughly 35 minutes and stops a few minutes after.&#xA;I tried fixing the root problem without any success so far, so an easier and valid workaround is to just restart the stream.

    &#xA;

    I created a script restart_stream.sh that kills the previous stream and immediately starts it again.

    &#xA;

    #!/bin/bash&#xA;&#xA;killall -r libcamera-vid ffmpeg&#xA;libcamera-vid -t 0 --framerate 30 --width 1280 --height 720 -b 2000000 -o - --nopreview | ffmpeg -f h264 -thread_queue_size 4096 -i - -f pulse -ar 44100 -ac 2 -acodec pcm_s16le -thread_queue_size 4096 -i default -vcodec copy -acodec aac -ab 128k -fflags genpts -fflags igndts -f fifo -fifo_format flv -map 0:v -map 1:a? -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 2 rtmp://a.rtmp.youtube.com/live2/<key>&#xA;</key>

    &#xA;

    cron job

    &#xA;

    */30 7-19 * * * /bin/restart_stream.sh >/tmp/stream.log 2>&amp;1&#xA;

    &#xA;

    Running this script manually from the ssh console works perfectly fine but once I run it from cron it fails with the following error

    &#xA;

    [1:41:01.657471459] [2138]  INFO RPI raspberrypi.cpp:1326 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unic>&#xA;[1:41:01.658232799] [2136]  INFO Camera camera.cpp:1028 configuring streams: (0) 1280x720-YUV420&#xA;[1:41:01.659060988] [2138]  INFO RPI raspberrypi.cpp:747 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor >&#xA;[1:41:01.698525343] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: Saturation = 1.000000&#xA;[1:41:01.698798789] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: Contrast = 1.000000&#xA;[1:41:01.698840990] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: Brightness = 0.000000&#xA;[1:41:01.698877617] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: AwbMode = 0&#xA;[1:41:01.698910745] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: Sharpness = 1.000000&#xA;[1:41:01.698947187] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: ExposureValue = 0.000000&#xA;[1:41:01.698983203] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeExposureMode = 0&#xA;[1:41:01.699014646] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: FrameDurationLimits = [ 33333, 33333 ]&#xA;[1:41:01.699050903] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeMeteringMode = 0&#xA;[1:41:01.699082938] [2145]  INFO IPARPI raspberrypi.cpp:626 Request ctrl: NoiseReductionMode = 1&#xA;ffmpeg version 4.3.3-0&#x2B;rpt2&#x2B;deb11u1 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 10 (Raspbian 10.2.1-6&#x2B;rpi1)&#xA;  configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/arm-linux-gn>&#xA;  WARNING: library configuration mismatch&#xA;  avutil      configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avcodec     configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avformat    configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avdevice    configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avfilter    configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  avresample  configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  swscale     configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  swresample  configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  postproc    configuration: --prefix=/usr --extra-version=0&#x2B;rpt2&#x2B;deb11u1 --toolchain=hardened --incdir=/usr/include/>&#xA;  libavutil      56. 51.100 / 56. 51.100&#xA;  libavcodec     58. 91.100 / 58. 91.100&#xA;  libavformat    58. 45.100 / 58. 45.100&#xA;  libavdevice    58. 10.100 / 58. 10.100&#xA;  libavfilter     7. 85.100 /  7. 85.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  7.100 /  5.  7.100&#xA;  libswresample   3.  7.100 /  3.  7.100&#xA;  libpostproc    55.  7.100 / 55.  7.100&#xA;Input #0, h264, from &#x27;pipe:&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 30 fps, 30 tbr, 1200k tbn, 60 tbc&#xA;default: No such process&#xA;

    &#xA;

    It seems to interpret the command differently and not treat default within the ffmpeg call as a parameter.

    &#xA;

  • Can ffmpeg write metadata encoder when transcoding alac/flac to aac audio file ?

    11 juin 2022, par David I

    I have a collection of alac and flac files from Bandcamp and an ffmpeg instance compiled with libfdk_aac https://trac.ffmpeg.org/wiki/CompilationGuide/Centos#libfdk_aac and am trying to convert these to lossy audio aac files for non-critical listening.

    &#xA;

    With ffmpeg -i Liholesie\ -\ Shamanic\ Twilight\ -\ 09\ Gray\ Wings.m4a -c:a libfdk_aac -vbr 4 -c:v copy 09_Gray_wings_vbr4.m4a an expected aac .m4a audio file is produced, album art included, works well. There's one slight detail missing :

    &#xA;

    During the ffmpeg conversion process ffmpeg says :

    &#xA;

    Output #0, ipod, to &#x27;09_Gray_wings_vbr4.m4a&#x27;:&#xA;  Metadata:&#xA;    major_brand     : M4A &#xA;    minor_version   : 512&#xA;    compatible_brands: M4A isomiso2&#xA;    title           : Gray Wings&#xA;    artist          : Liholesie&#xA;    album_artist    : Liholesie&#xA;    album           : Shamanic Twilight&#xA;    comment         : Visit https://liholesie.bandcamp.com&#xA;    date            : 2021&#xA;    track           : 9&#xA;    encoder         : Lavf59.24.100&#xA;  Stream #0:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 700x700 [SAR 72:72 DAR 1:1], q=2-31, 90k tbr, 90k tbn (attached pic)&#xA;  Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16 (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc59.33.100 libfdk_aac &#xA;..&#xA;&#xA;&#xA;

    &#xA;

    and the file produced looks like that when ffprobed except that the Metadata : encoder field is missing :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;09_Gray_wings_vbr4.m4a&#x27;:&#xA;  Metadata:&#xA;    major_brand     : M4A &#xA;    minor_version   : 512&#xA;    compatible_brands: M4A isomiso2&#xA;    title           : Gray Wings&#xA;    artist          : Liholesie&#xA;    album_artist    : Liholesie&#xA;    album           : Shamanic Twilight&#xA;    date            : 2021&#xA;    encoder         : Lavf59.24.100&#xA;    comment         : Visit https://liholesie.bandcamp.com&#xA;    track           : 9&#xA;  Duration: 00:06:57.78, start: 0.000000, bitrate: 155 kb/s&#xA;  Stream #0:0[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 152 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x0]: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 700x700 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn (attached pic)&#xA;

    &#xA;

    Is there a way to write the encoder field in the Metadata section when transcoding (or is "encoder" not supported for aac m4a ? That would be weird since ffmpeg says what it says when specifying output during transcoding) .

    &#xA;

    Any hints on how to write a self-defined text to said tag during transcoding are also welcome.

    &#xA;