Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (35)

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

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

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

  • Revision fb1f6f1db4 : Fix segment feature data type. It has a range of -255,255, so should be int16_t

    7 juin 2013, par Ronald S. Bultje

    Changed Paths :
     Modify /vp9/common/vp9_blockd.h



    Fix segment feature data type.

    It has a range of -255,255, so should be int16_t, not int8_t.

    Change-Id : I5ef4b6aefb6212b0f35f4754f3c4d73fddbc52a0

  • FFMPEG MP3 file size much larger than expected on Windows 10

    8 avril 2018, par The Gora

    I’ve been using FFMPEG on Windows to :

    1. Convert iTunes M4A files to MP3s (with a bit rate of 128k) ; and
    2. Create 30 sec sample MP3s of the above MP3s (same bit rate).

    When I run FFMEG on a Windows 7 64 bit machine, the size of the MP3s (both for 1. & 2.) is in line with the rough calculation of :

    (Audio length in seconds) X (Bit rate)

    For example, a 4 minute audio yields an approx. 3.7MB MP3 file ; a 30 second sample MP3 is approx. 470KB.

    However when I run the same FFMPEG binary (copied from the Windows 7 machine) on a Windows 10 64 bit machine, all of the MP3s (both for 1. and for 2.) are inflated by approx 5MB. I’m using the same batch file on both machines to execute FFMEG with the required parameters, so pretty confident the difference is not down to user error.

    My questions are :

    1. Why is there this apparent 5MB overhead on Windows 10 ? and more importantly ;
    2. What can I do to remove this ?

    The large file size is a problem as the sample MP3s are to be put on a website for people to listen to a snippet of the song, and the webpage with multiple tags takes a long time to load completely (several minutes).

    Here is the version and lib info :

    ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100

    And here are the command lines I’m using :

    1. ffmpeg -i input.m4a -id3v2_version 3 -b:a 128k -output.mp3
    2. ffmpeg -i input.m4a -ss 30 -t 30 -af "afade=in:st=30:d=5,afade=out:st=55:d=5" -id3v2_version 3 -b:a 128k -output.mp3
  • TypeError : expected str, bytes or os.PathLike object, not module when trying to sream openCv frames to rtmp server

    30 novembre 2022, par seriously

    I am using openCv and face-recognition api to detect a face using a webcam then compare it with a previously taken image to check and see if the people on both images are the same and the openCv and face-recognition part of the code works properly now what I am trying to achieve is to stream the openCv processed video frames to an rtmp server so for this I am trying to use ffmpeg and running the command using subprocess but when I run the code I get error TypeError: expected str, bytes or os.PathLike object, not module. But I am writing the frames as bytes to stdin hence p.stdin.write(frame.tobytes()). How can I fix it and properly stream my openCv frames to an rtmp server using ffmpeg. Thanks in advance.

    


    Traceback (most recent call last):&#xA;  File "C:\Users\blah\blah\test.py", line 52, in <module>&#xA;    p = subprocess.Popen(command, stdin=subprocess.PIPE, shell=False)&#xA;  File "C:\Python310\lib\subprocess.py", line 969, in __init__&#xA;    self._execute_child(args, executable, preexec_fn, close_fds,&#xA;  File "C:\Python310\lib\subprocess.py", line 1378, in _execute_child&#xA;    args = list2cmdline(args)&#xA;  File "C:\Python310\lib\subprocess.py", line 561, in list2cmdline&#xA;    for arg in map(os.fsdecode, seq):&#xA;  File "C:\Python310\lib\os.py", line 822, in fsdecode&#xA;    filename = fspath(filename)  # Does type-checking of `filename`.&#xA;TypeError: expected str, bytes or os.PathLike object, not module&#xA;</module>

    &#xA;

    import cv2&#xA;import numpy as np&#xA;import face_recognition&#xA;import os&#xA;import subprocess&#xA;import ffmpeg&#xA;&#xA;path = &#x27;../attendance_imgs&#x27;&#xA;imgs = []&#xA;classNames = []&#xA;myList = os.listdir(path)&#xA;&#xA;for cls in myList:&#xA;    curruntImg = cv2.imread(f&#x27;{path}/{cls}&#x27;)&#xA;    imgs.append(curruntImg)&#xA;    classNames.append(os.path.splitext(cls)[0])&#xA;&#xA;def findEncodings(imgs):&#xA;    encodeList = []&#xA;    for img in imgs:&#xA;        img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)&#xA;        encode = face_recognition.face_encodings(img)[0]&#xA;        encodeList.append(encode)&#xA;    return encodeList&#xA;&#xA;encodeListKnown = findEncodings(imgs)&#xA;print(&#x27;Encoding Complete&#x27;)&#xA;&#xA;cap = cv2.VideoCapture(0)&#xA;&#xA;rtmp_url = "rtmp://127.0.0.1:1935/stream/webcam"&#xA;&#xA;fps = int(cap.get(cv2.CAP_PROP_FPS))&#xA;width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))&#xA;height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))&#xA;&#xA;# command and params for ffmpeg&#xA;command = [ffmpeg,&#xA;           &#x27;-y&#x27;,&#xA;           &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;           &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;,&#xA;           &#x27;-pix_fmt&#x27;, &#x27;bgr24&#x27;,&#xA;           &#x27;-s&#x27;, "{}x{}".format(width, height),&#xA;           &#x27;-r&#x27;, str(fps),&#xA;           &#x27;-i&#x27;, &#x27;-&#x27;,&#xA;           &#x27;-c:v&#x27;, &#x27;libx264&#x27;,&#xA;           &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;           &#x27;-preset&#x27;, &#x27;ultrafast&#x27;,&#xA;           &#x27;-f&#x27;, &#x27;flv&#x27;,&#xA;           &#x27;rtmp://127.0.0.1:1935/stream/webcam&#x27;]&#xA;&#xA;p = subprocess.Popen(command, stdin=subprocess.PIPE, shell=False)&#xA;&#xA;&#xA;while True:&#xA;    ret, frame, success, img = cap.read()&#xA;    if not ret:&#xA;        print("frame read failed")&#xA;        break&#xA;    imgSmall = cv2.resize(img, (0,0), None, 0.25, 0.25)&#xA;    imgSmall = cv2.cvtColor(imgSmall, cv2.COLOR_BGR2RGB)&#xA;&#xA;    currentFrameFaces = face_recognition.face_locations(imgSmall)&#xA;    currentFrameEncodings = face_recognition.face_encodings(imgSmall, currentFrameFaces)&#xA;&#xA;    for encodeFace, faceLocation in zip(currentFrameEncodings, currentFrameFaces):&#xA;        matches = face_recognition.compare_faces(encodeListKnown, encodeFace)&#xA;        faceDistance = face_recognition.face_distance(encodeListKnown, encodeFace)&#xA;        matchIndex = np.argmin(faceDistance)&#xA;&#xA;        if matches[matchIndex]:&#xA;            name = classNames[matchIndex].upper()&#xA;            y1, x2, y2, x1 = faceLocation&#xA;            y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4 &#xA;            cv2.rectangle(img, (x1, y1), (x2, y2), (0, 255, 0), 2)&#xA;            cv2.rectangle(img, (x1, y2 - 35), (x2, y2), (0, 255, 0), cv2.FILLED)&#xA;            cv2.putText(img, name, (x1 &#x2B; 6, y2 - 6), cv2.FONT_HERSHEY_DUPLEX, 1, (255, 255, 255), 2) &#xA;&#xA;    # write to pipe&#xA;    p.stdin.write(frame.tobytes())&#xA;

    &#xA;