Recherche avancée

Médias (0)

Mot : - Tags -/serveur

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (80)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

  • libswresample : swr_convert() not producing enough samples

    20 septembre 2016, par Tsherr

    I’m trying to use ffmpeg/libswresample to resample streaming audio in my c++ application. Changing the sample width works well and the result sounds as one would expect ; however, when changing the sample rate the result is somewhat crackly. I am unsure if it is due to incorrect usage of the libswresample library, or if I’m misunderstanding the resampling theory.

    Here is my resampling process, simplified for demonstration’s sake :

    //Externally supplied data
    const uint8_t* in_samples //contains the audio data to be resampled
    int in_num_samples = 256

    //Set up resampling context
    SwrContext *swr = swr_alloc();
    av_opt_set_channel_layout(swr, "in_channel_layout", AV_CH_LAYOUT_STEREO, 0);
    av_opt_set_channel_layout(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
    av_opt_set_int(swr, "in_sample_rate", 44100, 0);
    av_opt_set_int(swr, "out_sample_rate", 22050, 0);
    av_opt_set_sample_fmt(swr, "in_sample_fmt", AV_SAMPLE_FMT_FLT, 0);
    av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_FLT, 0);
    swr_init(swr);

    //Perform the resampe
    uint8_t* out_samples;
    int out_num_samples = av_rescale_rnd(swr_get_delay(swr, in_samplerate) + in_num_samples, out_samplerate, in_samplerate, AV_ROUND_UP);
    av_samples_alloc(&out_samples, NULL, out_num_channels, out_num_samples, AV_SAMPLE_FMT_FLT, 0);
    out_num_samples = swr_convert(swr, &out_samples, out_num_samples, &in_samples, in_num_samples);
    av_freep(&out_samples);
    swr_free(&swr);

    I suspect that the reason the resampled audio does not sound right is because swr_convert() returns 112, where I expect it to return 128 (the number of samples of the resampled audio) :
    Downsampling 256 samples from a samplerate of 44100 to a samplerate of 22050 should yield 128 samples, yet swr_convert() is producing 112 samples. When expressed in terms of audio duration this is also puzzling. 256 samples at 44100 = 5.8 ms, but 112 samples at 22050 = 5.07 ms. Shouldn’t the downsampling process not alter the duration of the resampled audio ?

    I have also stepped through an example provided with ffmpeg, in which swr_convert() also returns a smaller number than I would expect. So, I suspect that the problem is not due to a bug in libswresample but rather my own lack of understanding.

  • ffmpeg Error initializing output stream 0:0 — Error while opening encoder for output stream

    23 juin 2018, par gufidown

    I am a newbie in terms of video processing in general and ffmpeg in particular. So this might be a real beginner’s question.

    I am trying to extract frames from an avi. This is the command :

    ffmpeg.exe -i 123.avi -vf select='gt(scene\,0.4)',scale=1920:-1,tile=6x3 -frames:v 1 456.jpg

    And this is the console output :

    ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --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-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Input #0, avi, from 'C:\work\exports\123.avi':
     Duration: 00:02:12.43, start: 0.000000, bitrate: 4455 kb/s
       Stream #0:0: Video: rawvideo, pal8, 164x485, 4459 kb/s, 7 fps, 7 tbr, 7 tbn, 7 tbc
       Metadata:
         title           : FileAVI write  
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    [swscaler @ 000000eb4f415ec0] deprecated pixel format used, make sure you did set range correctly
    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
    Conversion failed!

    Do I need a particular encoder when working with avi files ? Which one and how do I specify it ?

  • gstreamer h264 multicast missing SPS/PPS information

    6 mars 2015, par RBI

    I have two video streaming units capable of streaming live video inputs :

    • AXIS Q7424-R Video Encoder
    • EPIPHAN VGADVI Broadcaster 99460 -

    I am using gstreamer to view these streams on client terminals running linux. I am interested in the h264, rtp multicast streams (which both units support).

    I can stream the Epiphan video using the following gstreamer pipeline :

    gst-launch-0.10 udpsrc multicast-group=ADDRESS port=PORT caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtph264depay ! ffdec_h254 ! autovideosink

    However, this pipeline does not work for the Axis unit as I get the following error repeatedly :

    ffmpeg:0:: non-existing PPS referenced
    ffmpeg:0:: non-existing PPS 0 referenced
    ffmpeg:0:: decode_slice_header error
    ffmpeg:0:: no frame!
    ffdec_h264: decoding error (len:-1, have_data: 0)

    I have read that this error means that the ffmpeg decoder is missing the SPS/PPS information provided by a keyframe. The axis unit has a GOV parameter which is the interval at which i-frames are sent ; it is set to 32.

    Note that I can view both units’ rtp streams in unicast with the following :

    gst-launch-0.10 rtspsrc location=rtsp://ADDRESS:PORT/... latency=100 ! rtph264depay ! ffdec_h264 ! autovideosink

    Since unicast works and the unicast and multicast pipelines are the same (except for the source), my guess is either :

    • My udpsrc caps are simply incorrect for the axis stream (and I don’t really know where/how to verify it)

    • or, the axis multicast format/encoding is different and requires a modification to the pipeline (I find this unlikely since unicast is working and I don’t understand why the encoding would change between unicast/multicast).

    Any suggestions are appreciated as I am limited by my knowledge of gstreamer and media formats in terms of what to try next.