Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (61)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • 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

Sur d’autres sites (8918)

  • ffmpeg-normalize exits with OSError : [WinError 193] %1 is not a valid Win32 application

    1er septembre 2021, par Moldy1

    I have a large number of files I want to normalize the volume with a simple method using a basic loop.

    


    When trying to use ffmpeg-normalize the application exits with the error. I searched the error on-line but I can't find any issue similar to mine. I thought it may be a 'path' or file type association problem but they look ok.

    


    Can anyone give me an explanation for this error and a possible fix for it please ?

    


    D:\Test>ffmpeg-normalize.exe in.mkv -o out.mkv&#xA;Traceback (most recent call last):&#xA;  File "c:\users\les\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main&#xA;    return _run_code(code, main_globals, None,&#xA;  File "c:\users\les\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code&#xA;    exec(code, run_globals)&#xA;  File "C:\Users\Les\AppData\Local\Programs\Python\Python39\Scripts\ffmpeg-normalize.exe\__main__.py", line 7, in <module>&#xA;  File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\__main__.py", line 409, in main&#xA;    ffmpeg_normalize = FFmpegNormalize(&#xA;  File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_ffmpeg_normalize.py", line 68, in __init__&#xA;    self.has_loudnorm_capabilities = ffmpeg_has_loudnorm()&#xA;  File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_cmd_utils.py", line 185, in ffmpeg_has_loudnorm&#xA;    cmd_runner.run_command()&#xA;  File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_cmd_utils.py", line 101, in run_command&#xA;    p = subprocess.Popen(&#xA;  File "c:\users\les\appdata\local\programs\python\python39\lib\subprocess.py", line 947, in __init__&#xA;    self._execute_child(args, executable, preexec_fn, close_fds,&#xA;  File "c:\users\les\appdata\local\programs\python\python39\lib\subprocess.py", line 1416, in _execute_child&#xA;    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,&#xA;OSError: [WinError 193] %1 is not a valid Win32 application&#xA;&#xA;D:\Test>path&#xA;PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Calibre2\;C:\Program Files (x86)\Calibre2\;C:\Users\Les\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\Les\AppData\Local\Programs\Python\Python39\;C:\Users\Les\AppData\Local\Microsoft\WindowsApps;D:\MABS\local64\bin-video;C:\Program Files (x86)\sox-14-4-2&#xA;&#xA;D:\Test>ftype python.file&#xA;python.file="C:\Users\Les\AppData\Local\Programs\Python\Python39\python.exe" "%1"&#xA;&#xA;D:\Test>python.exe&#xA;Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32&#xA;&#xA;ffmpeg -version&#xA;ffmpeg version N-100483-g728b83a7c4-gd67c6c7f6f&#x2B;4 Copyright (c) 2000-2020 the FFmpeg developers&#xA;built with gcc 10.2.0 (Rev6, Built by MSYS2 project)&#xA;&#xA;&#xA;&#xA; D:\Test>ffmpeg-normalize --version&#xA;        ffmpeg-normalize v1.22.1&#xA;</module>

    &#xA;

  • Encoding of D3D11Texture2D to an rtsp stream using libav*

    1er décembre 2020, par uzer

    Firstly I'll declare that I am just beginning with whole libav* and no experience with DirectX, so please go easy on me.

    &#xA;

    I have managed to create a rtsp stream using libav* using video file as source. Now, I am trying to create an rtsp stream from an ID3D11Texture2D, which I am obtaining from GDI API using Bitblit method. Here's my approach for creating live rtsp stream :

    &#xA;

      &#xA;
    1. Set input context&#xA;
        &#xA;
      • AVFormatContext* ifmt_ctx = avformat_alloc_context() ;
      • &#xA;

      • avformat_open_input(&ifmt_ctx, _videoFileName, 0, 0) ;
      • &#xA;

      &#xA;

    2. &#xA;

    3. Set output context&#xA;
        &#xA;
      • avformat_alloc_output_context2(&ofmt_ctx, NULL, "rtsp", _rtspServerAdress) ; //RTSP
      • &#xA;

      • copy all the codec context and stream from input to output
      • &#xA;

      &#xA;

    4. &#xA;

    5. Start streaming&#xA;
        &#xA;
      • while av_read_frame(ifmt_ctx, &pkt) ; is valid av_interleaved_write_frame(ofmt_ctx, &pkt) ;
      • &#xA;

      • with some timestamp checks and conditions for livestreaming
      • &#xA;

      &#xA;

    6. &#xA;

    &#xA;

    Now I am finding it difficult to follow current libav* documentation (which is deprecated) and little tutorial content available online.

    &#xA;

    The most relevant article I found on working between directX and libav* is this article.&#xA;However it's actually doing the opposite of what I need to do. I am not sure how to go about creating input stream and context with DirectX texture ! How can I convert the texture into an AVFrame which can be encoded to an AVStream ?

    &#xA;

    Here's some rough outline of what I am expecting

    &#xA;

    ID3D11Texture2D* win_textureptr = WindowManager::Get().GetWindow(RtspStreaming::WindowId())->GetWindowTexture();&#xA;&#xA;    D3D11_TEXTURE2D_DESC* desc;&#xA;    win_textureptr->GetDesc(desc);&#xA;    int width = desc->Width;&#xA;    int height = desc->Height;&#xA;    //double audio_time=0.0;&#xA;    auto start_time = std::chrono::system_clock::now();&#xA;    std::chrono::duration<double> video_time;&#xA;    &#xA;    //DirectX BGRA to h264 YUV420p&#xA;    SwsContext* conversion_ctx = sws_getContext(&#xA;        width, height, AV_PIX_FMT_BGRA,&#xA;        width, height, AV_PIX_FMT_YUV420P,&#xA;        SWS_BICUBLIN | SWS_BITEXACT, nullptr, nullptr, nullptr);&#xA;    &#xA;    uint8_t* sw_data[AV_NUM_DATA_POINTERS];&#xA;    int sw_linesize[AV_NUM_DATA_POINTERS];&#xA;&#xA;    while (RtspStreaming::IsStreaming())&#xA;    {&#xA;&#xA;        //copy the texture&#xA;        //win_textureptr->GetPrivateData();&#xA;        &#xA;&#xA;        // convert BGRA to yuv420 pixel format&#xA;        /*&#xA;    frame = av_frame_alloc();&#xA;        //this obviously is incorrect... I would like to use d3d11 texture here instead of frame&#xA;        sws_scale(conversion_ctx, frame->data, frame->linesize, 0, frame->height,&#xA;            sw_data, sw_linesize);&#xA;&#xA;        frame->format = AV_PIX_FMT_YUV420P;&#xA;        frame->width = width;&#xA;        frame->height = height;*/&#xA;&#xA;&#xA;        //encode to the video stream&#xA;        &#xA;        /* Compute current audio and video time. */&#xA;        video_time = std::chrono::system_clock::now() - start_time;&#xA;&#xA;        //write frame and send&#xA;    av_interleaved_write_frame(ofmt_ctx, &amp;pkt);&#xA;&#xA;        av_frame_unref(frame);&#xA;    }&#xA;&#xA;    av_write_trailer(ofmt_ctx);&#xA;</double>

    &#xA;

  • Can't get ffmpeg to stream webcam [on hold]

    29 novembre 2017, par joey

    I have a rapsberry with ffmpeg installed and a microsoft hd3000 cam installed
    I run the following command :
    ffserver -f /etc/ffserver.conf & ffmpeg -framerate 21 -re -f video4linux2 -i /dev/video0 -f alsa -i sysdefault:CARD=HD3000 http://localhost:8090/feed1.ffm

    and i get the following :

    /etc/ffserver.conf:164: Setting default value for video bit rate tolerance = 16000. Use NoDefaults to disable it.
    /etc/ffserver.conf:164: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it.
    /etc/ffserver.conf:164: Setting default value for video max rate = 6229744. Use NoDefaults to disable it.
    /etc/ffserver.conf:219: Setting default value for audio sample rate = 22050. Use NoDefaults to disable it.
    /etc/ffserver.conf:219: Setting default value for audio channel count = 1. Use NoDefaults to disable it.
    /etc/ffserver.conf:219: Setting default value for video bit rate tolerance = 64000. Use NoDefaults to disable it.
    /etc/ffserver.conf:219: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it.
    /etc/ffserver.conf:219: Setting default value for video max rate = 6369328. Use NoDefaults to disable it.
    bind(port 8090): Address already in use
    Wed Nov 29 13:17:49 2017 Could not start server
    [video4linux2,v4l2 @ 0x1a35630] The driver changed the time per frame from 1/21 to 1/10
    Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 12116.079136, bitrate: 147456 kb/s
       Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
    Guessed Channel Layout for Input Stream #1.0 : stereo
    Input #1, alsa, from 'sysdefault:CARD=HD3000':
     Duration: N/A, start: 1511961469.424072, bitrate: 1536 kb/s
       Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    [tcp @ 0x1a44160] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
    Wed Nov 29 13:17:49 2017 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
    [tcp @ 0x1a63ca0] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
    [mpeg1video @ 0x1a6ecb0] bitrate tolerance 21333 too small for bitrate 64000, overriding
    [mpeg1video @ 0x1a6ecb0] MPEG-1/2 does not support 3/1 fps
    Stream mapping:
     Stream #1:0 -> #0:0 (pcm_s16le (native) -> mp2 (native))
     Stream #0:0 -> #0:1 (rawvideo (native) -> mpeg1video (native))
     Stream #1:0 -> #0:2 (pcm_s16le (native) -> wmav2 (native))
     Stream #0:0 -> #0:3 (rawvideo (native) -> msmpeg4v3 (msmpeg4))
    Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
    Wed Nov 29 13:17:49 2017 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 0
    [2]+  Exit 1                  ffserver -f /etc/ffserver.conf

    I use the default /etc/ffserver.conf.
    I can’t seem to figur out what is the problem.