Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (72)

  • 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 ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (11840)

  • scipy.io.wavfile.read() the stdout from FFmpeg

    28 février 2018, par PhuckMyLife

    After searching for a long time, I still cannot find the solution to use scipy.io.wavfile.read() to read the bytes from the stdout of FFmpeg 3.3.6.

    Here is the example code working perfectly. However, it needs to save a converted file to disk.

    import subprocess
    import scipy.io.wavfile as wavfile

    command = 'ffmpeg -i in.mp3 out.wav'
    subprocess.run(command)

    with open('out.wav', 'rb') as wf:
       rate, signal = wavfile.read(wf)

    print(rate, signal)

    And here is the code I try to get the FFmpeg output from stdout and load it into scipy wavfile.

    import io
    import subprocess
    import scipy.io.wavfile as wavfile

    command = 'ffmpeg -i in.mp3 -f wav -'
    proc = subprocess.run(command, stdout=subprocess.PIPE)

    rate, signal = wavfile.read(io.BytesIO(proc.stdout))

    print(rate, signal)

    Sadly, it raises a ValueError.

    Traceback (most recent call last):
     File ".\err.py", line 8, in <module>
       rate, signal = wavfile.read(io.BytesIO(proc.stdout))
     File "C:\Users\Sean Wu\AppData\Local\Programs\Python\Python36\lib\site-
    packages\scipy\io\wavfile.py", line 246, in read
       raise ValueError("Unexpected end of file.")
    ValueError: Unexpected end of file.
    </module>

    Are there any methods to solve this problem ?

  • How to read h264 stream as a file from the USB webcam directly in c++ without using opencv ?

    6 mars 2018, par irobo

    I am able to read a video file of h264 format and doing some machine learning inference on top of it. The code works absolutely fine for input from a file. Below code is a sample code from Deepstream SDK

    FileDataProvider(const char *szFilePath, simplelogger::Logger *logger)
       : logger_(logger)
       {
            fp_ = fopen(szFilePath, "rb");

           //fp_ = fopen("/dev/video0", "rb");


           if (nullptr == fp_) {
               LOG_ERROR(logger, "Failed to open file " &lt;&lt; szFilePath);
               exit(1);
           }
           pLoadBuf_ = new uint8_t[nLoadBuf_];
           pPktBuf_ = new uint8_t[nPktBuf_];
           assert(nullptr != pLoadBuf_);
       }
       ~FileDataProvider() {
           if (fp_) {
               fclose(fp_);
           }
           if (pLoadBuf_) {
               delete [] pLoadBuf_;
           }
           if (pPktBuf_) {
               delete [] pPktBuf_;
           }
       }

    What is requirement ?

    • Read from the Logitech c920 webcam instead for video file.
    • I know How to read from webcam using opencv. But I don’t want to use opencv here.

    My Research

    • Using v4l we can get the stream and display it in vlc.
    • Camera supports below formats.

    @ubox : $ v4l2-ctl —device=/dev/video1 —list-formats

    ioctl : VIDIOC_ENUM_FMT Index : 0 Type : Video Capture
    Pixel Format : ’YUYV’ Name : YUYV 4:2:2

    Index : 1 Type : Video Capture Pixel Format : ’H264’
    (compressed) Name : H.264

    Index : 2 Type : Video Capture Pixel Format : ’MJPG’
    (compressed) Name : Motion-JPEG

    How to do this ?
    - Now how to feed this live stream into
    above sample code such that it reads from the webcam rather than file ?

    [update-1]
    - In otherwords, does v4l has some options to write the video stream as h264 formant ? So that, I can read that file like before(above code) when its(v4l) writing to disk.

    [update-2]
    - we can use ffmpeg instead of v4c. If any solutions for using ffmpeg to save the video stream into disk continuously, so that other programs reads that file ?

  • How to read h264 stream as a file from the USB webcam directly in c/c++ without using opencv ?

    23 novembre 2022, par ajayramesh

    I am able to read a video file of h264 format and doing some machine learning inference on top of it. The code works absolutely fine for input from a file. Below code is a sample code from Deepstream SDK

    &#xA;&#xA;

    FileDataProvider(const char *szFilePath, simplelogger::Logger *logger)&#xA;    : logger_(logger)&#xA;    {&#xA;         fp_ = fopen(szFilePath, "rb");&#xA;&#xA;        //fp_ = fopen("/dev/video0", "rb");&#xA;&#xA;&#xA;        if (nullptr == fp_) {&#xA;            LOG_ERROR(logger, "Failed to open file " &lt;&lt; szFilePath);&#xA;            exit(1);&#xA;        }&#xA;        pLoadBuf_ = new uint8_t[nLoadBuf_];&#xA;        pPktBuf_ = new uint8_t[nPktBuf_];&#xA;        assert(nullptr != pLoadBuf_);&#xA;    }&#xA;    ~FileDataProvider() {&#xA;        if (fp_) {&#xA;            fclose(fp_);&#xA;        }&#xA;        if (pLoadBuf_) {&#xA;            delete [] pLoadBuf_;&#xA;        }&#xA;        if (pPktBuf_) {&#xA;            delete [] pPktBuf_;&#xA;        }&#xA;    }&#xA;

    &#xA;&#xA;

    What is requirement ?

    &#xA;&#xA;

      &#xA;
    • Read from the Logitech c920 webcam instead for video file.
    • &#xA;

    • I know How to read from webcam using opencv. But I don't want to use opencv here.
    • &#xA;

    &#xA;&#xA;

    My Research

    &#xA;&#xA;

      &#xA;
    • Using v4l we can get the stream and display it in vlc.
    • &#xA;

    • Camera supports below formats.
    • &#xA;

    &#xA;&#xA;

    &#xA;

    @ubox : $ v4l2-ctl —device=/dev/video1 —list-formats

    &#xA; &#xA;

    ioctl : VIDIOC_ENUM_FMT Index : 0 Type : Video Capture&#xA; Pixel Format : 'YUYV' Name : YUYV 4:2:2

    &#xA; &#xA;

    Index : 1 Type : Video Capture Pixel Format : 'H264'&#xA; (compressed) Name : H.264

    &#xA; &#xA;

    Index : 2 Type : Video Capture Pixel Format : 'MJPG'&#xA; (compressed) Name : Motion-JPEG

    &#xA;

    &#xA;&#xA;

    &#xA;&#xA;

    How to do this ?&#xA;- Now how to feed this live stream into&#xA; above sample code such that it reads from the webcam rather than file ?

    &#xA;&#xA;

    [update-1]&#xA;- In otherwords, does v4l has some options to write the video stream as h264 formant ? So that, I can read that file like before(above code) when its(v4l) writing to disk.

    &#xA;&#xA;

    [update-2]&#xA;- we can use ffmpeg instead of v4l. If any solutions for using ffmpeg to save the video stream into disk continuously, so that other programs reads that file ?

    &#xA;