Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (37)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • 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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (5797)

  • avutil/timecode : fix av_timecode_get_smpte_from_framenum with 50/60 fps

    20 juillet 2020, par Marton Balint
    avutil/timecode : fix av_timecode_get_smpte_from_framenum with 50/60 fps
    

    SMPTE 12M timecode can only count frames up to 39, because the tens-of-frames
    value is stored in 2 bit. In order to resolve this 50/60 fps SMPTE timecode is
    using the field bit (which is the same bit as the phase correction bit) to
    signal the least significant bit of a 50/60 fps timecode. See SMPTE ST
    12-1:2014 section 12.1.

    Therefore we slightly change the format of the return value of
    av_timecode_get_smpte_from_framenum and AV_FRAME_DATA_S12M_TIMECODE and start
    using the previously unused Phase Correction bit as Field bit. (As the SMPTE
    standard suggests)

    We add 50/60 fps support to av_timecode_get_smpte_from_framenum by calling the
    recently added av_timecode_get_smpte function in it which already handles this
    properly.

    This change affects the decklink indev and the DV and MXF muxers. MXF has no
    fate test for 50/60fps content, DV does, therefore the changes.

    MediaInfo (a recent version) confirms that half-frame timecode must be inserted
    to DV. MXFInspect confirms valid timecode insertion to the System Item of MXF
    files. For MXF, also see EBU R122.

    Note that for DV the field flag is not used because in the HDV specs (SMPTE
    370M) it is still defined as biphase mark polarity correction flag. So it
    should not matter that the DV muxer overrides the field bit.

    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavutil/timecode.c
    • [DH] libavutil/timecode.h
    • [DH] tests/ref/vsynth/vsynth1-dv-hd
    • [DH] tests/ref/vsynth/vsynth2-dv-hd
    • [DH] tests/ref/vsynth/vsynth3-dv-hd
    • [DH] tests/ref/vsynth/vsynth_lena-dv-hd
  • How to use FFMPEG on Python/Windows10 with Pipe for Screen recording ?

    20 septembre 2020, par Trmotta

    I'd like to record the screen with ffmpeg as it seems to be the only player out there who can record a region of the screen along with the mouse cursor.

    &#xA;

    The following code was adapted from i want to display mouse pointer in my recording but it doesn't work on a Windows 10 (x64) setup (using Python 3.6).

    &#xA;

    #!/usr/bin/env python3&#xA;&#xA;# ffmpeg -y -pix_fmt bgr0 -f avfoundation -r 20 -t 10 -i 1 -vf scale=w=3840:h=2160 -f rawvideo /dev/null&#xA;&#xA;import sys&#xA;import cv2&#xA;import time&#xA;import subprocess&#xA;import numpy as np&#xA;&#xA;w,h = 100, 100&#xA;&#xA;def ffmpegGrab():&#xA;    """Generator to read frames from ffmpeg subprocess"""&#xA;&#xA;    #ffmpeg -f gdigrab -framerate 30 -offset_x 10 -offset_y 20 -video_size 640x480 -show_region 1 -i desktop output.mkv #CODE THAT ACTUALLY WORKS WITH FFMPEG CLI&#xA;&#xA;    cmd = &#x27;D:/Downloads/ffmpeg-20200831-4a11a6f-win64-static/ffmpeg-20200831-4a11a6f-win64-static/bin/ffmpeg.exe -f gdigrab -framerate 30 -offset_x 10 -offset_y 20 -video_size 100x100 -show_region 1 -i desktop -f image2pipe, -pix_fmt bgr24 -vcodec rawvideo -an -sn&#x27; &#xA;&#xA;    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)&#xA;    #out, err = proc.communicate()&#xA;    while True:&#xA;        frame = proc.stdout.read(w*h*3)&#xA;        yield np.frombuffer(frame, dtype=np.uint8).reshape((h,w,3))&#xA;&#xA;# Get frame generator&#xA;gen = ffmpegGrab()&#xA;&#xA;# Get start time&#xA;start = time.time()&#xA;&#xA;# Read video frames from ffmpeg in loop&#xA;nFrames = 0&#xA;while True:&#xA;    # Read next frame from ffmpeg&#xA;    frame = next(gen)&#xA;    nFrames &#x2B;= 1&#xA;&#xA;    cv2.imshow(&#x27;screenshot&#x27;, frame)&#xA;&#xA;    if cv2.waitKey(1) == ord("q"):&#xA;        break&#xA;&#xA;    fps = nFrames/(time.time()-start)&#xA;    print(f&#x27;FPS: {fps}&#x27;)&#xA;&#xA;&#xA;cv2.destroyAllWindows()&#xA;out.release()&#xA;

    &#xA;

    By using 'cmd' as stated above, I'll get the following error :

    &#xA;

    b"ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers\r\n  built with gcc 10.2.1 (GCC) 20200805\r\n  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf\r\n  libavutil      56. 58.100 / 56. 58.100\r\n  libavcodec     58.101.101 / 58.101.101\r\n  libavformat    58. 51.101 / 58. 51.101\r\n  libavdevice    58. 11.101 / 58. 11.101\r\n  libavfilter     7. 87.100 /  7. 87.100\r\n  libswscale      5.  8.100 /  5.  8.100\r\n  libswresample   3.  8.100 /  3.  8.100\r\n  libpostproc    55.  8.100 / 55.  8.100\r\nTrailing option(s) found in the command: may be ignored.\r\n[gdigrab @ 0000017ab857f100] Capturing whole desktop as 100x100x32 at (10,20)\r\nInput #0, gdigrab, from &#x27;desktop&#x27;:\r\n  Duration: N/A, start: 1599021857.538752, bitrate: 9612 kb/s\r\n    Stream #0:0: Video: bmp, bgra, 100x100, 9612 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc\r\n**At least one output file must be specified**\r\n"&#xA;

    &#xA;

    Which is the contents of proc (and also of proc.communicate). The program crashes right after when trying to resize this message to an image of size 100x100.

    &#xA;

    I do not want to have an output file. I need to use Python subprocess along with Pipe in order to directly deliver those screen frames to my Python code, no IO required at all.

    &#xA;

    If I try the following :

    &#xA;

    cmd = 'D :/Downloads/ffmpeg-20200831-4a11a6f-win64-static/ffmpeg-20200831-4a11a6f-win64-static/bin/ffmpeg.exe -f gdigrab -framerate 30 -offset_x 10 -offset_y 20 -video_size 100x100 -i desktop -pix_fmt bgr24 -vcodec rawvideo -an -sn -f image2pipe'

    &#xA;

    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)&#xA;

    &#xA;

    Then 'frame', inside 'while True', is filled with b''.

    &#xA;

    Tried using the following libraries with no success, as I couldnt either find how to capture the mouse cursor or capture the screen at all : https://github.com/abhiTronix/vidgear, https://github.com/kkroening/ffmpeg-python

    &#xA;

    What am I missing ?&#xA;Thank you.

    &#xA;

  • Transcode raw audio data (PCM | PCM_ALAW | PCM_ULAW) to an audio file with the MKA extension

    15 septembre 2020, par bbdd

    My task is to package raw audio data (PCM_ALAW, PCM_ULAW, PCM_S16LE, PCM_S16BE) into an MKA container. Looking through this example, I came across the question, how do I change the functions of receiving the input audio file, to the functions that accept raw data for packaging into an audio file.

    &#xA;

    I need to make such functionality as in this original example :

    &#xA;

    ffmpeg -f alaw -ar 8000 -ac 1 -i rawData test.mka&#xA;

    &#xA;

    But in my case, I can only use the ``ffmpeg` API library.

    &#xA;

    The example shows the logic for receiving an audio file with a specific extension to determine the codec and other configuration parameters. But when feeding simple raw data, the program will crash because it can't determine what it is getting. I need to define functions that will help the library understand that it receives raw audio file data as input, with parameters such as :

    &#xA;

      &#xA;
    • Sample rate
    • &#xA;

    • Bit rate
    • &#xA;

    • Channels
    • &#xA;

    • Sample format and more...
    • &#xA;

    &#xA;

    This is what using this method should look like :

    &#xA;

    int main(int argc, char **argv)&#xA;{&#xA;    QFile file("rawPcmAlawData.bin");&#xA;    if (!file.open(QIODevice::ReadOnly)) {&#xA;        return EXIT_FAILURE;&#xA;    }&#xA;    QByteArray rawPcmAlawData(file.readAll());&#xA;&#xA;    AudioGenerater generator;&#xA;    generator.generateAudioFileWithOptions(&#xA;        // Input options&#xA;        rawPcmAlawData,       // Input raw data&#xA;        1,                    // Number channels&#xA;        64000,                // Bit-rate&#xA;        8000,                 // Sample rate&#xA;        AV_CODEC_ID_PCM_ALAW, // The type of input raw data&#xA;&#xA;        // Output options&#xA;        "test.mka",           // Audio file where raw data will be recorded. &#xA;        1,                    // Number channels&#xA;        64000,                // Bit-rate&#xA;        8000,                 // Sample rate&#xA;        AV_SAMPLE_FMT_S16     // Sample format);&#xA;&#xA;    return 0;&#xA;}&#xA;&#xA;

    &#xA;

    I do not know how to do this and what exactly I need to determine. I ask for Your help.

    &#xA;