Recherche avancée

Médias (0)

Mot : - Tags -/images

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

Autres articles (81)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (4846)

  • Unable to encode single frame h264 (.mp4) video with FFmpeg. No video stream present

    1er avril 2021, par Maxito

    I have achieved this with ffmpeg command line tool using the command. The folder had only one image.

    



    


    ffmpeg -r 24 -i image%03d.bmp -c:v libx264 -pix_fmt yuv420p
 oneframex.mp4

    


    



    I would like to do the same with C++. If I encode a video of three or more frames, video encodes correctly, but the result of encoding a one or two frames video never has a video stream, as reported by ffprobe and some media players.

    



    Comparing with ffprobe, my video (the one with three or more frames) and the one generated by the command tool show almost the same information. Only bitrate and encoder version are different.

    



    I have tried adding force_key_frames to 1, tried with many encoding options and have be unsuccessful.

    



    The application output gives me this information :

    



    


    [libx264 @ 20d1b840] using cpu capabilities : MMX2 SSE2Fast SSSE3
 SSE4.2 AVX

    
 


    [libx264 @ 20d1b840] profile High, level 4.0

    
 


    [libx264 @ 20d1b840] 264 - core 142 r2431 ac76440 - H.264/MPEG-4 AVC
 codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html -
 options : cabac=0 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=dia subme=8
 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=0 trellis=0
 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2
 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1
 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0
 keyint=1 keyint_min=1 scenecut=0 intra_refresh=0 rc=crf mbtree=0
 crf=10.0 qcomp=0.60 qpmin=0 qpmax=25 qpstep=4 ip_ratio=1.40 aq=1:1.00

    


    



    These are my main parameters :

    



    pCodecCtx->codec_id = AV_CODEC_ID_H264;
pCodecCtx->pix_fmt= AV_PIX_FMT_YUV420P; 
pCodecCtx->gop_size = 1;
pCodecCtx->bit_rate = 400000;
pCodecCtx->me_range = 16;
pCodecCtx->max_qdiff = 4;
pCodecCtx->qcompress = 0.6;
pCodecCtx->qmin = 0;
pCodecCtx->qmax = 25;
pCodecCtx->time_base.den = 24;
pCodecCtx->time_base.num = 1;

