Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (83)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (3889)

  • ffmpeg program written in C, cannot open my camera in macOS Catalina 10.15.7

    27 mai 2022, par marco0631
    #include 
#include 
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"

AVFormatContext* openCamera(void) {
    avdevice_register_all();
    AVFormatContext *ctx = avformat_alloc_context();
    AVInputFormat *ifmt = av_find_input_format("avfoundation");
    if (ifmt != NULL) {
        AVDictionary *opts = NULL;
        av_dict_set(&opts, "video_size", "1280x720", 0);
        av_dict_set(&opts, "framerate", "30", 0);
        av_dict_set(&opts, "pixel_format", "uyvy422", 0);
        
        int ret = avformat_open_input(&ctx, "0", ifmt, &opts);
        if (ret != 0) {
            printf("no");
            avformat_free_context(ctx);
            return NULL;
        }
    }
    return ctx;
}

int main(int argc, const char *argv[]) {
    openCamera();
}



    


    My code run on Xcode. After I have added the plist file, the running program camera opens for about half a second and then closes. and console output

    


    2022-02-22 00:39:19.372178&#x2B;0800 ffmpeg-tool[5977:195724] [plugin] AddInstanceForFactory: No factory registered for id <cfuuid 0x10640cf60="0x10640cf60"> F8BB1C28-BAE8-11D6-9C31-00039315CD46&#xA;2022-02-22 00:39:19.434783&#x2B;0800 ffmpeg-tool[5977:195724]  HALC_ShellDriverPlugIn::Open: Can&#x27;t get a pointer to the Open routine&#xA;2022-02-22 00:39:19.435262&#x2B;0800 ffmpeg-tool[5977:195724]  HALC_ShellDriverPlugIn::Open: Can&#x27;t get a pointer to the Open routine&#xA;2022-02-22 00:39:19.501780&#x2B;0800 ffmpeg-tool[5977:195724] [plugin] AddInstanceForFactory: No factory registered for id <cfuuid 0x10640f860="0x10640f860"> 30010C1C-93BF-11D8-8B5B-000A95AF9C6A&#xA;2022-02-22 00:39:19.605797&#x2B;0800 ffmpeg-tool[5977:195724] Metal API Validation Enabled&#xA;2022-02-22 00:39:21.701071&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIOHardware.cpp:917:CMIODeviceStopStream the System is exiting&#xA;2022-02-22 00:39:21.701268&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIOHardware.cpp:1332:CMIOStreamCopyBufferQueue the System is exiting&#xA;2022-02-22 00:39:21.701538&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIOHardware.cpp:333:CMIOObjectGetPropertyData the System is exiting&#xA;2022-02-22 00:39:21.701767&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIO_DALA_System.cpp:264:GetPropertyData error 1970171760 (unop) getting property selector (inot) scope (glob) element 0&#xA;2022-02-22 00:39:21.702472&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIOHardware.cpp:333:CMIOObjectGetPropertyData the System is exiting&#xA;2022-02-22 00:39:21.702662&#x2B;0800 ffmpeg-tool[5977:195724] [] CMIO_DALA_System.cpp:264:GetPropertyData error 1970171760 (unop) getting property selector (inot) scope (glob) element 0&#xA;Program ended with exit code: 0&#xA;</cfuuid></cfuuid>

    &#xA;

    How can I solve this problem ?

    &#xA;

  • FFmpeg can't read a video stream, but VLC reads it fine

    21 mai 2022, par J.Doe

    I have a video stream that I can access using VLC, but can't access with ffmpeg. This used to work before I moved onto using a new computer (but with same camera).

    &#xA;

    This is the ffprobe command (made up IP addr) :

    &#xA;

    ffprobe -hide_banner -rtsp_transport tcp "rtsp://root:pass@12.34.567.890:80/axis-media/media.amp?event=on&amp;eventtopic=onvif:VideoSource/MotionAlarm/."

    &#xA;

    It returns

    &#xA;

    rtsp://root:pass@12.34.567.890:80/axis-media/media.amp: Invalid data found when processing input&#xA;

    &#xA;

    I've not found very much on this problem :

    &#xA;

      &#xA;
    • I've tried turning it off and on again
    • &#xA;

    • I looked through this github issue but there were no solutions
    • &#xA;

    • I know it supports TCP since it's the same command as when it worked last time.
    • &#xA;

    &#xA;

    Any ideas how I can get ffmpeg to read the stream ?

    &#xA;

    Edit : Output of -report below, I'm afraid it's not very helpful :

    &#xA;

    ffprobe started on 2022-05-21 at 06:27:54&#xA;Report written to "ffprobe-20220521-062754.log"&#xA;Log level: 48&#xA;Command line:&#xA;ffprobe -hide_banner -report -rtsp_transport tcp &#xA;"rtsp://root:pass@IPADDR:80/axis-media/media.amp? &#xA;event=on&amp;eventtopic=onvif:VideoSource/MotionAlarm/."&#xA;[tcp @ 0000023967a2f8c0] No default whitelist set&#xA;[tcp @ 0000023967a2f8c0] Original list of addresses:&#xA;[tcp @ 0000023967a2f8c0] Address IPADDR port 80&#xA;[tcp @ 0000023967a2f8c0] Interleaved list of addresses:&#xA;[tcp @ 0000023967a2f8c0] Address IPADDR port 80&#xA;[tcp @ 0000023967a2f8c0] Starting connection attempt to IPADDR port 80&#xA;[tcp @ 0000023967a2f8c0] Successfully connected to IPADDR port 80&#xA;rtsp://root:pass@IPADDR:80/axis-media/media.amp?event=on&amp;eventtopic=onvif:VideoSource/MotionAlarm/.: Invalid data found when processing input&#xA;

    &#xA;

  • FFMPEG image capture only executes partially on cron

    17 mai 2022, par C. Ardayfio

    I have the following shell script :

    &#xA;

    DailyScript.sh

    &#xA;

    #!/bin/sh&#xA;now="/Users/mydir/Downloads/LIDOPRO/Captures/$(date &#x2B;&#x27;%Y_%m_%d_%I_%M_%p&#x27;).jpg"&#xA;"/Users/mydir/Downloads/LIDOPRO/ffmpeg" -ss 0.5 -f avfoundation -framerate 30 -i "0" -frames:v 1 -t 1 "$now"&#xA;

    &#xA;

    It produces an image through my FaceTime camera when I run the script manually in shell, as follows :

    &#xA;

    $ /Users/mydir/Downloads/LIDOPRO/DailyScript.sh&#xA;

    &#xA;

    And the output I get is the following

    &#xA;

    ffmpeg version N-106916-ge71d5156c8-tessus Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.17)&#xA;  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay&#xA;  libavutil      57. 24.101 / 57. 24.101&#xA;  libavcodec     59. 28.100 / 59. 28.100&#xA;  libavformat    59. 23.100 / 59. 23.100&#xA;  libavdevice    59.  6.100 / 59.  6.100&#xA;  libavfilter     8. 38.100 /  8. 38.100&#xA;  libswscale      6.  6.100 /  6.  6.100&#xA;  libswresample   4.  6.100 /  4.  6.100&#xA;  libpostproc    56.  5.100 / 56.  5.100&#xA;[avfoundation @ 0x7f88f3004f00] Selected pixel format (yuv420p) is not supported by the input device.&#xA;[avfoundation @ 0x7f88f3004f00] Supported pixel formats:&#xA;[avfoundation @ 0x7f88f3004f00]   uyvy422&#xA;[avfoundation @ 0x7f88f3004f00]   yuyv422&#xA;[avfoundation @ 0x7f88f3004f00]   nv12&#xA;[avfoundation @ 0x7f88f3004f00]   0rgb&#xA;[avfoundation @ 0x7f88f3004f00]   bgr0&#xA;[avfoundation @ 0x7f88f3004f00] Overriding selected pixel format to use uyvy422 instead.&#xA;0: could not seek to position 63537.297&#xA;Input #0, avfoundation, from &#x27;0&#x27;:&#xA;  Duration: N/A, start: 63536.797200, bitrate: N/A&#xA;  Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 640x480, 30 tbr, 1000k tbn&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))&#xA;Press [q] to stop, [?] for help&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f8018000] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f8040000] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f8050000] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f8060000] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f8070000] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f8080000] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f8090000] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f80a0000] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x7f88f8008000] [swscaler @ 0x7f88f80b0000] deprecated pixel format used, make sure you did set range correctly&#xA;Output #0, image2, to &#x27;/Users/caineardayfio/Downloads/LIDOPRO/Captures/2022_05_17_12_57_PM.jpg&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf59.23.100&#xA;  Stream #0:0: Video: mjpeg, yuvj422p(pc, progressive), 640x480, q=2-31, 200 kb/s, 30 fps, 30 tbn&#xA;    Metadata:&#xA;      encoder         : Lavc59.28.100 mjpeg&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A&#xA;frame=    1 fps=0.0 q=5.2 Lsize=N/A time=00:00:00.06 bitrate=N/A speed=0.232x    &#xA;video:20kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown&#xA;

    &#xA;

    Everything works perfectly fine and the image is output.

    &#xA;

    So, I created a cron job to run the script automatically, as follows :

    &#xA;

    * * * * * /Users/caineardayfio/Downloads/LIDOPRO/DailyScript.sh 2> /tmp/error.txt 1> /tmp/output.txt&#xA;

    &#xA;

    However, this cronjob does not actually work. No photo is produced and the script seems to execute, but only partially :&#xA;error.txt

    &#xA;

    ffmpeg version N-106916-ge71d5156c8-tessus Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.17)&#xA;  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay&#xA;  libavutil      57. 24.101 / 57. 24.101&#xA;  libavcodec     59. 28.100 / 59. 28.100&#xA;  libavformat    59. 23.100 / 59. 23.100&#xA;  libavdevice    59.  6.100 / 59.  6.100&#xA;  libavfilter     8. 38.100 /  8. 38.100&#xA;  libswscale      6.  6.100 /  6.  6.100&#xA;  libswresample   4.  6.100 /  4.  6.100&#xA;  libpostproc    56.  5.100 / 56.  5.100&#xA;[avfoundation @ 0x7fe5af104580] Selected pixel format (yuv420p) is not supported by the input device.&#xA;[avfoundation @ 0x7fe5af104580] Supported pixel formats:&#xA;[avfoundation @ 0x7fe5af104580]   uyvy422&#xA;[avfoundation @ 0x7fe5af104580]   yuyv422&#xA;[avfoundation @ 0x7fe5af104580]   nv12&#xA;[avfoundation @ 0x7fe5af104580]   0rgb&#xA;[avfoundation @ 0x7fe5af104580]   bgr0&#xA;[avfoundation @ 0x7fe5af104580] Overriding selected pixel format to use uyvy422 instead.&#xA;

    &#xA;

    output.txt is empty

    &#xA;

    Does anyone know how to resolve this issue ? I'd like the image to be produced.

    &#xA;