Recherche avancée

Médias (91)

Autres articles (4)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (2860)

  • Can I use the "stream copy" of ffmpeg in OpenCV with VideoWriter class ?

    14 mai 2019, par DerekG

    Python : 3.6, Ubuntu 18.04, OpenCV 4.1.0

    I have an IP camera that streams video data in H.264 encoding. I would like to take this video stream and save it in a .avi file using Python without any encoding or decoding. Using a command line interface and ffmpeg commands, this is trivial to do.

    mycomputer@home:~$ ffmpeg -i rtsp://username:password@192.168.1.1/?framerate=30.0?streamprofile=defaultcameraprofile -acodec copy -vcodec copy output_file_name.avi

    I’d like to do a similar thing from within Python using OpenCV. Currently, I am using VideoCapture class to read in each frame, and then using the OpenCV VideoWriter class to write this frame to a file. My issue is that the VideoWriter class requires a four_cc code to specify which codec is to be used during writing, whereas I don’t want to use any codec at all (or more precisely, I want to use the stream copy of FFmpeg, but there is to my knowledge no corresponding four_cc code). OpenCV documentation specifies that if I use the FFmpeg backend API and specify both a codec and framerate of 0, the raw stream should be written to the new file. However, when I do this, no file is created.

    cap = cv2.VideoCapture("rtsp://username:password@192.168.1.1/?framerate=30.0?streamprofile=defaultcameraprofile", cv2.CAP_FFMPEG)
    frame_width = int(cap.get(3))
    frame_height = int(cap.get(4))
    # output file, backend API, four_cc code integer, framerate, frame size tuple
    out = cv2.videoWriter("output_file.avi",cv2.CAP_FFMPEG,0,0,(frame_width,frame_height))

    I have tried many combinations of other input parameters to the videoWriter constructor but all of them either re-encode the stream or do not write an output file. For instance, I have tried nearly every combination of framerate 0,30, output file extension .avi, .mp4, .h264, .mkv, None and codec 0, "H.264", "RAW ", "DBI ", " ", "MPEG", "COPY", "NONE".

    out = cv2.videoWriter("output_file.avi",cv2.CAP_FFMPEG,cv2.VideoWriter_fourcc('H','2','6','4'),30,(frame_width,frame_height))

    Is it possible to use the FFmpeg stream copy within OpenCV to save video data without encoding it ? If not, I will change tact to running shell commands from within Python, but I’d prefer the former approach if feasible.

  • How to fix "moov atom not found" error in ffmpeg ?

    21 mai, par user10664722

    Well, I'm using this project to create a Telegram bot which receives URL of .mp4 files, downloads them on server and uploads them to Telegram.

    


    Issue

    


    Everything works fine so far, except converting certain .mp4 files.

    


    For example if I use a sample .mp4 video from https://sample-videos.com/. Then it works fine and converts it successfully.

    


    But if I use a video from some random website which is also simple .mp4 file, it doesn't work and throws this error :

    


    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1932420] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible !
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1932420] moov atom not found
data/720P_1500K_210306701.mp4 : Invalid data found when processing input

    


    


  • JavaCV Fetch RTSP Meet "avcodec_open2() error -40 : Could not open audio codec" Error

    6 avril 2019, par Jeremy Lu

    I am trying to use javacv to fetch a rtsp monitoring camera and grabber the frames, but meet "avcodec_open2() error -40 : Could not open audio codec" error when the grabber is prepare to start after setup the parameters.

    Javacv version :

    • org.bytedeco.javacv-platform, 1.4.1
    • org.bytedeco.javacpp-presets.opencv-platform, 3.4.1-1.4.1

    Here is the Jave Exception Infomation :

    org.bytedeco.javacv.FrameGrabber$Exception: avcodec_open2() error -40: Could not open audio codec.  
     at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:835) ~[javacv-1.4.1.jar:1.4.1]  
     at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:663) ~[javacv-1.4.1.jar:1.4.1]  

    rtsp infomation :
    For the rtsp source, I also tried to download the FFplay and use command

    .\ffplay.exe -rtsp_transport tcp rtsp://admin:DWUUUP@10.193.8.71

    to show the frames from monitoring camera, and it works, and with following information

    • Input #0, rtsp, from ’rtsp ://admin:DWUUUP@10.193.8.71’ :

      • Metadata :
        • title : Media Presentation
      • Duration : N/A, start : 0.000000, bitrate : N/A
        • Stream #0:0 : Video : h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 15 fps, 24.17 tbr, 90k tbn, 30 tbc
        • Stream #0:1 : Audio : aac, 16000 Hz, 1 channels, fltp
    • [aac @ 000001fc123be880] Audio object type 0 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

    And here is the source code :

    FFmpegFrameGrabber grabber = new FFmpegFrameGrabber ("rtsp://admin:DWUUUP@10.193.8.71");
    grabber.setImageHeight(640);
    grabber.setImageWidth(360);
    grabber.setOption("rtsp_transport", "tcp");
    grabber.start(); // Where meet the problem

    Java2DFrameConverter converter = new Java2DFrameConverter();
    BufferedImage bufferedImage = converter.convert( grabber.grab() );
    ByteArrayOutputStream bateArrayOutputStream = new ByteArrayOutputStream();
    ImageIO.write(bufferedImage, "jpeg", bateArrayOutputStream);
    byte[] data = bateArrayOutputStream.toByteArray();
    bateArrayOutputStream.close();

    I have tested to change the rtsp to a mp4 file, the code can work.

    How can I fix this problem ? Thanks very much !