Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (73)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (10860)

  • Send sprop-parameter-sets inband rather than in SDP

    21 janvier 2021, par Max

    I am trying to use ffmpeg to stream an MP4 file over rtp. I am sending the stream to a SFU server that will broadcast the stream to users. The clients are expecting to receive an h264 video stream with profile-level-id 42e01f. The issue I'm having is that the video received by the clients does not decode properly (just a black screen). If I transcode the video before sending, then everything works correctly. If I dump the SDP that describes what ffmpeg is sending, there is a distinct difference between the transcoded and non-transcoded version.

    


    For the non-transcoded version, my ffmpeg command looks like

    


    ffmpeg  '-re' \
  '-v' \
  'info' \
  '-protocol_whitelist' \
  'pipe,tls,file,http,https,tcp,rtp' \
  '-i' \
  '-f' 'mp4' \
  'https://storage.googleapis.com/my_bucket/file' \
  '-map' \
  '0:v:0' \
  '-c:v' \
  'copy' \
  '-f' \
  'rtp' \
  '-sdp_file' 'out.sdp' \
  'rtp://142.93.14.110:40425?rtcpport=45155'


    


    When I run this command, out.sdp contains the line

    


    a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAH9kAUAW7AWoCAgKAAAH0gABdwAeMGSQ=,aMuMsg==; profile-level-id=42C01F


    


    However, if I change -c:v copy to -c:v libx264 -preset ultrafast, then the sdp line changes to a=fmtp:96 packetization-mode=1;. Given that there is no SDP exchange between ffmpeg and my SFU, I think the issue is that ffmpeg needs to be sending the sprops in-band rather than setting them in the sdp. Any help here would be amazing. The other possible issue is that the profile levels are sightly different.

    


  • h264_mp4toannexb : Don't forget numOfPictureParameterSets

    14 décembre 2019, par Andreas Rheinhardt
    h264_mp4toannexb : Don't forget numOfPictureParameterSets
    

    The format of an AVCDecoderConfigurationRecord, the out-of-band
    extradata of H.264 in mp4, is as follows : First four bytes containing
    version, profile and level, one byte for the length size and one byte
    each for the number of SPS, followed by the SPS (each with its own size
    field), followed by a byte containing the number of PPS followed by the
    PPS with their size fields. While the number of SPS/PPS may be zero, the
    bytes containing these numbers are mandatory. Yet the byte containing
    the number of PPS has been ignored in two places :
    1. In the initial check for whether the extradata can contain an
    AVCDecoderConfigurationRecord. The minimum size is 7, not 6.
    2. No check is made for whether the extradata ended right after the last
    byte of the last SPS of the SPS array. Instead the first byte of the
    padding is read as if it were part of the extradata and contained the
    number of PPS (namely zero, given that the padding is zeroed). No error
    or warning was ever raised.
    This has been changed. Such truncated extradata is now considered
    invalid ; the check for 2. has been incorporated into the general size
    check.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/h264_mp4toannexb_bsf.c
  • Using ffmpeg dll's from a windows 32 bit app

    8 avril 2020, par Derek

    I am trying to use ffmpeg via dll calls from a win32 app (compiled in clarion)

    &#xA;&#xA;

    I transcoded the example file encode_video.c and that worked 100% however I was left with a .h264 file instead of a .mp4 file.

    &#xA;&#xA;

    I then transcoded the example muxing.c however it crashes and I am at a loss for options.

    &#xA;&#xA;

    Any help would be most appreciated.

    &#xA;&#xA;

    Encode_mp4 ROUTINE&#xA;! avformat_alloc_output_context2 *******************************************************************************************&#xA;file_name = &#x27;myvideo.mp4&#x27;&#xA;! Try guess format from filename&#xA;if CHECK_STACK then ds_SaveStack .&#xA;Result = avformat_alloc_output_context2(ThisPtrPtr, 0, NullCString, file_name);&#xA;if CHECK_STACK then ds_TestStack .&#xA;if Result &lt; 0&#xA;    ds_OutputDebugString(&#x27;avformat_alloc_output_context2 Try guess format failed, try mpeg&#x27;, TRUE)&#xA;    CString1 = &#x27;mpeg&#x27;&#xA;    if CHECK_STACK then ds_SaveStack .&#xA;    Result = avformat_alloc_output_context2(ThisPtrPtr, 0, CString1, file_name);&#xA;    if CHECK_STACK then ds_TestStack .&#xA;    if Result &lt; 0&#xA;        ds_OutputDebugString(&#x27;avformat_alloc_output_context2 failed&#x27;, TRUE)&#xA;        stop(&#x27;Could not allocate output format context&#x27;)&#xA;        exit&#xA;    end&#xA;end&#xA;formater_ctxt &amp;= (ThisPtrPtr)&#xA;!ds_OutputDebugString(&#x27;formater_ctxt=&#x27; &amp; address(formater_ctxt), TRUE)&#xA;assert(not(formater_ctxt &amp;= NULL), &#x27;Check AVFormatContext formater_ctxt&#x27;)&#xA;do VerifyFormatContext&#xA;assert(formater_ctxt.oformat > 0, &#x27;Check AVFormatContext formater_ctxt.oformat&#x27;)&#xA;formater &amp;= (formater_ctxt.oformat)&#xA;do VerifyFormat&#xA;ds_OutputDebugString(&#x27;avformat_alloc_output_context2 OK&#x27;, TRUE)&#xA;&#xA;! avcodec_find_encoder *******************************************************************************************&#xA;if CHECK_STACK then ds_SaveStack .&#xA;encoder &amp;= avcodec_find_encoder(formater.video_codec)&#xA;if CHECK_STACK then ds_TestStack .&#xA;if encoder &amp;= NULL&#xA;    ds_OutputDebugString(&#x27;avcodec_find_encoder failed&#x27;, TRUE)&#xA;    stop(&#x27;Could not find encoder&#x27;)&#xA;    exit&#xA;end&#xA;do VerifyEncoder&#xA;ds_OutputDebugString(&#x27;avcodec_find_encoder OK&#x27;, TRUE)&#xA;&#xA;! avformat_new_stream *******************************************************************************************&#xA;if CHECK_STACK then ds_SaveStack .&#xA;stream &amp;= avformat_new_stream(formater_ctxt, encoder)&#xA;if CHECK_STACK then ds_TestStack .&#xA;if stream &amp;= NULL &#xA;    ds_OutputDebugString(&#x27;avformat_new_stream failed&#x27;, TRUE)&#xA;    stop(&#x27;Could not create new stream&#x27;)&#xA;    exit&#xA;end&#xA;do VerifyStream&#xA;stream.id = formater_ctxt.nb_streams-1&#xA;ds_OutputDebugString(&#x27;avformat_new_stream OK&#x27;, TRUE)&#xA;&#xA;! avcodec_alloc_context3 *******************************************************************************************&#xA;if CHECK_STACK then ds_SaveStack .&#xA;encoder_ctxt &amp;= avcodec_alloc_context3(encoder)&#xA;if CHECK_STACK then ds_TestStack .&#xA;if encoder_ctxt &amp;= NULL &#xA;    ds_OutputDebugString(&#x27;avcodec_alloc_context3 failed&#x27;, TRUE)&#xA;    stop(&#x27;Could not allocate video codec context&#x27;)&#xA;    exit&#xA;end&#xA;do VerifyEncoderContext&#xA;ds_OutputDebugString(&#x27;avcodec_alloc_context3 OK&#x27;, TRUE)&#xA;&#xA;! Video settings *******************************************************************************************&#xA;do InitVideoSettings&#xA;&#xA;assert(AV_CODEC_FLAG_GLOBAL_HEADER = bshift(1, 22), &#x27;Check AV_CODEC_FLAG_GLOBAL_HEADER&#x27;)&#xA;if band(formater.flags, AVFMT_GLOBALHEADER)&#xA;   encoder_ctxt.flags = bor(encoder_ctxt.flags, AV_CODEC_FLAG_GLOBAL_HEADER) !avctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;&#xA;end&#xA;&#xA;! avcodec_open2 *******************************************************************************************&#xA;if CHECK_STACK then ds_SaveStack .&#xA;Result = avcodec_open2(encoder_ctxt, encoder, 0)&#xA;if CHECK_STACK then ds_TestStack .&#xA;if Result &lt; 0&#xA;    ds_OutputDebugString(&#x27;avcodec_open2 failed.  Result=&#x27; &amp; Result, TRUE)&#xA;    stop(&#x27;Could not open codec&#x27;)&#xA;    exit&#xA;end&#xA;ds_OutputDebugString(&#x27;avcodec_open2 OK&#x27;, TRUE)&#xA;&#xA;! av_frame_alloc *******************************************************************************************&#xA;if CHECK_STACK then ds_SaveStack .&#xA;frame &amp;= av_frame_alloc();&#xA;if CHECK_STACK then ds_TestStack .&#xA;if frame &amp;= NULL&#xA;    ds_OutputDebugString(&#x27;av_frame_alloc failed&#x27;, TRUE)&#xA;    stop(&#x27;Could not allocate video frame&#x27;)&#xA;    exit&#xA;end&#xA;do VerifyFrame&#xA;frame.format = encoder_ctxt.pix_fmt&#xA;frame.width = encoder_ctxt.width&#xA;frame.height = encoder_ctxt.height&#xA;ds_OutputDebugString(&#x27;av_frame_alloc OK&#x27;, TRUE)&#xA;&#xA;! av_frame_get_buffer *******************************************************************************************&#xA;if CHECK_STACK then ds_SaveStack .&#xA;Result = av_frame_get_buffer(frame, 32)&#xA;if CHECK_STACK then ds_TestStack .&#xA;if Result &lt; 0&#xA;    ds_OutputDebugString(&#x27;av_frame_get_buffer failed&#x27;, TRUE)&#xA;    stop(&#x27;Could not allocate video frame buffer Error = &#x27; &amp; Result)&#xA;    exit&#xA;end&#xA;do VerifyFrameBuffer&#xA;ds_OutputDebugString(&#x27;av_frame_get_buffer OK&#x27;, TRUE)&#xA;&#xA;!frame->data offset=0  Array[8] of *int8_t&#xA;UseData0 &amp;= (frame.data[1])&#xA;UseData1 &amp;= (frame.data[2])&#xA;UseData2 &amp;= (frame.data[3])&#xA;&#xA;if CHECK_STACK then ds_SaveStack .&#xA;Result = avcodec_parameters_from_context(stream.codecpar, encoder_ctxt);&#xA;if CHECK_STACK then ds_TestStack .&#xA;if Result &lt; 0&#xA;    ds_OutputDebugString(&#x27;avcodec_parameters_from_context failed&#x27;, TRUE)&#xA;    stop(&#x27;Could not initialize stream parameters&#x27;)&#xA;    exit&#xA;end&#xA;ds_OutputDebugString(&#x27;avcodec_parameters_from_context OK&#x27;, TRUE)&#xA;&#xA;! av_dump_format *******************************************************************************************&#xA;ds_OutputDebugString(&#x27;before call to av_dump_format  file_name=&#x27; &amp; file_name, TRUE)&#xA;av_dump_format(formater_ctxt, 0, file_name, 1)&#xA;

    &#xA;&#xA;

    I get a crash at last line - call to av_dump_format()

    &#xA;&#xA;

    If I comment this code then I get a crash on the very next lib call :

    &#xA;&#xA;

        ! avio_open *******************************************************************************************&#xA;if not(band(formater.flags, AVFMT_NOFILE)) &#xA;    ds_OutputDebugString(&#x27;before call to avio_open  file_name=&#x27; &amp; file_name, TRUE)&#xA;    ThisInt &amp;= address(formater_ctxt.pb)&#xA;    Result = avio_open(ThisInt, file_name, AVIO_FLAG_WRITE)&#xA;

    &#xA;&#xA;

    Strangely if I comment the setup call to av_log_set_callback(my_log_callback) then the crash moves down to the next lib call : avformat_write_header

    &#xA;