Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (28)

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

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (4338)

  • OpenCV VideoWriter produces "can't find starting number" error

    5 avril 2020, par user3325139

    I am trying to write 16-bit grayscale video using the FFV1 codec and opencv.ImageWriter on Windows 10

    



    Here is my code :

    



    import numpy as np
import cv2, pdb

print(cv2.getBuildInformation())

def to8(img):
    return (img/256).astype('uint8')

cap = cv2.VideoCapture(0+cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('Y','1','6',' '))
cap.set(cv2.CAP_PROP_CONVERT_RGB, False)

out = cv2.VideoWriter('out.avi', cv2.VideoWriter_fourcc('F','F','V','1'), cap.get(cv2.CAP_PROP_FPS), (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)),int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))))

while True:
    ret, frame = cap.read()
    frame = cv2.normalize(frame,None,0,65535,cv2.NORM_MINMAX)

    cv2.imshow('Video',to8(frame))
    out.write(frame)

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cap.release()
out.release()
cv2.destroyAllWindows()


    



    And here is my error :

    



    [ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (415) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): out.avi in function 'cv::icvExtractPattern'


    



    I am running this script from a command window with admin privileges. I've tried both making sure the output file does and does not exist before running.

    



    My OpenCV build information is here : https://pastebin.com/whtF6ixG

    



    Thanks !

    



    EDIT :
Based on Rotem's suggestion, instead of using VideoWriter I piped directly to FFMPEG using ffmpeg-python :

    



    import numpy as np
import cv2, pdb
import ffmpeg

def to8(img):
    return (img/256).astype('uint8')

cap = cv2.VideoCapture(0+cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('Y','1','6',' '))
cap.set(cv2.CAP_PROP_CONVERT_RGB, False)

ff_proc = (
    ffmpeg
    .input('pipe:',format='rawvideo',pix_fmt='gray16le',s='%sx%s'%(int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)),int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))),r='60')
    .output('out3.avi',vcodec='ffv1',an=None)
    .run_async(pipe_stdin=True)
)

while True:
    ret, frame = cap.read()

    cv2.imshow('Video',to8(frame))
    ff_proc.stdin.write(frame)

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

out.terminate()
cap.release()
cv2.destroyAllWindows()


    


  • Failed to start broadcast : kurento.MediaPipeline not found (Code:40101, Type:null, Data : {"type" :"MEDIA_OBJECT_NOT_FOUND"})

    30 avril 2020, par Arslan Maqbool

    I am facing this issue when I opened any conference room or any meeting then the camera or microphone or sharedscreen is opened from just 1 or 2 seconds and then
 gone and error message popup in the image below which is attached and in text

    



    I am using open-meeting version 5.0.0-M3 WebRTC

    



    > Failed to start broadcast: Object
> '4f09d0d4-f52f-4731-9e54-124e2da0ca9a_kurento.MediaPipeline' not found
> (Code:40101, Type:null, Data: {"type":"MEDIA_OBJECT_NOT_FOUND"})


    



    enter image description here

    


  • FFmpeg : "Invalid data found when processing input" when reading video from memory

    24 avril 2020, par Drawoceans

    I'm trying to read a mp4 video file from memory with C++ and FFmpeg library, but I got "Invalid data found when processing input" error. Here are my codes :

    



    #include <cstdio>&#xA;#include <fstream>&#xA;#include <filesystem>&#xA;&#xA;extern "C"&#xA;{&#xA;#include "libavformat/avformat.h"&#xA;#include "libavformat/avio.h"&#xA;}&#xA;&#xA;using namespace std;&#xA;namespace fs = std::filesystem;&#xA;&#xA;struct VideoBuffer&#xA;{&#xA;    uint8_t* ptr;&#xA;    size_t size;&#xA;};&#xA;&#xA;static int read_packet(void* opaque, uint8_t* buf, int buf_size)&#xA;{&#xA;    VideoBuffer* vb = (VideoBuffer*)opaque;&#xA;    buf_size = FFMIN(buf_size, vb->size);&#xA;&#xA;    if (!buf_size) {&#xA;        return AVERROR_EOF;&#xA;    }&#xA;&#xA;    printf("ptr:%p size:%zu\n", vb->ptr, vb->size);&#xA;&#xA;    memcpy(buf, vb->ptr, buf_size);&#xA;    vb->ptr &#x2B;= buf_size;&#xA;    vb->size -= buf_size;&#xA;&#xA;    return buf_size;&#xA;}&#xA;&#xA;void print_ffmpeg_error(int ret)&#xA;{&#xA;    char* err_str = new char[256];&#xA;    av_strerror(ret, err_str, 256);&#xA;    printf("%s\n", err_str);&#xA;    delete[] err_str;&#xA;}&#xA;&#xA;int main()&#xA;{&#xA;    fs::path video_path = "test.mp4";&#xA;    ifstream video_file;&#xA;    video_file.open(video_path);&#xA;    if (!video_file) {&#xA;        abort();&#xA;    }&#xA;    size_t video_size = fs::file_size(video_path);&#xA;    char* video_ptr = new char[video_size];&#xA;    video_file.read(video_ptr, video_size);&#xA;    video_file.close();&#xA;&#xA;    VideoBuffer vb;&#xA;    vb.ptr = (uint8_t*)video_ptr;&#xA;    vb.size = video_size;&#xA;&#xA;    AVIOContext* avio = nullptr;&#xA;    uint8_t* avio_buffer = nullptr;&#xA;    size_t avio_buffer_size = 4096;&#xA;    avio_buffer = (uint8_t*)av_malloc(avio_buffer_size);&#xA;    if (!avio_buffer) {&#xA;        abort();&#xA;    }&#xA;&#xA;    avio = avio_alloc_context(avio_buffer, avio_buffer_size, 0, &amp;vb, read_packet, nullptr, nullptr);&#xA;&#xA;    AVFormatContext* fmt_ctx = avformat_alloc_context();&#xA;    if (!fmt_ctx) {&#xA;        abort();&#xA;    }&#xA;    fmt_ctx->pb = avio;&#xA;&#xA;    int ret = 0;&#xA;    ret = avformat_open_input(&amp;fmt_ctx, nullptr, nullptr, nullptr);&#xA;    if (ret &lt; 0) {&#xA;        print_ffmpeg_error(ret);&#xA;    }&#xA;&#xA;    avformat_close_input(&amp;fmt_ctx);&#xA;    av_freep(&amp;avio->buffer);&#xA;    av_freep(&amp;avio);&#xA;    delete[] video_ptr;&#xA;    return 0;&#xA;}&#xA;</filesystem></fstream></cstdio>

    &#xA;&#xA;

    And here is what I got :

    &#xA;&#xA;

    ptr:000001E10CEA0070 size:4773617&#xA;ptr:000001E10CEA1070 size:4769521&#xA;...&#xA;ptr:000001E10D32D070 size:1777&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 000001e10caaeac0] moov atom not found&#xA;Invalid data found when processing input&#xA;

    &#xA;&#xA;

    FFmpeg version is 4.2.2, with Windows 10 and Visual Studio 2019 in x64 Debug mode. FFmpeg library is the Windows compiled shared library from FFmpeg homepage. Some codes are from official example avio_reading.c. Target MP4 file can be played normally by VLC player so I think the file is OK. Is anywhere wrong in my codes ? Or is it an FFmpeg library problem ?

    &#xA;