AVDictionary *param = 0;
            av_dict_set(&param, "preset", "slow", 0);
            av_dict_set(&param, "profile", "high", 0);
            av_dict_set(&param, "crf", "10", 0); //this gave me quality
            av_dict_set(&param, "force_key_frames", "1", 0);


    



    In my encoding I just added

    



    ppicture->pts = pCodecCtx->frame_number


    



    to avoid non-strictly-monotonic PTS message. And tried the methods from this question in case it had something to do.

    



    I’m sure I must be missing some important parameter to be able to create such a small video. I will take any suggestion.

    


  • Unable to encode single frame h264 (.mp4) video with FFmpeg. No video stream present

    5 mai 2015, par Maxito

    I have achieved this with ffmpeg command line tool using the command. The folder had only one image.

    ffmpeg -r 24 -i image%03d.bmp -c:v libx264 -pix_fmt yuv420p
    oneframex.mp4

    I would like to do the same with C++. If I encode a video of three or more frames, video encodes correctly, but the result of encoding a one or two frames video never has a video stream, as reported by ffprobe and some media players.

    Comparing with ffprobe, my video (the one with three or more frames) and the one generated by the command tool show almost the same information. Only bitrate and encoder version are different.

    I have tried adding force_key_frames to 1, tried with many encoding options and have be unsuccessful.

    The application output gives me this information :

    [libx264 @ 20d1b840] using cpu capabilities : MMX2 SSE2Fast SSSE3
    SSE4.2 AVX

    [libx264 @ 20d1b840] profile High, level 4.0

    [libx264 @ 20d1b840] 264 - core 142 r2431 ac76440 - H.264/MPEG-4 AVC
    codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html -
    options : cabac=0 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=dia subme=8
    psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=0 trellis=0
    8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2
    threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1
    interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0
    keyint=1 keyint_min=1 scenecut=0 intra_refresh=0 rc=crf mbtree=0
    crf=10.0 qcomp=0.60 qpmin=0 qpmax=25 qpstep=4 ip_ratio=1.40 aq=1:1.00

    These are my main parameters :

    pCodecCtx->codec_id = AV_CODEC_ID_H264;
    pCodecCtx->pix_fmt= AV_PIX_FMT_YUV420P;
    pCodecCtx->gop_size = 1;
    pCodecCtx->bit_rate = 400000;
    pCodecCtx->me_range = 16;
    pCodecCtx->max_qdiff = 4;
    pCodecCtx->qcompress = 0.6;
    pCodecCtx->qmin = 0;
    pCodecCtx->qmax = 25;
    pCodecCtx->time_base.den = 24;
    pCodecCtx->time_base.num = 1;

    AVDictionary *param = 0;
               av_dict_set(&param, "preset", "slow", 0);
               av_dict_set(&param, "profile", "high", 0);
               av_dict_set(&param, "crf", "10", 0); //this gave me quality
               av_dict_set(&param, "force_key_frames", "1", 0);

    In my encoding I just added

    ppicture->pts = pCodecCtx->frame_number

    to avoid non-strictly-monotonic PTS message. And tried the methods from this question in case it had something to do.

    I’m sure I must be missing some important parameter to be able to create such a small video. I will take any suggestion.

  • FFMPEG : Youtube streaming issues

    23 février 2019, par Alex Paramonov

    I am trying to make a reliable stream from my Icecast/Shoutcast servers to Youtube live.
    The command that I use is :

    /usr/bin/ffmpeg -re -loop 1 -framerate 1 -i /var/users/youtube_stream/DJ-philadelphia_jO46wsH.jpg -i http://127.0.0.1:4700/radio -c:v libx264 -preset ultrafast -maxrate 2048k -bufsize 2048k -c:a copy -ab 128k -s 1920x1080 -rtmp_live live -f flv rtmp://a.rtmp.youtube.com/live2/k123 -nostats

    The stream starts running but suddenly stops at random times with the output similar to this :

    av_interleaved_write_frame(): Broken pipe
    [flv @ 0x5641e04db260] Failed to update header with correct duration.
    [flv @ 0x5641e04db260] Failed to update header with correct filesize.
    Error writing trailer of rtmp://a.rtmp.youtube.com/live2/123: Broken pipe
    frame= 4771 fps=1.0 q=2.0 Lsize=  106465kB time=01:19:30.00 bitrate= 182.8kbits/s speed=   1x
    video:29022kB audio:74516kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.825971%
    Conversion failed!
    99%
    Exiting normally, received signal 15.

    I can’t say exactly why is this happening and maybe there is a way to fix it, but to mee it looks like ffmpeg can not send or convert some frame and it breaks the entire process, so I started digging the docs and found a fifo format that has reconnection options in case of failure.
    So my new command is :

    /usr/bin/ffmpeg -re -loop 1 -framerate 1 -i /var/users/youtube_stream/DJ-philadelphia_jO46wsH.jpg -i http://127.0.0.1:4700/radio -c:v libx264 -preset ultrafast -maxrate 2048k -bufsize 2048k -c:a copy -ab 128k -s 1920x1080 -rtmp_live live -f fifo -fifo_format flv -map 0:v -map 1:a -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 rtmp://a.rtmp.youtube.com/live2/123 -nostats

    With this command Youtube starts complaining about video resolution saying that 65535x65535 is not supported, value 65535 looks like something is not initialized properly. Please note that I have explicitly set the resolution with -s 1920x1080.

    The output from FLV and FIFO formats looks quite similar.

    FLV

    Input #0, image2, from '/var/users/youtube_stream/DJ-philadelphia_jO46wsH.jpg':
     Duration: 00:00:01.00, start: 0.000000, bitrate: 597 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 1 fps, 1 tbr, 1 tbn, 1 tbc
    Input #1, mp3, from 'http://127.0.0.1:4700/radio':
     Metadata:
       icy-br          : 128
       icy-description : test
       icy-genre       : test
       icy-name        : Test
       icy-pub         : 1
       StreamTitle     : silence
     Duration: N/A, start: 0.000000, bitrate: 128 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
     Stream #1:0 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [libx264 @ 0x563bdde386a0] using SAR=1/1
    [libx264 @ 0x563bdde386a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x563bdde386a0] profile Constrained Baseline, level 4.0
    [libx264 @ 0x563bdde386a0] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=1 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2048 vbv_bufsize=2048 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
    Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/k478-1xpz-v2de-5e79':
     Metadata:
       encoder         : Lavf57.83.100
       Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 1 fps, 1k tbn, 1 tbc
       Metadata:
         encoder         : Lavc57.107.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 2048000/0/0 buffer size: 2048000 vbv_delay: -1
       Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 44100 Hz, stereo, s16p, 128 kb/s

    FIFO

    Input #0, image2, from '/var/users/youtube_stream/DJ-philadelphia_jO46wsH.jpg':
     Duration: 00:00:01.00, start: 0.000000, bitrate: 597 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 1 fps, 1 tbr, 1 tbn, 1 tbc
    Input #1, mp3, from 'http://127.0.0.1:4700/radio':
     Metadata:
       icy-br          : 128
       icy-description : test
       icy-genre       : test
       icy-name        : Test
       icy-pub         : 1
       StreamTitle     : silence
     Duration: N/A, start: 0.000000, bitrate: 128 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
     Stream #1:0 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [libx264 @ 0x560fb2209ae0] using SAR=1/1
    [libx264 @ 0x560fb2209ae0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x560fb2209ae0] profile Constrained Baseline, level 4.0
    Output #0, fifo, to 'rtmp://a.rtmp.youtube.com/live2/k478-1xpz-v2de-5e79':
     Metadata:
       encoder         : Lavf57.83.100
       Stream #0:0: Video: h264 (libx264), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 1 fps, 1 tbn, 1 tbc
       Metadata:
         encoder         : Lavc57.107.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 2048000/0/0 buffer size: 2048000 vbv_delay: -1
       Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s

    you can see the input streams, output, mapping - all fine except one line that is missing with fifo format :

    [libx264 @ 0x563bdde386a0] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html ...

    Seems like video codec is not completely initialized and does not start with when using fifo format.

    So my questions are :

    1. is there a way to create a reliable stream with ffmpeg w/o using
      fifo format ?
    2. if fifo format is mandatory in this case, what’s wrong with my
      video codec ?