Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (29)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (2329)

  • Why MP4 generated through FFmpeg API can't be played in the Windows Media Player ?

    2 septembre 2021, par James

    I encoded some frames into a MP4 using FFmpeg API, but the MP4 could't be played in the Windows Media Player.

    


    By comparison with the normal MP4 using ffprobe, I found that the FOURCC of the problematic MP4 is 'H264' while the normal MP4 is 'AVC1'.
According to H.264 Video Types, 'AVC1' has start codes but 'H264' hasn't.I also learned that we shoud manually add sps and pps before H.264 stream when demuxing a MP4.

    


    Now I don't know how to add start code or sps/pps to my MP4, please give me a hand.
How I should do to generate a MP4 which can be played in the Windows Media Player ?

    


    I have tried to add h264 bitstream filter but it didn't work. The code below :

    


     AVBitStreamFilterContext *bsfc = NULL;
bsfc = av_bitstream_filter_init("h264_mp4toannexb");
if (bsfc == NULL) {
            printf("bsfc is NULL\n");
}
        
av_bitstream_filter_filter(bsfc, codec_ctx, NULL, &(pkt->data), &(pkt->size), pkt->data, pkt->size, 0);

av_bitstream_filter_close(bsfc);


    


    After a lot of trying, I found that manually adding sps and pps to codec_ctx->extradata effective :

    


    unsigned char sps_pps[23] = { 0x00, 0x00, 0x00, 0x01, 0x67, 0x64, 0x00, 0x29, 0xac, 0x1b, 0x1a, 0x12, 0xe0, 0x51, 0x90,
                              0x00, 0x00, 0x00, 0x01, 0x68, 0xea, 0x43, 0xcb };
codec_ctx->extradata_size = 23;
codec_ctx->extradata = (uint8_t*)av_malloc(23 + AV_INPUT_BUFFER_PADDING_SIZE);
if (codec_ctx->extradata == NULL) {
    printf("could not av_malloc the video params extradata!\n");
    ERR_NULL_EXIT
    }
memcpy(codec_ctx->extradata, sps_pps, 23);


    


    The code above refered to an answer of @szatmary

    


    Now generated MP4 can be played in Windows Media Player. But a new question emerges because I don't konw what correct value of sps/pps is. It cause that the width and height of frame presented in the Windows Explorer is incorrect. So I need to set the correct sps/pps. I also read the document of sps/pps but get confused because some parameters have variable bits. So can anybody tell me how to set the sps/pps correctly ?

    


  • Videos which is only played by particular app, need help to save it

    19 septembre 2015, par Kumar

    There’s a app(i can’t disclose the app name) which plays video stored in memory card and videos have no extension, by viewing the file sizes im assuming that they are the videos + I also check changing the extension with mp4 flv 3gp etc but no success. I then decompiled the app and saw that app is using ffmpeg-jni to play the videos. Anybody can help me in this ? and yeah all videos have IGN in their meta tag.

    Thanks

  • how to conver ima_adpcm to pcm that can be played

    21 décembre 2016, par kingjxu

    I am using ffmpeg to decoder wav file with ima_adpcm. I use both avresample_convert() and swr_convert() to convert an 8000hz, 1 channel s16p audio sample to 8000hz, 2 channel s16 audio sample. After converting, there is something wrong with it, it can’t be played normally.

    I had ever converted a wav file with pcm data(AVCODEC_ID_PCM_U8), and it succeed.
    I would like to know if there some special characteristic for ima_adpcm that I forgot to handle ?

    Here is some code for dealing with it

    m_pAudioResCodecCtx = avresample_alloc_context();

    av_opt_set_int(m_pAudioResCodecCtx, "in_channel_layout",    m_pAudioCodecCtx->channel_layout,   0);

    av_opt_set_int(m_pAudioResCodecCtx, "in_sample_fmt",        m_pAudioCodecCtx->sample_fmt,       0);    
    av_opt_set_int(m_pAudioResCodecCtx, "in_sample_rate",       m_pAudioCodecCtx->sample_rate,      0);

    av_opt_set_int(m_pAudioResCodecCtx, "out_channel_layout",   channel_layout, 0);
    av_opt_set_int(m_pAudioResCodecCtx, "out_sample_fmt", AV_SAMPLE_FMT_S16,                0);
    av_opt_set_int(m_pAudioResCodecCtx, "out_sample_rate",      m_pAudioCodecCtx->sample_rate,      0);

    av_opt_set_int(m_pAudioResCodecCtx, "internal_sample_fmt",  AV_SAMPLE_FMT_FLTP,                 0);                
    int ffmpeg_error = avresample_open(m_pAudioResCodecCtx);

    ...............

    if (m_pAudioResCodecCtx != NULL)
    {
    LPBYTE out_bufs[AV_NUM_DATA_POINTERS] = { 0 };
    int out_linesize = 0;

    int ffmpeg_err = av_samples_fill_arrays(out_bufs, &out_linesize, dst_buf,  iChannelsCount * m_iChannelScale, avframe.nb_samples, AV_SAMPLE_FMT_S16, 1);

    int samples = avresample_convert(m_pAudioResCodecCtx, out_bufs, out_linesize, avframe.nb_samples, (uint8_t**)avframe.data, avframe.linesize[0], avframe.nb_samples);

    int data_length = samples * iChannelsCount * m_iChannelScale * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16);

    and avframe is decoded packet.