Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (21)

  • 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

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (3293)

  • compiling ffmpeg_g.exe on mingw

    21 janvier 2014, par user3219986

    I have compiled ffmpeg from source using MSYS2 & MinGW. The library files : libavcodec.a, libavdvice.a libavfilter.a libavformat.a libavutila libpostproc.a libswresample.a libswscale.a were created successfully after running make and when it proceeds to build ffmpeg_g.exe I am getting lot of undefined references. Using -d option in make I found out that the command passed for building ffmpeg_g is :

    g++ -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,—nxcompat -Wl,—dynamicbase -Wl,—as-needed -Wl,—warn-common-Wl,-rpathlink=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -o ffmpeg_g.exe ffmpeg_opt.o ffmpeg_filter.o ffmpeg.o cmdutils.o -lavdevice -lavfilter -lavformat -lavcodec -lpostproc -lswresample -lswscale -lavutil -lavicap32 -lpsapi -lole32 -lstrmiids -luuid -lws2_32 -lx264 -lvorbisenc -lvorbis -logg -lopenjpeg -lmp3lame -lbluray -L/mingw32/lib -lass -lm -lharfbuzz -lfontconfig -lexpat -lfreetype -lexpat -lenca -lm -lfribidi -lglib-2.0 -lintl -lws2_32 -lole32 -lwinmm -lshlwapi -lintl -lfreetype -lz -lbz2 -lm -lbz2 -lz -lpsapi -ladvapi32 -lshell32

    The output is given below :

    ffmpeg_opt.o : In function

    new_output_stream':
    E:\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:1036: undefined reference to

    avcodec_get_context_defaults3'
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:1089 : undefined reference to

    av_get_exact_bits_per_sample'
    ffmpeg_opt.o: In function

    find_codec_or_die' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:514 : undefined reference to

    avcodec_find_encoder_by_name'
    ffmpeg_opt.o: In function

    choose_encoder' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:965 : undefined reference to

    avcodec_find_encoder'
    ffmpeg_opt.o: In function

    find_codec_or_die' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:518 : undefined reference to

    avcodec_find_encoder'
    E:\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:514: undefined reference to

    avcodec_find_decoder_by_name'
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:518 : undefined reference to

    avcodec_find_decoder'
    ffmpeg_opt.o: In function

    add_input_streams' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:596 : undefined reference to

    av_codec_get_lowres'
    ffmpeg_opt.o: In function

    choose_decoder' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:546 : undefined reference to

    avcodec_find_decoder'
    ffmpeg_opt.o: In function

    add_input_streams' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:546 : undefined reference to

    avcodec_find_decoder'
    ffmpeg_opt.o: In function

    open_input_file' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:872 : undefined reference to

    avcodec_get_class'
    ffmpeg_opt.o: In function

    add_input_streams' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:631 : undefined reference to

    avcodec_find_decoder'
    E:\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/ffmpeg_opt.c:595: undefined reference to

    avcodec_find_decoder'
    ........................ so many undefined references followed by :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/libavcodec/mlpdsp.c:64 : undefined reference to

    ff_mlpdsp_init_x86'
    libavcodec/libavcodec.a(mpegaudiodsp.o): In function

    ff_mpadsp_init' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/libavcodec/mpegaudiodsp.c:46 : undefined reference to

    ff_mpadsp_init_x86'
    libavcodec/libavcodec.a(cavsdsp.o): In function

    ff_cavsdsp_init' :
    E :\software\pkg\ffmpeg-2.1.3.tar\ffmpeg-2.1.3\ffmpeg-2.1.3/libavcodec/cavsdsp.c:565 : undefined reference to `ff_cavsdsp_init_x86'
    collect2.exe : error : ld returned 1 exit status

    LD ffmpeg_g.exe
    Reaping losing child 01584DA0 PID 29691080
    Makefile:105 : recipe for target 'ffmpeg_g.exe' failed
    Removing child 01584DA0 PID 29691080 from chain.

    Kindly tell me why the compilation fails.... Thanks in advance

  • ffmpeg : rollover of segment numbering when restart encoding

    27 août 2017, par Bino Oetomo

    my ffmpeg command is :

    ffmpeg  -i http://someaddress.bno/live01.m3u8 \
    -c:v copy -c:a aac \
    -strict -2 \
    -hls_time 20 \
    -hls_list_size 15 \
    -hls_wrap $3 \
    -hls_segment_filename /opt/videoroot/%010d.ts \
    -f hls /opt/videoroot/index.m3u8

    First run segment files :

    -rw-rw-r-- 1 bino bino  975156 Agu 27 07:03 0000000000.ts
    -rw-rw-r-- 1 bino bino 1102808 Agu 27 07:03 0000000001.ts
    -rw-rw-r-- 1 bino bino  868936 Agu 27 07:04 0000000002.ts
    -rw-rw-r-- 1 bino bino 1074232 Agu 27 07:04 0000000003.ts
    -rw-rw-r-- 1 bino bino 1017832 Agu 27 07:04 0000000004.ts
    -rw-rw-r-- 1 bino bino  917064 Agu 27 07:05 0000000005.ts
    -rw-rw-r-- 1 bino bino  968952 Agu 27 07:05 0000000006.ts
    -rw-rw-r-- 1 bino bino  839984 Agu 27 07:05 0000000007.ts
    -rw-rw-r-- 1 bino bino  261508 Agu 27 07:05 0000000008.ts
    -rw-rw-r-- 1 bino bino  494252 Agu 27 07:01 0000000009.ts
    -rw-rw-r-- 1 bino bino 1014824 Agu 27 07:02 0000000010.ts
    -rw-rw-r-- 1 bino bino  929660 Agu 27 07:02 0000000011.ts
    -rw-rw-r-- 1 bino bino 1062388 Agu 27 07:02 0000000012.ts
    -rw-rw-r-- 1 bino bino  943572 Agu 27 07:02 0000000013.ts
    -rw-rw-r-- 1 bino bino  991512 Agu 27 07:03 0000000014.ts

    First index.m3u8 :

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:20
    #EXT-X-MEDIA-SEQUENCE:39
    #EXTINF:10.000000,
    0000000009.ts
    #EXTINF:20.000000,
    0000000010.ts
    #EXTINF:20.000000,
    0000000011.ts
    #EXTINF:20.000000,
    0000000012.ts
    #EXTINF:20.000000,
    0000000013.ts
    #EXTINF:20.000000,
    0000000014.ts
    #EXTINF:20.000000,
    0000000000.ts
    #EXTINF:20.000000,
    0000000001.ts
    #EXTINF:20.000000,
    0000000002.ts
    #EXTINF:20.000000,
    0000000003.ts
    #EXTINF:20.000000,
    0000000004.ts
    #EXTINF:20.000000,
    0000000005.ts
    #EXTINF:20.000000,
    0000000006.ts
    #EXTINF:20.000000,
    0000000007.ts
    #EXTINF:5.866667,
    0000000008.ts
    #EXT-X-ENDLIST

    I quit encoding, and re-run.

    2nd run segment files :
    -rw-rw-r-- 1 bino bino  911048 Agu 27 07:10 0000000000.ts
    -rw-rw-r-- 1 bino bino  924960 Agu 27 07:10 0000000001.ts
    -rw-rw-r-- 1 bino bino 1046972 Agu 27 07:10 0000000002.ts
    -rw-rw-r-- 1 bino bino  953348 Agu 27 07:11 0000000003.ts
    -rw-rw-r-- 1 bino bino 1030804 Agu 27 07:11 0000000004.ts
    -rw-rw-r-- 1 bino bino 1022532 Agu 27 07:12 0000000005.ts
    -rw-rw-r-- 1 bino bino  926276 Agu 27 07:12 0000000006.ts
    -rw-rw-r-- 1 bino bino 1023848 Agu 27 07:12 0000000007.ts
    -rw-rw-r-- 1 bino bino  980044 Agu 27 07:12 0000000008.ts
    -rw-rw-r-- 1 bino bino  941128 Agu 27 07:13 0000000009.ts
    -rw-rw-r-- 1 bino bino 1109388 Agu 27 07:13 0000000010.ts
    -rw-rw-r-- 1 bino bino  439732 Agu 27 07:13 0000000011.ts
    -rw-rw-r-- 1 bino bino 1062388 Agu 27 07:02 0000000012.ts
    -rw-rw-r-- 1 bino bino  943572 Agu 27 07:02 0000000013.ts
    -rw-rw-r-- 1 bino bino  991512 Agu 27 07:03 0000000014.ts

    note the first 0000000000.ts is Agu 27 07:03, while the second is Agu 27 07:10.

    2nd run index.m3u8 :

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:21
    #EXT-X-MEDIA-SEQUENCE:0
    #EXTINF:20.049511,
    0000000000.ts
    #EXTINF:20.000000,
    0000000001.ts
    #EXTINF:20.000000,
    0000000002.ts
    #EXTINF:20.000000,
    0000000003.ts
    #EXTINF:20.000000,
    0000000004.ts
    #EXTINF:20.000000,
    0000000005.ts
    #EXTINF:20.000000,
    0000000006.ts
    #EXTINF:20.000000,
    0000000007.ts
    #EXTINF:20.000000,
    0000000008.ts
    #EXTINF:20.000000,
    0000000009.ts
    #EXTINF:20.000000,
    0000000010.ts
    #EXTINF:9.966667,
    0000000011.ts
    #EXT-X-ENDLIST

    My question is :
    how to make the 2nd run to start with diferent segment number ?

    What I want is :

    A. Segment files : segment numbers start with 0000000008.ts (last segment in first index.m3u8) rather than 0000000000.ts
    note the first 0000000000.ts is Agu 27 07:03, while the second is Agu 27 07:10.

    B. index.m3u8 ,

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:20
    #EXT-X-MEDIA-SEQUENCE:40
    #EXTINF:5.866667,
    0000000008.ts
    #EXTINF:10.000000,
    0000000009.ts
    #EXTINF:20.000000,
    0000000010.ts
    #EXTINF:20.000000,
    0000000011.ts
    #EXTINF:20.000000,
    0000000012.ts
    #EXTINF:20.000000,
    0000000013.ts
    #EXTINF:20.000000,
    0000000014.ts
    #EXTINF:20.000000,
    0000000000.ts
    #EXTINF:20.000000,
    0000000001.ts
    #EXTINF:20.000000,
    0000000002.ts
    #EXTINF:20.000000,
    0000000003.ts
    #EXTINF:20.000000,
    0000000004.ts
    #EXTINF:20.000000,
    0000000005.ts
    #EXTINF:20.000000,
    0000000006.ts
    #EXTINF:20.000000,
    0000000007.ts
    #EXT-X-ENDLIST

    Kindly please give me your enlightenment

    sincerely

    -bino-

  • FFMpeg muxing h264 to mp4 resultant file is not running

    11 mars 2016, par M.Taha

    I am writing code to mux h264 file into mp4 by using latest FFMPEG 3.0. Muxing is working but the resultant mp4 file is not showing vedio, only the time is running when i play the resultant mp4 file. Kindly try to help to solve this. Please tell me what i am missing. Here is my code :

    int main()
    {  
       avcodec_register_all();

       av_register_all();

       // define AVOutputFormat
       AVOutputFormat *avoutputFormat = NULL;
       avoutputFormat = av_guess_format("mp4", NULL, NULL);
       if (!avoutputFormat) {
       fprintf(stderr, "Could not find suitable output format\n");
       return 1;
       }

       AVFormatContext *avoutFmtCtx = NULL;
       /*Below initialize AVFormatContext.*/
       avformat_alloc_output_context2(&avoutFmtCtx, avoutputFormat, NULL, NULL);

       avoutFmtCtx->oformat = avoutputFormat;
       sprintf_s(avoutFmtCtx->filename, "%s", "Out.mp4");  /*Filling output file name..*/

       if (avoutputFormat->video_codec == AV_CODEC_ID_NONE)
       printf("\n Unsupported format...");

       AVStream * avoutStrm = avformat_new_stream(avoutFmtCtx, 0);

       if (!avoutStrm) {
       _tcprintf(_T("FFMPEG: Could not alloc video stream\n"));        
       }

       AVCodecContext *c = avoutStrm->codec;
       c->codec_id     = avoutputFormat->video_codec;
       c->codec_type   = AVMEDIA_TYPE_VIDEO;
       c->bit_rate     = 2000*1000;
       c->width        = 1920;
       c->height       = 1080;
       AVRational avr;
       avr.den = 30;
       avr.num = 1;

       avoutStrm->time_base = c->time_base = av_add_q(avoutStrm->codec->time_base, avr);

       // Some formats want stream headers to be separate
       if(avoutFmtCtx->oformat->flags & AVFMT_GLOBALHEADER)
       c->flags |= CODEC_FLAG_GLOBAL_HEADER;

       // Open the output container file
       if (avio_open(&avoutFmtCtx->pb, avoutFmtCtx->filename, AVIO_FLAG_WRITE) < 0)
       {
       _tcprintf(_T("FFMPEG: Could not open '%s'\n"), avoutFmtCtx->filename);      
       }

       m_pExtDataBuffer = (uint8_t*)av_malloc(1000 + 1000);
       if(!m_pExtDataBuffer) {
       _tcprintf(_T("FFMPEG: could not allocate required buffer\n"));

       }

       uint8_t SPSbuf[1000];
       uint8_t PPSbuf[1000];
       memcpy(m_pExtDataBuffer, SPSbuf, 1000);            
       memcpy(m_pExtDataBuffer + 1000, PPSbuf, 1000);  

       /* Codec "extradata" conveys the H.264 stream SPS and PPS info (MPEG2: sequence header is housed in SPS buffer, PPS buffer is empty)*/
       c->extradata        = m_pExtDataBuffer;
       c->extradata_size   = 1000 + 1000;

       if(avformat_write_header(avoutFmtCtx,NULL)) {
       _tcprintf(_T("FFMPEG: avformat_write_header error!\n"));

       }

       /* Here do writing data in loop...*/
       int m_nProcessedFramesNum = 0;

       while(1)
       {
       ++m_nProcessedFramesNum;
       AVPacket pkt;
       av_init_packet(&pkt);

       AVCodecContext *c = avoutStrm->codec;
       avoutStrm->pts.val = m_nProcessedFramesNum;
       pkt.stream_index    = avoutStrm->index;

       pkt.data            = /*Filling h.264 data from here... This is valid h264 data*/
       pkt.size            = /*Filling valid h264 data size here...*/
       av_new_packet(&pkt,pkt.size);
       pkt.pts = m_nProcessedFramesNum*512;
       pkt.dts = m_nProcessedFramesNum*512;
       pkt.duration = 512;

       // Write the compressed frame in the media file
       if (av_interleaved_write_frame(avoutFmtCtx, &pkt)) {
       _tcprintf(_T("FFMPEG: Error while writing video frame\n"));        
       }/*End of loop.*/

       av_free_packet(&pkt);      

       }  
       av_write_trailer(avoutFmtCtx);
       avio_close(avoutFmtCtx->pb);
       avformat_free_context(avoutFmtCtx);
    }