Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

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

Autres articles (62)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (12971)

  • obs-studio build fails on Debian distros

    24 août 2021, par Fabian Druschke

    Ahoy ahoy.
Currently i am trying to compile obs-studio on my Debian machine (Debian Bullseye).
I have compiled FFMpeg myself in order to enable nvenc support for NVIDIA hardware acceleration.
Now i try to compile obs-studio but it always breaks at this error :

    


    [ 41%] Built target obs-x264
[ 42%] Built target obs-libfdk
[ 43%] Building C object plugins/obs-ffmpeg/CMakeFiles/obs-ffmpeg.dir/obs-ffmpeg-audio-encoders.c.o
In file included from /tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:27:
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-formats.h:3:47: error: unknown type name ‘AVCodecContext’; did you mean ‘AVFormatContext’?
    3 | static inline int64_t rescale_ts(int64_t val, AVCodecContext *context,
      |                                               ^~~~~~~~~~~~~~
      |                                               AVFormatContext
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c: In function ‘convert_speaker_layout’:
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:65:10: error: ‘AV_CH_LAYOUT_MONO’ undeclared (first use in this function)
   65 |   return AV_CH_LAYOUT_MONO;
      |          ^~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:65:10: note: each undeclared identifier is reported only once for each function it appears in
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:67:10: error: ‘AV_CH_LAYOUT_STEREO’ undeclared (first use in this function)
   67 |   return AV_CH_LAYOUT_STEREO;
      |          ^~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:69:10: error: ‘AV_CH_LAYOUT_SURROUND’ undeclared (first use in this function)
   69 |   return AV_CH_LAYOUT_SURROUND;
      |          ^~~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:71:10: error: ‘AV_CH_LAYOUT_4POINT0’ undeclared (first use in this function)
   71 |   return AV_CH_LAYOUT_4POINT0;
      |          ^~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:73:10: error: ‘AV_CH_LAYOUT_4POINT1’ undeclared (first use in this function)
   73 |   return AV_CH_LAYOUT_4POINT1;
      |          ^~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:75:10: error: ‘AV_CH_LAYOUT_5POINT1_BACK’ undeclared (first use in this function)
   75 |   return AV_CH_LAYOUT_5POINT1_BACK;
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:77:10: error: ‘AV_CH_LAYOUT_7POINT1’ undeclared (first use in this function)
   77 |   return AV_CH_LAYOUT_7POINT1;
      |          ^~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c: In function ‘convert_ff_channel_layout’:
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:88:7: error: ‘AV_CH_LAYOUT_MONO’ undeclared (first use in this function)
   88 |  case AV_CH_LAYOUT_MONO:
      |       ^~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:90:7: error: ‘AV_CH_LAYOUT_STEREO’ undeclared (first use in this function)
   90 |  case AV_CH_LAYOUT_STEREO:
      |       ^~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:92:7: error: ‘AV_CH_LAYOUT_SURROUND’ undeclared (first use in this function)
   92 |  case AV_CH_LAYOUT_SURROUND:
      |       ^~~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:94:7: error: ‘AV_CH_LAYOUT_4POINT0’ undeclared (first use in this function)
   94 |  case AV_CH_LAYOUT_4POINT0:
      |       ^~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:96:7: error: ‘AV_CH_LAYOUT_4POINT1’ undeclared (first use in this function)
   96 |  case AV_CH_LAYOUT_4POINT1:
      |       ^~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:98:7: error: ‘AV_CH_LAYOUT_5POINT1_BACK’ undeclared (first use in this function)
   98 |  case AV_CH_LAYOUT_5POINT1_BACK:
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:100:7: error: ‘AV_CH_LAYOUT_7POINT1’ undeclared (first use in this function)
  100 |  case AV_CH_LAYOUT_7POINT1:
      |       ^~~~~~~~~~~~~~~~~~~~
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c: In function ‘enc_create’:
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:205:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  205 |  enc->codec = avcodec_find_encoder_by_name(type);
      |             ^
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:209:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  209 |   enc->codec = avcodec_find_encoder_by_name(alt);
      |              ^
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c: In function ‘do_encode’:
/tmp/obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-audio-encoders.c:343:16: error: implicit declaration of function ‘rescale_ts’ [-Werror=implicit-function-declaration]
  343 |  packet->pts = rescale_ts(avpacket.pts, enc->context, time_base);
      |                ^~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [plugins/obs-ffmpeg/CMakeFiles/obs-ffmpeg.dir/build.make:95: plugins/obs-ffmpeg/CMakeFiles/obs-ffmpeg.dir/obs-ffmpeg-audio-encoders.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1381: plugins/obs-ffmpeg/CMakeFiles/obs-ffmpeg.dir/all] Error 2
make: *** [Makefile:171: all] Error 2


    


    I didn't find any fixes yet. So i thought i was clever, so i set up a Debian Sid virtual machine and instead of using the git, i used apt source obs-studio and apt build-dep obs-studio. Unfortunately the result was the same, dpkg-buildpackage -rfakeroot -b -uc -us had the same result, in the same file : obs-ffmpeg-audio-encoders.c
What might be the issue here ? Did i miss something fundamental ? Thanks in advance friends !

    


  • How to send libmmpeg AVPacket through WebRTC (using libdatachannel)

    29 mars 2022, par mike

    I'm encoding a video frame with the ffmpeg libraries, generating an AVPacket with compressed data.

    


    Thanks to some recent advice here on S/O, I am trying to send that frame over a network using the WebRTC library libdatachannel, specifically by adapting the example here :

    


    https://github.com/paullouisageneau/libdatachannel/tree/master/examples/streamer

    


    I am seeing problems inside h264rtppacketizer.cpp (part of the library, not the example) which are almost certainly to do with how I'm providing the sample data.
(I don't think that this is anything to do with libdatachannel specifically, it will be an issue with what I'm sending)

    


    The example code reads each encoded frame from a file, and populates a sample by setting the content of the file to the contents of the file :

    


    sample = *reinterpret_cast *>(&fileContents);

    


    sample is just a std::vector<byte>;</byte>

    &#xA;

    I have naively copied the contents of an AVPacket->data pointer into the sample vector :

    &#xA;

    sample.resize(pkt->size);&#xA;memcpy(sample.data(), pkt->data, pkt->size * sizeof(std::byte));    &#xA;

    &#xA;

    but the packetizer is falling over when trying to get length values out of that data.&#xA;Specifically, in the following code, the first iteration gets a length of 1, but the second, looking up index 5, gives 1119887324. This is way too big for my data, which is only 3526 bytes (the whole frame is a single colour so likely to be small once encoded) :

    &#xA;

    while (index &lt; message->size()) {&#xA;assert(index &#x2B; 4 &lt; message->size());&#xA;auto lengthPtr = (uint32_t *)(message->data() &#x2B; index);&#xA;uint32_t length = ntohl(*lengthPtr);&#xA;auto naluStartIndex = index &#x2B; 4;&#xA;auto naluEndIndex = naluStartIndex &#x2B; length;&#xA;assert(naluEndIndex &lt;= message->size());    &#xA;        &#xA;auto begin = message->begin() &#x2B; naluStartIndex;&#xA;auto end = message->begin() &#x2B; naluEndIndex;&#xA;nalus->push_back(std::make_shared<nalunit>(begin, end));&#xA;index = naluEndIndex;&#xA;}&#xA;</nalunit>

    &#xA;

    Here is a dump of

    &#xA;

    uint32_t length = ntohl(*lengthPtr);&#xA;

    &#xA;

    for the first few elements of the message (*lengthPtr in parentheses) :

    &#xA;

    [2022-03-29 15:12:01.182] [info] index 0: 1  (16777216)&#xA;[2022-03-29 15:12:01.183] [info] index 1: 359  (1728118784)&#xA;[2022-03-29 15:12:01.184] [info] index 2: 91970  (1114046720)&#xA;[2022-03-29 15:12:01.186] [info] index 3: 23544512  (3225577217)&#xA;[2022-03-29 15:12:01.186] [info] index 4: 1732427807  (532693607)&#xA;[2022-03-29 15:12:01.187] [info] index 5: 1119887324  (3693068354)&#xA;[2022-03-29 15:12:01.188] [info] index 6: 3223313413  (98312128)&#xA;[2022-03-29 15:12:01.188] [info] index 7: 534512896  (384031)&#xA;[2022-03-29 15:12:01.188] [info] index 8: 3691315291  (1526728156)&#xA;[2022-03-29 15:12:01.189] [info] index 9: 83909537  (2707095557)&#xA;[2022-03-29 15:12:01.189] [info] index 10: 6004992  (10574592)&#xA;[2022-03-29 15:12:01.190] [info] index 11: 1537277952  (41307)&#xA;[2022-03-29 15:12:01.190] [info] index 12: 2701131779  (50331809)&#xA;[2022-03-29 15:12:01.192] [info] index 13: 768  (196608)&#xA;

    &#xA;

    (I know I should post a complete sample, I am working on it)

    &#xA;

      &#xA;
    • I am fairly sure I am just missing something basic. E.g. am I supposed to do something with the AVPacket side_data, does AVPacket have or miss some header info ?

      &#xA;

    • &#xA;

    • If I just fwrite the pkt->data for a single frame to disk, I can read the codec information with ffprobe :

      &#xA;

    • &#xA;

    &#xA;

    Input #0, h264, from &#x27;encodedOut.h264&#x27;:&#xA;Duration: N/A, bitrate: N/A&#xA;Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x720, 30 tbr, 1200k tbn&#xA;

    &#xA;

      &#xA;
    • whereas the same for the example input files (again a single frame) gives the following :
    • &#xA;

    &#xA;

    [h264 @ 000001c88d1135c0] Format h264 detected only with low score of 1, misdetection possible!&#xA;[h264 @ 000001c88f337400] missing picture in access unit with size 85306&#xA;[extract_extradata @ 000001c88d11ee40] No start code is found.&#xA;sample-0.h264: Invalid data found when processing input&#xA;

    &#xA;

  • How to send ffmpeg AVPacket through WebRTC (using libdatachannel)

    14 novembre 2022, par mike

    I'm encoding a video frame with the ffmpeg libraries, generating an AVPacket with compressed data.

    &#xA;

    Thanks to some recent advice here on S/O, I am trying to send that frame over a network using the WebRTC library libdatachannel, specifically by adapting the example here :

    &#xA;

    https://github.com/paullouisageneau/libdatachannel/tree/master/examples/streamer

    &#xA;

    I am seeing problems inside h264rtppacketizer.cpp (part of the library, not the example) which are almost certainly to do with how I'm providing the sample data.&#xA;(I don't think that this is anything to do with libdatachannel specifically, it will be an issue with what I'm sending)

    &#xA;

    The example code reads each encoded frame from a file, and populates a sample by setting the content of the file to the contents of the file :

    &#xA;

    sample = *reinterpret_cast *>(&amp;fileContents);

    &#xA;

    sample is just a std::vector<byte>;</byte>

    &#xA;

    I have naively copied the contents of an AVPacket->data pointer into the sample vector :

    &#xA;

    sample.resize(pkt->size);&#xA;memcpy(sample.data(), pkt->data, pkt->size * sizeof(std::byte));    &#xA;

    &#xA;

    but the packetizer is falling over when trying to get length values out of that data.&#xA;Specifically, in the following code, the first iteration gets a length of 1, but the second, looking up index 5, gives 1119887324. This is way too big for my data, which is only 3526 bytes (the whole frame is a single colour so likely to be small once encoded) :

    &#xA;

    while (index &lt; message->size()) {&#xA;assert(index &#x2B; 4 &lt; message->size());&#xA;auto lengthPtr = (uint32_t *)(message->data() &#x2B; index);&#xA;uint32_t length = ntohl(*lengthPtr);&#xA;auto naluStartIndex = index &#x2B; 4;&#xA;auto naluEndIndex = naluStartIndex &#x2B; length;&#xA;assert(naluEndIndex &lt;= message->size());    &#xA;        &#xA;auto begin = message->begin() &#x2B; naluStartIndex;&#xA;auto end = message->begin() &#x2B; naluEndIndex;&#xA;nalus->push_back(std::make_shared<nalunit>(begin, end));&#xA;index = naluEndIndex;&#xA;}&#xA;</nalunit>

    &#xA;

    Here is a dump of

    &#xA;

    uint32_t length = ntohl(*lengthPtr);&#xA;

    &#xA;

    for the first few elements of the message (*lengthPtr in parentheses) :

    &#xA;

    [2022-03-29 15:12:01.182] [info] index 0: 1  (16777216)&#xA;[2022-03-29 15:12:01.183] [info] index 1: 359  (1728118784)&#xA;[2022-03-29 15:12:01.184] [info] index 2: 91970  (1114046720)&#xA;[2022-03-29 15:12:01.186] [info] index 3: 23544512  (3225577217)&#xA;[2022-03-29 15:12:01.186] [info] index 4: 1732427807  (532693607)&#xA;[2022-03-29 15:12:01.187] [info] index 5: 1119887324  (3693068354)&#xA;[2022-03-29 15:12:01.188] [info] index 6: 3223313413  (98312128)&#xA;[2022-03-29 15:12:01.188] [info] index 7: 534512896  (384031)&#xA;[2022-03-29 15:12:01.188] [info] index 8: 3691315291  (1526728156)&#xA;[2022-03-29 15:12:01.189] [info] index 9: 83909537  (2707095557)&#xA;[2022-03-29 15:12:01.189] [info] index 10: 6004992  (10574592)&#xA;[2022-03-29 15:12:01.190] [info] index 11: 1537277952  (41307)&#xA;[2022-03-29 15:12:01.190] [info] index 12: 2701131779  (50331809)&#xA;[2022-03-29 15:12:01.192] [info] index 13: 768  (196608)&#xA;

    &#xA;

    (I know I should post a complete sample, I am working on it)

    &#xA;

      &#xA;
    • I am fairly sure I am just missing something basic. E.g. am I supposed to do something with the AVPacket side_data, does AVPacket have or miss some header info ?

      &#xA;

    • &#xA;

    • If I just fwrite the pkt->data for a single frame to disk, I can read the codec information with ffprobe :

      &#xA;

    • &#xA;

    &#xA;

    Input #0, h264, from &#x27;encodedOut.h264&#x27;:&#xA;Duration: N/A, bitrate: N/A&#xA;Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x720, 30 tbr, 1200k tbn&#xA;

    &#xA;

    Update : This issue is solved by changing the H264RtpPacketizer separator setting from H264RtpPacketizer::Separator::Length to H264RtpPacketizer::Separator::LongStartSequence, many thanks to author of libdatachannel paullouisageneau (see answer below)

    &#xA;

    I have issues related to settings for the libx264 encoder, but can happily encode with h264_nvenc and h264_mf

    &#xA;