Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (108)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (15700)

  • lavu/frame : add QP side data

    1er mars 2018, par wm4
    lavu/frame : add QP side data
    

    This adds a way for an API user to transfer QP data and metadata without
    having to keep the reference to AVFrame, and without having to
    explicitly care about QP APIs. It might also provide a way to finally
    remove the deprecated QP related fields. In the end, the QP table should
    be handled in a very similar way to e.g. AV_FRAME_DATA_MOTION_VECTORS.

    There are two side data types, because I didn't care about having to
    repack the QP data so the table and the metadata are in a single
    AVBufferRef. Otherwise it would have either required a copy on decoding
    (extra slowdown for something as obscure as the QP data), or would have
    required making intrusive changes to the codecs which support export of
    this data.

    The new side data types are added under deprecation guards, because I
    don't intend to change the status of the QP export as being deprecated
    (as it was before this patch too).

    • [DH] doc/APIchanges
    • [DH] libavutil/frame.c
    • [DH] libavutil/frame.h
    • [DH] libavutil/version.h
    • [DH] tests/ref/fate/exif-image-embedded
    • [DH] tests/ref/fate/exif-image-jpg
  • pipe:0 : could not find codec parameters

    10 avril 2018, par Harish

    I am trying to store streaming video as a segments of 15 min,it is working fine with gst-launch-1.0 my command is

    gst-launch-1.0 -e --gst-debug-level=2 v4l2src device=/dev/video0 ! vspmfilter outbuf-alloc=true ! \
    video/x-raw,width=640,height=480,framerate=15/2 ! omxh264enc target-bitrate=10485760 num-p-frames=0 ! \
    mpegtsmux name="muxer" ! fdsink fd=1 \
    alsasrc device=hw:0,0 latency-time=30000 buffer-time=800000 ! audioconvert ! audio/x-raw,format=S16LE,channel=2,rate=44100 ! \
    faac bitrate=128000 ! muxer. \
    | /usr/bin/ffmpeg -v info -i pipe:0 -map 0 -c copy -f segment \
    -reset_timestamps 1 -segment_atclocktime 1 -segment_time 900 \
    -segment_list_type csv -segment_list_size 0 \
    -segment_list /home/root/ContinuousCapture/CamFiles.txt
    -segment_list_entry_prefix /home/root/ContinuousCapture/ \
    -segment_format mpegts -strftime 1 /home/root/ContinuousCapture/video_%g%m%d_%H%M%S.mpegts

    I changed same command to gstd,my command is

    gstd-client pipeline_create p v4l2src device=/dev/video0 ! ${textoverlay} text=${dev0} ! ${clockoverlay} ! vspmfilter outbuf-alloc=true ! \
    video/x-raw,width=640,height=480,framerate=15/2 ! omxh264enc target-bitrate=10485760 num-p-frames=0 \
    mpegtsmux name="muxer" ! fdsink fd=1 \
    alsasrc device=hw:0,0 latency-time=30000 buffer-time=800000 ! audioconvert ! audio/x-raw,format=S16LE,channel=2,rate=44100 ! \
    faac bitrate=128000 ! muxer. \
    gstd-client pipeline_play p | /usr/bin/ffmpeg  -v info -i pipe:0 -map 0 -c copy -f segment \
    -reset_timestamps 1 -segment_atclocktime 1 -segment_time 900 \
    -segment_list_type csv -segment_list_size 0 \
    -segment_list /home/root/ContinuousCapture/CamFiles.txt -segment_list_entry_prefix /home/root/ContinuousCapture/ \
    -segment_format mpegts -strftime 1 /home/root/ContinuousCapture/video_%g%m%d_%H%M%S.mpegts

    its giving me the following error

    libdir=/usr/lib --shlibdir=/usr/lib --datadir=/usr/share/ffmpeg --disable-mipsdsp --disable-mipsdspr2 --cpu=generic --pkg-config=pkg-config --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --disable-avresample --enable-bzlib --enable-gpl --disable-libgsm --disable-indev=jack --disable-libvorbis --disable-libmp3lame --disable-openssl --enable-postproc --disable-libschroedinger --disable-sdl2 --disable-libspeex --enable-swresample --enable-swscale --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvpx --enable-libx264 --enable-outdev=xv
    libavutil      55. 58.100 / 55. 58.100
    libavcodec     57. 89.100 / 57. 89.100
    libavformat    57. 71.100 / 57. 71.100
    libavdevice    57.  6.100 / 57.  6.100
    libavfilter     6. 82.100 /  6. 82.100
    libswscale      4.  6.100 /  4.  6.100
    libswresample   2.  7.100 /  2.  7.100
    libpostproc    54.  5.100 / 54.  5.100
    [mpegts @ 0x49450] Format mpegts detected only with low score of 2, misdetection possible!
    [mpegts @ 0x49450] Could not detect TS packet size, defaulting to non-FEC/DVHS
    pipe:0: could not find codec parameters

    Thank you

  • Live555 truncates encoded data of FFMpeg

    22 novembre 2019, par Harshil Makwana

    I am trying to stream H264 based data using Live555 over RTSP.

    I am capturing data using V4L2, and then encodes it using FFMPEG and then passing data to Live555’s DeviceSource file, in that I using H264VideoStreamFramer class,

    Below is my codec settings to configure AVCodecContext of encoder,

    codec = avcodec_find_encoder_by_name(CODEC_NAME);
    if (!codec) {
       cerr << "Codec " << codec_name << " not found\n";
       exit(1);
    }

    c = avcodec_alloc_context3(codec);
    if (!c) {
       cerr << "Could not allocate video codec context\n";
       exit(1);
    }

    pkt = av_packet_alloc();
    if (!pkt)
       exit(1);

    /* put sample parameters */
    c->bit_rate = 400000;
    /* resolution must be a multiple of two */
    c->width = PIC_HEIGHT;
    c->height = PIC_WIDTH;
    /* frames per second */
    c->time_base = (AVRational){1, FPS};
    c->framerate = (AVRational){FPS, 1};
    c->gop_size = 10;
    c->max_b_frames = 1;
    c->pix_fmt = AV_PIX_FMT_YUV420P;
    c->rtp_payload_size = 30000;
    if (codec->id == AV_CODEC_ID_H264)
       av_opt_set(c->priv_data, "preset", "fast", 0);
    av_opt_set_int(c->priv_data, "slice-max-size", 30000, 0);
    /* open it */
    ret = avcodec_open2(c, codec, NULL);
    if (ret < 0) {
       cerr << "Could not open codec\n";
       exit(1);
    }

    And I am getting encoded data using avcodec_receive_packet() function. which will return AVPacket.

    And I am passing AVPacket’s data into DeviceSource file below is code snippet of my Live555 code :

    void DeviceSource::deliverFrame() {
       if (!isCurrentlyAwaitingData()) return; // we're not ready for the data yet

       u_int8_t* newFrameDataStart = (u_int8_t*) pkt->data;
       unsigned newFrameSize = pkt->size; //%%% TO BE WRITTEN %%%
       // Deliver the data here:
       if (newFrameSize > fMaxSize) { // Condition becomes true many times
           fFrameSize = fMaxSize;
           fNumTruncatedBytes = newFrameSize - fMaxSize;
       } else {
           fFrameSize = newFrameSize;
       }
       gettimeofday(&fPresentationTime, NULL); // If you have a more accurate time - e.g., from an encoder - then use that instead.
       // If the device is *not* a 'live source' (e.g., it comes instead from a file or buffer), then set "fDurationInMicroseconds" here.
       memmove(fTo, newFrameDataStart, fFrameSize);
    }

    But here, sometimes my packet’s size is getting more than fMaxSize value and as per LIVE555 logic it will truncate frame data, so that sometimes I am getting bad frames on my VLC,

    From Live555 forum, I get to know that encoder should not send packet whose size is more than fMaxSize value, so my question is :

    How to restrict encoder to limit size of packet ?

    Thanks in Advance,

    Harshil