Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (109)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

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

Sur d’autres sites (12578)

  • Intel QuickSync error : Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    30 novembre 2018, par Arie Syamsudin

    I want to make IPTV with a topology like this :

    Restream / source -----> IPTV server -----> User

    The problem at the moment is the question of bandwidth that is still large.

    Finally I announced by IPTV software providers to transcode with Intel QuickSync video and FFmpeg.

    I followed the steps given by the software provider at the following link :
    http://www.ezhometech.com/document/intel_ffmpeg.txt

    Which comes from the link below :
    https://www.intel.com/content/dam/www/public/us/en/documents/white-paper...

    I installed IPTV software on a laptop with an Intel processor, chipset and VGA.

    [root@iptv ffmpeg-4.1]# **lspci**
    00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
    00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
    00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
    00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
    00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
    00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
    00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)
    00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 05)
    00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
    01:00.0 Ethernet controller: Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
    02:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

    [root@iptv ffmpeg-4.1]# **lspci -nn -s 0:02.0**
    00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)

    but when I do a transcoding test, an error always appears :
    Error initializing output stream 0:0 — Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height.

    Error details :
    https://paste.fedoraproject.org/paste/vp9XIzbeOuyXRuLBlLfSng

    FFmpeg log :

    ./ffmpeg  -hwaccel qsv -i http://premium-play.org:8000/domm0H56Cj/q3ODLP6C16/2826 -vcodec h264_qsv -acodec copy -b:v 1200K -f mpegts udp://127.0.0.1:9011?pkt_size=1316
    ffmpeg version 3.2.12 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
     configuration: --enable-libmfx --enable-nonfree
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
    Input #0, mpegts, from 'http://premium-play.org:8000/domm0H56Cj/q3ODLP6C16/2826':
     Duration: N/A, start: 30200.274878, bitrate: N/A
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
       Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 125 kb/s
    libva info: VA-API version 1.0.0
    libva info: va_getDriverName() returns 0
    libva info: User requested driver 'iHD'
    libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
    libva info: Found init function __vaDriverInit_1_0
    libva info: va_openDriver() returns 0
    [h264_qsv @ 0x2a89500] Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode.
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
     Stream #0:1 -> #0:1 (copy)
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
  • FFMpeg : write h264 stream to mp4 container without changes

    3 mars 2017, par Bumblebee

    Good day.

    For brevity, the code omits error handling and memory management.

    I want to capture h264 video stream and pack it to mp4 container without changes. Since i don’t control the source of stream, i can not make assumptions about stream structure. In this way i must probe input stream.

       AVProbeData probeData;
       probeData.buf_size = s->BodySize();
       probeData.buf = s->GetBody();
       probeData.filename = "";

       AVInputFormat* inFormat = av_probe_input_format(&probeData, 1);  

    This code correctly defines h264 stream.

    Next, i create input format context,

       unsigned char* avio_input_buffer = reinterpret_cast<unsigned> (av_malloc(AVIO_BUFFER_SIZE));

       AVIOContext* avio_input_ctx = avio_alloc_context(avio_input_buffer, AVIO_BUFFER_SIZE,
           0, this, &amp;read_packet, NULL, NULL);

       AVFormatContext* ifmt_ctx = avformat_alloc_context();
       ifmt_ctx->pb = avio_input_ctx;

       int ret = avformat_open_input(&amp;ifmt_ctx, NULL, inFormat, NULL);
    </unsigned>

    set image size,

       ifmt_ctx->streams[0]->codec->width = ifmt_ctx->streams[0]->codec->coded_width = width;
       ifmt_ctx->streams[0]->codec->height = ifmt_ctx->streams[0]->codec->coded_height = height;

    create output format context,

       unsigned char* avio_output_buffer = reinterpret_cast<unsigned>(av_malloc(AVIO_BUFFER_SIZE));

       AVIOContext* avio_output_ctx = avio_alloc_context(avio_output_buffer, AVIO_BUFFER_SIZE,
           1, this, NULL, &amp;write_packet, NULL);

       AVFormatContext* ofmt_ctx = nullptr;
       avformat_alloc_output_context2(&amp;ofmt_ctx, NULL, "mp4", NULL);
       ofmt_ctx->pb = avio_output_ctx;

       AVDictionary* dict = nullptr;
       av_dict_set(&amp;dict, "movflags", "faststart", 0);
       av_dict_set(&amp;dict, "movflags", "frag_keyframe+empty_moov", 0);

       AVStream* outVideoStream = avformat_new_stream(ofmt_ctx, nullptr);

       avcodec_copy_context(outVideoStream->codec, ifmt_ctx->streams[0]->codec);

       ret = avformat_write_header(ofmt_ctx, &amp;dict);
    </unsigned>

    Initialization is done. Further there is a shifting packets from h264 stream to mp4 container. I dont calculate pts and dts, because source packet has AV_NOPTS_VALUE in them.

       AVPacket pkt;
       while (...)
       {
           ret = av_read_frame(ifmt_ctx, &amp;pkt);
           ret = av_interleaved_write_frame(ofmt_ctx, &amp;pkt);
           av_free_packet(&amp;pkt);
       }

    Further i write trailer and free allocated memory. That is all. Code works and i got playable mp4 file.

    Now the problem : the stream characteristics of the resulting file is not completely consisent with the characteristics of the source stream. In particular, fps and bitrate is higher than it should be.

    As sample, below is output ffplay.exe for source stream

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:/movies/source.mp4':0/0
    Metadata:
        major_brand     : isom
        minor_version   : 1
        compatible_brands: isom
        creation_time   : 2014-04-14T13:03:54.000000Z
    Duration: 00:00:58.08, start: 0.000000, bitrate: 12130 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661),yuv420p, 1920x1080, 12129 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
        handler_name    : VideoHandler
    Switch subtitle stream from #-1 to #-1 vq= 1428KB sq=    0B f=0/0
    Seek to 49% ( 0:00:28) of total duration ( 0:00:58)       B f=0/0
        30.32 M-V: -0.030 fd=  87 aq=    0KB vq= 1360KB sq=    0B f=0/0  

    and for resulting stream (contains part of source stream)

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:/movies/target.mp4':f=0/0
    Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1iso6mp41
        encoder         : Lavf57.56.101
    Duration: 00:00:11.64, start: 0.000000, bitrate: 18686 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 18683 kb/s, 38.57 fps, 40 tbr, 90k tbn, 50 tbc (default)
    Metadata:
        handler_name    : VideoHandler
    Switch subtitle stream from #-1 to #-1 vq= 2309KB sq=    0B f=0/0
        5.70 M-V:  0.040 fd= 127 aq=    0KB vq= 2562KB sq=    0B f=0/0  

    So there is a question, what i missed when copying stream ? I will be grateful for any help.

    Best regards

  • Graph-based video processing for .NET

    23 octobre 2016, par Borv

    Does anyone know a good object-oriented library (preferably high-level, like C# or Java) for working with video and audio streams ?

    I wrote an app which fiddles with video and audio streams, feeds and such. The original task was simple :

    • grab an RTSP feed
    • display original feed(s) on the display
    • convert it to a series of h264 ts files
    • extract audio into separate MP3 files
    • upload videos and audio to the web site (preferably in real time, few minute delay is acceptable)

    As you may have already guessed it is about recording events (e.g. lectures) and publishing them on the web.

    To pull this out I needed some graph-based non-linear editing for media. Two weeks in, I tried ffmpeg, vlc and WMF. The only library I got to work is ffmpeg, and that comes with lots of "however". WMF required a lot of coding (and I abandoned this path), vlc looked great on paper, but I stumbled across some bugs with input splitting I could not get around (e.g. transcode:es combination flat out refused to work).

    So, the question. What are good non-linear editing libraries besides ffmpeg, vlc and wmf/directshow that allow for building video processing graphs with sources, sinks and filters ? Or perhaps good bindings over ffmpeg and vlc allowing to build such graphs ?