Recherche avancée

Médias (91)

Autres articles (98)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

Sur d’autres sites (8849)

  • pts and dts problems while encoding multiple streams to AVFormatContext with libavcodec and libavformat

    20 novembre 2022, par WalleyM

    I am trying to encode a mpeg2video stream and a signed PCM 32 bit audio stream to a .mov file using ffmpeg's avcodec and avformat libraries.

    


    My video stream is set up in almost the exact same way as is described here with my audio stream being set up in a very similar way.

    


    My time_base for both audio and video is set to 1/fps.

    


    Here is the overview output from setting up the encoder :

    


    


    Output #0, mov, to ' /Recordings/SDI_Video.mov' :
    
Metadata :
    
encoder : Lavf59.27.100
    
Stream #0:0 : Video : mpeg2video (m2v1 / 0x3176326D), yuv420p, 1920x1080, q=2-31, 207360 kb/s, 90k tbn
    
Stream #0:1 : Audio : pcm_s32be (in32 / 0x32336E69), 48000 Hz, stereo, s32, 3072 kb/s

    


    


    As I understand it my pts should be when the frame is presented while dts should be when the frame is decoded. This means that audio and video frame pts should be the same whereas dts should be incremental between them.

    


    Essentially meaning interleaved audio and video frames should be in the following pts and dts order :

    


    pts 112233
dts 123456

    


    I am using this format to set my pts and dts :

    


    videoFrame->pts = frameCounter;
    
if(avcodec_send_frame(videoContext, videoFrame) < 0)
{
    std::cout << "Failed to send video frame " << frameCounter << std::endl;
    return;
}
    
AVPacket videoPkt;
av_init_packet(&videoPkt);
videoPkt.data = nullptr;
videoPkt.size = 0;
videoPkt.flags |= AV_PKT_FLAG_KEY;
videoPkt.stream_index = 0;
videoPkt.dts = frameCounter * 2;
    
if(avcodec_receive_packet(videoContext, &videoPkt) == 0)
{
    av_interleaved_write_frame(outputFormatContext, &videoPkt);
    av_packet_unref(&videoPkt);
}


    


    With audio the same except :

    


    audioPkt.stream_index = 1;
audioPkt.dts = frameCounter * 2 + 1;


    


    However, I still get problems with my dts setting shown in this output :

    


    


    [mov @ 0x7fc1b3667480] Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 1 >= 0
    
[mov @ 0x7fc1b3667480] Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 2 >= 1
    
[mov @ 0x7fc1b3667480] Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 3 >= 2

    


    


    I would like to fix this issue.

    


  • Next pts does not match previous pts plus duration when transcoding an AAC audio with ffmpeg

    17 septembre 2021, par b1sub

    In my understanding, the following statement must hold :

    


    next pts = previous pts + duration


    


    But, I got this list of PTSes from ffprobe that looks odd to me :

    


    <packet pts="63000" duration="2089">&#xA;<packet pts="65070" duration="2089">&#xA;<packet pts="67140" duration="2089">&#xA;<packet pts="69300" duration="2089">&#xA;<packet pts="71370" duration="2089">&#xA;<packet pts="73440" duration="2089">&#xA;<packet pts="75510" duration="2089">&#xA;<packet pts="77670" duration="2089">&#xA;</packet></packet></packet></packet></packet></packet></packet></packet>

    &#xA;

    The corresponding PTS gaps are as follows. You can see none of the below gaps matches 2089 :

    &#xA;

    63000 &lt;> 65070: 2070&#xA;65070 &lt;> 67140: 2070&#xA;67140 &lt;> 69300: 2160&#xA;69300 &lt;> 71370: 2070&#xA;71370 &lt;> 73440: 2070&#xA;73440 &lt;> 75510: 2070&#xA;75510 &lt;> 77670: 2160&#xA;

    &#xA;

    I have no deep understanding of AAC or transcoding, so I talked with some random guy on #ffmpeg. As per what he said, the gap should be a fixed value :

    &#xA;

    20:01 -!- Icedream [~icedream@hzn-b.serverkomplex.de] has quit [Quit: A lol made me boom.]&#xA;20:02 &lt; DeHackEd> I would expect them to increment at a constant rate, since AAC (which is probably what you&#x27;re using) uses fixed size&#xA;                  audio chunks. But that&#x27;s very inconsistent&#xA;20:03 &lt; DeHackEd> (&#x2B;/- 1 pts number would be acceptable)&#xA;

    &#xA;

    To tell you the truth, this is a problematic video, but not in a way you would expect. I'm getting intermittent audio clipping sound, if two or more audio packets are crammed into a single PES packet. What's special about this configuration is that, the player must guess PTSes for the trailing audio packets except the first one. Since the PTS gaps are not consistent, the player must have used wrong PTSes for the trailing ones, and this looks to me like the cause.

    &#xA;

    But, what could be the trigger ? Here are some contexts you can kindly refer to :

    &#xA;

      &#xA;
    • the original video has no surprising PTS gap. This is the result from my custom-made script to extract all unique gaps :
    • &#xA;

    &#xA;

    $ ./foo.sh ./original.flv&#xA;diff 296448 occurs at 296448 // just a first packet (=has no previous packet)&#xA;diff 24 occurs at 296472&#xA;diff 23 occurs at 296495&#xA;

    &#xA;

      &#xA;
    • this is the command I used for transcoding :
    • &#xA;

    &#xA;

    $FFMPEG -hide_banner -loglevel info -nostats \&#xA;    -i $input \&#xA;    -map "[out1]" -c:v libx264 -r 30 -force_key_frames "expr:gte(t, n_forced*$keyFrameInterval)" -preset veryfast -vprofile high -minrate 4.5M -maxrate 6M -bufsize 6M \&#xA;    -map 0:a -c:a aac -b:a:1 128K -af "aformat=sample_rates=44100|48000:channel_layouts=stereo" \&#xA;    -map 0:a -c:a aac -b:a:2 32K -af "aformat=sample_rates=44100|48000:channel_layouts=stereo" \&#xA;    -f mpegts -tune zerolatency pipe:1 > \&#xA;        >($FFMPEG -hide_banner -loglevel info -nostats \&#xA;            -i - \&#xA;            -map 0:v -c:v copy -map 0:1 -c:a copy -bsf:a aac_adtstoasc -tune zerolatency -f flv -max_muxing_queue_size 1024 ${output}_1080 \&#xA;            -map 0:v -s $(width 1280 720 $orientation)x$(height 1280 720 $orientation) -c:v libx264 -r 30 -force_key_frames "expr:gte(t, n_forced*$keyFrameInterval)" -preset veryfast -vprofile high -minrate 3M -maxrate 4M -bufsize 4M -map 0:1 -c:a copy -bsf:a aac_adtstoasc -f flv -tune zerolatency -max_muxing_queue_size 1024 ${output}_720 \&#xA;            ...&#xA;

    &#xA;

  • fftools/ffmpeg : deprecate specifying a sync stream with -map

    3 août 2022, par Anton Khirnov
    fftools/ffmpeg : deprecate specifying a sync stream with -map
    

    It has not had any effect whatsoever for over 10 years.

    • [DH] doc/ffmpeg.texi
    • [DH] fftools/ffmpeg.h
    • [DH] fftools/ffmpeg_opt.c