Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (73)

  • 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

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

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

Sur d’autres sites (6610)

  • FFMPEG C++ Volume Filter

    18 mai 2020, par Hrethric

    I seem to be having a bit of trouble using FFMPEG audio filters in C++ code. If I only have "abuffer" and "abuffersink" filters, and grab the audio frame from the filtergraph, it sounds perfect. Once I add another filter into the graph (in this case, it's a "volume" filter), there is a lot of noise introduced. I can't figure out what would be causing this.

    



    This isn't the case for all filters - "aecho" works just fine, for example. Any thoughts ? Here's the relevant code :

    



    Filter Creation

    



    char args[512];
int ret = 0;

_filterGraph = avfilter_graph_alloc();

// abuffer must be the first filter used -- it feeds data into the filter graph
/******************
ABUFFER FILTER
*******************/
_abufferFilter = avfilter_get_by_name("abuffer");

/*buffer audio source : decoded frames will be
inserted here. */
if (!_inAudioCodecContext->channel_layout)
{
    _inAudioCodecContext->channel_layout = av_get_default_channel_layout(_inAudioStream->codec->channels);
}

snprintf(args, sizeof(args),
    "sample_rate=%d:sample_fmt=%s:channel_layout=0x%" PRIx64,
    _inAudioCodecContext->sample_rate,
    av_get_sample_fmt_name(_inAudioCodecContext->sample_fmt),
    _inAudioCodecContext->channel_layout);

ret = avfilter_graph_create_filter(&_abufferFilterCtx, _abufferFilter, "abuffer", args, NULL, _filterGraph);
char *errorCode = new char[256];
av_strerror(ret, errorCode, 256);

/******************
VOLUME FILTER
*******************/
snprintf(args, sizeof(args),
    "%f",
    2.0f);
_volumeFilter = avfilter_get_by_name("volume");
ret = avfilter_graph_create_filter(&_volumeFilterCtx, _volumeFilter, "volume", args, NULL, _filterGraph);
char *errorCode = new char[256];
av_strerror(ret, errorCode, 256);

/******************
ABUFFERSINK FILTER
*******************/
// abuffersink must be the last filter used -- it gets data out of the filter graph
_abuffersinkFilter = avfilter_get_by_name("abuffersink");
ret = avfilter_graph_create_filter(&_abufferSinkFilterCtx, _abuffersinkFilter, "abuffersink", NULL, NULL, _filterGraph);

// Link the source buffer to the volume filter
// If I link this to the sink buffer and comment out the next line
// Audio sounds perfect
ret = avfilter_link(_abufferFilterCtx, 0, _volumeFilterCtx, 0);
// Link the volume filter to the sink buffer
ret = avfilter_link(_volumeFilterCtx, 0, _abufferSinkFilterCtx, 0);
ret = avfilter_graph_config(_filterGraph, NULL);

return ret;


    



    Read frames from buffer

    



    // Read a frame from the audio stream/file
ret = av_read_frame(_inFormatContext, &_packet);
int frameFinished = 0;
// Decode the resulting packet into a single frame for processing
int length = avcodec_decode_audio4(_inAudioCodecContext, _audioFrame, &frameFinished, &_packet);

if (frameFinished)
{
    // Insert the frame into the source filter
    ret = av_buffersrc_write_frame(_abufferFilterCtx, _audioFrame);
    while (true)
    {
        // Pull a frame from the filter graph
        ret = av_buffersink_get_frame(_abufferSinkFilterCtx, _audioFrame);

        // EOF or EAGAIN is expected when filtering frames, set the error to "0"
        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
        {
            ret = 0;
            break;
        }
        if (ret < 0)
        {
            break;
        }
    }

    // This keeps going, doing some resampling and conversion based on codec output selection, but that isn't relevant to the issue


    


  • FFmpeg raw h.264 set pts value

    19 mai 2020, par thecaptain0220

    I am currently using ffmpeg to convert a custom container media format to mp4. It is straightforward to dump all the h.264 frames to one file and the aac audio to another. Then I can combine the two and create an mp4 file with ffmpeg.

    



    The problem is that the video source isn't always perfect. From time to time frames are dropped or late etc. This causes an A/V sync issue since the pts is generated using a constant rate by ffmpeg. The source format I am using has the PTS value but I cant figure out a way to pass it to ffmpeg with the raw h.264 frames.

    



    I suppose it would be possible to create a demuxer for the custom format, but it seems like a lot effort. I looked into ffmpeg's .nut container format thinking that I might be able to convert from the custom container to .nut first. Unfortunately it seems more complex than it looks on the surface.

    



    It seems like there should be an easy way to pass a frame and its PTS value to ffmpeg, but I haven't come across it yet. Any help would be appreciated.

    



    Here is the ffmpeg command I am using

    



    ffmpeg -f s16le -ac 1 -ar 48k -i source.audio -framerate 20 -i source.video -c:a aac -b:a 64k -r 20 -c:v h264_nvenc -rc:v vbr_hq -cq:v 19 -n out.mp4


    


  • Compiling ffmpeg for iOS 5.1

    11 septembre 2012, par Vlad Bogdan

    I followed jold's steps from here :

    problem compiling ffmpeg for iFrameExtractor

    When i try jold's solution i get the following error for armv6 and armv7. i386 works perfect.

    lipo : can't open input file : armv6/libavcodec.a (No such file or directory)

    lipo : can't open input file : armv6/libavutil.a (No such file or directory

    lipo : can't open input file : armv6/libswscale.a (No such file or directory)

    When the script ends i have only libadevice.a and libavformat.a in /armv7 and /armv6.

    Why ?