Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (60)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • 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

Sur d’autres sites (9326)

  • FFmpeg decoding subtitle (delphi) decoding resutl > 0 but values are zero/null

    27 janvier 2020, par coban
    while True do begin
    if vst.sub_q.size = 0
    then Continue;

    ret := mpl.packet_queue_get(vst.sub_q, pkt, 0);
    if(pkt.data = mpl.flush_pkt.data) then
    begin
     avcodec_flush_buffers(vst.sub_st.codec);
     continue;
    end;


    ret := avcodec_decode_subtitle2(vst.sub_codec_ctx, @subt, @got_sub, @pkt);
    if ret >= 0
    then begin
     if got_sub = 1
     then begin
       for i := 0 to subt.num_rects-1
       do begin
          s := subt.rects[i].text;
          if (subt.rects[i].text <> '') or
             (subt.rects[i].ass <> '')
          then  raise Exception.Create(s);
       end;

     end;
    end;

    av_packet_unref(pkt);
    end;

    I’m trying to build a video player using ffmpeg + sdl2 with Delphi. I found an example for this which did play video without problems but had problems with audio. Audio is solved by inspecting the ffplay example in c/c++ and translating the audio part to Delphi. I tried to translate complete ffplay but I had strange behavior on video part, it starts playing but after a few seconds audio is going on without problems, while video is getting green screen.

    Something is not going well while calling "decoder_decode_frame" function or "video_refresh" in case of video shomehow ?
    However, I am, so far, able to decode/play audio and video streams synchronized. At the moment picture/video quality can be better, but this is for later.

    The problem :
    I am using the code above to decode the subtitle stream.
    initializing and opening the codec is succeeds "avcodec_open2", queueing packets is succeeds, retrieving packet succeeds at the right moment when it should be displayed.

    "avcodec_decode_subtitle2" function succeeds, result is > 0, got_frame variable is assigned "1", avsubtitle(subt) is being assigned.
    I do not get any errors or warnings everyting seems to be correct except the value of avsubtitle.

    subt format is 1 this seems to be the problem, inspecting ffplay.c
    subt start_display_time is 0
    subt end_display_time is 0
    subt num_rects is 1

    rects ppAVSubtitleRect is assigned with values zero/nil
    rects type_ is subtitle_none

    Playing a *.mkv file, subtitle information from codec is
    codec name ’srt’
    codec long_name ’SubRip subtitle’


    If this type of subtitle is not supported, why can we decode it without any warnings or errors ?
    If it is possible to get the subtitle text, how can I achieve this ?


    AVSubtitle = record
    format: uint16_t;             (* 0 = graphics *)
    start_display_time: uint32_t; (* relative to packet pts, in ms *)
    end_display_time: uint32_t;   (* relative to packet pts, in ms *)
    num_rects: unsigned;
    rects: ppAVSubtitleRect;
    pts: int64_t; // < Same as packet pts, in AV_TIME_BASE
    end;

    AVSubtitleType = (                //
    SUBTITLE_NONE, SUBTITLE_BITMAP, // < A bitmap, pict will be set
    (*
     * Plain text, the text field must be set by the decoder and is
     * authoritative. ass and pict fields may contain approximations.
    *)
    SUBTITLE_TEXT,
    (*
     * Formatted text, the ass field must be set by the decoder and is
     * authoritative. pict and text fields may contain approximations.
    *)
    SUBTITLE_ASS);

    AVSubtitleRect = record
     x: int;         // < top left corner  of pict, undefined when pict is not set
     y: int;         // < top left corner  of pict, undefined when pict is not set
     w: int;         // < width            of pict, undefined when pict is not set
     h: int;         // < height           of pict, undefined when pict is not set
     nb_colors: int; // < number of colors in pict, undefined when pict is not set

    {$IFDEF FF_API_AVPICTURE}
    (*
     * @deprecated unused
    *)
    // attribute_deprecated
    pict: AVPicture deprecated;
    {$ENDIF}
    (*
     * data+linesize for the bitmap of this subtitle.
     * Can be set for text/ass as well once they are rendered.
    *)
    data: puint8_t_array_4;
    linesize: Tint_array_4;

    _type: AVSubtitleType;

    text: pAnsiChar; // < 0 terminated plain UTF-8 text

    (*
     * 0 terminated ASS/SSA compatible event line.
     * The presentation of this is unaffected by the other values in this
     * struct.
    *)
    ass: pAnsiChar;

    flags: int;
    end;

    -----------edit----------------------

    SetLength(buf, 0);
    for i := 0 to pkt.size-1
    do begin
     Insert(pkt.data[i], buf, length(buf));
    end;

    s := TEncoding.UTF8.GetString(buf);

    It seems that in this case the text is stored in pkt.data, I don’t think this is the right way to get the subtitle text but I wonder why avsubtitle doesn’t get the values. avpacket values seem like, (pts, dts, duration) etc, to be correct.
    If I should use such construction to get the subtitle (text)value, how can I detect if it is utf8 encoded or how to determine the encoding ?
    There are more questions to be answered like, the position of the subtitle. The bad thing about ffmpeg is it’s almost impossible to get answers.

    ------------------edi2----------------------------------
    Ok how I am solving this, is creating in memory a png image with transparency and writing text over it, converting the image to PAVRAME and show at the given pts time + duration. For the positioning is chosen horizontal center for each line and vertically the bottom minus X pixels. Looks like it’s working so far.

    Next ; the formatting of the text, like bold italic etc. Can anybody give a hint if there is a quick solution(function/method/example), I will try to create one, but a quick solution is welcome. As long as there is no nested formatting is used, it doesn’t sound tricky, but I’ve read that nested formatting can be used.

    Should it be that this(formatted text) the reason is why ffmpeg is not assigning any values to avsubtitle ?

  • Build Opencv3.1 with ffmpeg

    10 mai 2018, par batuman

    I tried to build Opencv3.1 at Ubuntu16.04 with ffmpeg.
    I follow the instructions how to install ffmpeg at here.

    According to this discussion ,I checked.

    >> mediainfo ~/Desktop/grb_2.mp4
    General
    Complete name                            : /home/nyan/Desktop/grb_2.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    File size                                : 445 KiB
    Duration                                 : 27s 862ms
    Overall bit rate                         : 131 Kbps
    Encoded date                             : UTC 1904-01-01 00:00:00
    Tagged date                              : UTC 1904-01-01 00:00:00
    Writing application                      : Lavf57.66.105

    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L3
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 27s 862ms
    Bit rate                                 : 128 Kbps
    Width                                    : 720 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 4:3
    Original display aspect ratio            : 4:3
    Frame rate mode                          : Constant
    Frame rate                               : 29.970 (30000/1001) fps
    Standard                                 : NTSC
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.012
    Stream size                              : 435 KiB (98%)
    Writing library                          : x264 core 148
    Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Encoded date                             : UTC 1904-01-01 00:00:00
    Tagged date                              : UTC 1904-01-01 00:00:00





    ffmpeg -codecs | grep -i avc
    ffmpeg version N-90982-gb995ec0 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
     configuration: --prefix=/home/nyan/ffmpeg_build --enable-shared --extra-cflags=-I/home/nyan/ffmpeg_build/include --extra-ldflags=-L/home/nyan/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/nyan/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
     libavutil      56. 18.100 / 56. 18.100
     libavcodec     58. 19.100 / 58. 19.100
     libavformat    58. 13.101 / 58. 13.101
     libavdevice    58.  4.100 / 58.  4.100
     libavfilter     7. 21.100 /  7. 21.100
     libswscale      5.  2.100 /  5.  2.100
     libswresample   3.  2.100 /  3.  2.100
     libpostproc    55.  2.100 / 55.  2.100
    DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_v4l2m2m h264_vaapi )
    D.A.L. avc                  On2 Audio for Video Codec (decoders: on2avc )

    So my ffmpeg installation is ok.

    When I cmake to my Opencv, I have set up to ffmpeg as

    enter image description here

    But when I make to compile, I have error as

    make[2]: *** No rule to make target '/home/nyan/ffmpeg_build/lib/libavresample.a', needed by 'lib/libopencv_videoio.so.3.1.0'.  Stop.
    CMakeFiles/Makefile2:8709: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
    make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
    Makefile:160: recipe for target 'all' failed
    make: *** [all] Error 2

    How can I fix the problem ?

    I install libavresample manually and

    sudo apt-get install libavresample-dev
    [sudo] password for nyan:
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    libavresample-dev is already the newest version (7:2.8.14-0ubuntu0.16.04.1).

    It is newest version.

    EDIT:

    Actually libavresample at ffmpeg is deprecated already.
    So I tried to install Opencv3.4.1 higher version.
    Compile, build and installation are fine.
    But VideoCapture cap(0); does not read from the device.
    So I checked ffmpeg at Opencv3.4.1 installation as

    python -c "import cv2; print(cv2.getBuildInformation())" | grep -i ffmpeg

    FFMMPEG IS NO. So build with ffmpeg is not successful even though there was no error at build for Opencv3.4.1.

  • ffmpeg use on iOS

    2 juillet 2015, par Chuck Mc Duran

    I understand that to use FFmpeg in an iOS app, you use the ./configure and make to generate the .a files, that you will add to the project.

    My question is, once the .a files show up in the project navigator and in the Link Binary With Libraries section, how do you actually use them in your classes ?, I see there is no "framework" to use in an #import statement, so I don’t know how to access the classes methods and properties.