Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (31)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (5376)

  • FFMPEG error : "First slice in a frame missing" when decoding H.265 stream

    19 octobre 2023, par Snejk

    I have a problem with decoding IP camera stream (h.265) using ffmpeg libraries.

    


    I use Live555 to receive RTP payload.

    


    mMediaSession->readSource()->getNextFrame(mVideoBuffer.data(),
mVideoBuffer.size(), Stream::Static_PayloadRead, this, Stream::Static_StreamClose, this);


    


    First two bytes (after the start code 0001) has the nal_unit_header. I am retrieving the type, from bits 1-6 ( ( NALU[0] >> 1 ) & 0x3F ). Then I am processing the data depending on the NALu type :

    


    enum NalUnitType  
{  
  NAL_UNIT_CODED_SLICE_TRAIL_N = 0,   // 0  
  NAL_UNIT_CODED_SLICE_TRAIL_R,   // 1    
  NAL_UNIT_CODED_SLICE_TSA_N,     // 2  
  NAL_UNIT_CODED_SLICE_TLA,       // 3    
  NAL_UNIT_CODED_SLICE_STSA_N,    // 4  
  NAL_UNIT_CODED_SLICE_STSA_R,    // 5    
  NAL_UNIT_CODED_SLICE_RADL_N,    // 6  
  NAL_UNIT_CODED_SLICE_DLP,       // 7     
  NAL_UNIT_CODED_SLICE_RASL_N,    // 8  
  NAL_UNIT_CODED_SLICE_TFD,       // 9   
  NAL_UNIT_RESERVED_10,  
...
  NAL_UNIT_CODED_SLICE_BLA,       // 16 
  NAL_UNIT_CODED_SLICE_BLANT,     // 17    
  NAL_UNIT_CODED_SLICE_BLA_N_LP,  // 18  
  NAL_UNIT_CODED_SLICE_IDR,       // 19  // Current name in the spec: IDR_W_DLP  
  NAL_UNIT_CODED_SLICE_IDR_N_LP,  // 20  
  NAL_UNIT_CODED_SLICE_CRA,       // 21  
  NAL_UNIT_RESERVED_22,  
 ...
  NAL_UNIT_VPS,                   // 32  
  NAL_UNIT_SPS,                   // 33  
  NAL_UNIT_PPS,                   // 34  
  NAL_UNIT_ACCESS_UNIT_DELIMITER, // 35  
  NAL_UNIT_EOS,                   // 36  
  NAL_UNIT_EOB,                   // 37  
  NAL_UNIT_FILLER_DATA,           // 38  
  NAL_UNIT_SEI,                   // 39 Prefix SEI  
  NAL_UNIT_SEI_SUFFIX,            // 40 Suffix SEI  
...
  NAL_UNIT_INVALID,  
};  


    


    If buffer doesn't have the start code, I am adding 0x00000001 at the start of the payload data, before sending it to FFmpeg. Camera is sending these NALu (in the same order) :

    


      

    1. HEVC_NAL_VPS,
    2. 


    3. HEVC_NAL_SPS,
    4. 


    5. HEVC_NAL_PPS,
    6. 


    7. HEVC_NAL_IDR_W_RADL,
    8. 


    9. HEVC_NAL_IDR_W_RADL,
    10. 


    11. HEVC_NAL_IDR_W_RADL,
    12. 


    13. HEVC_NAL_TRAIL_R,
    14. 


    15. HEVC_NAL_TRAIL_R
...
    16. 


    


    My solution works partially as I have 1/3 of image decoded. The other 2 HEVC_NAL_IDR_W_RADL slices get FFmpeg error : "First slice in a frame missing". If I lower the stream resolution I have 1/2 image with one additional HEVC_NAL_IDR_W_RADL slice.

    


    Similiar code works with H.264 stream so I know (I hope) that Live555 and FFmpeg code should be fine.

    


    Live555 doesn't reassemble the I frames (http://lists.live555.com/pipermail/live-devel/2016-September/020244.html)

    


    Is there a specific way to reassemble frame send in multiple slices. I have even tried to assemble the frame as it would be Fragmented Unit NAL type 49 (How to depacketize the fragmented frames in RTP data (over UDP) for H265/HEVC ?)

    


    Many Thanks

    


  • Audio video duration matching for infinite dash loop pseudo live

    19 janvier 2020, par Massimo Vantaggio

    May I ask help to understand how to match audio and video duration during ffmpeg encoding for a concatenation of videos destined to an infinite loop mpeg dash transmission (mp4box).

    My issue happen during ffmpeg encoding :

    first step for audio encoding and timebase uniformity of each video before the concat/encode process :

    ffmpeg -y -i "$f" -c copy -video_track_timescale 90k -c:a aac -b:a 384k -ar 44100 -ac 2 -shortest -af aresample=async=1 ../buffer/${NAME}_buffer.mp4

    Then concat/encode process in order to get total duration in seconds multiple of closed GOP
    for example : cutting 373.5 duration to obtain 372.000 duration :

    ffmpeg -f concat -safe 0 -y -i list.txt -loop 1 -i ../logo/logo.png -c:a copy -c:v libx264 -x264opts keyint=$GOP:min-keyint=$GOP:no-scenecut -bf 0 -r $FPSC -b:v 4800k -maxrate 9600k -bufsize 19200k -profile:v main -crf 22 -filter_complex "[0:v][1:v]overlay=main_w-overlay_w-10:10,scale=1920:1080,setsar=1" -t $TOTDUR 1080set.mp4

    the result

    VIDEO FORMAT CONTAINER DURATION:
    372.000000
    VIDEO STREAM DURATION:
    372.000000
    AUDIO FORMAT CONTAINER DURATION:
    372.006000

    I need help to understand why the audio duration counts 6 ms more than video duration and how to fix it.
    I read about loop_stream should help ?
    Thanks a lot !

    Below the videos info :

    Metadata:
       major_brand     : isom
       minor_version   : 1
       compatible_brands: isomavc1
       creation_time   : 2007-05-09T07:55:25.000000Z
     Duration: 00:01:29.22, start: 0.000000, bitrate: 7490 kb/s
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x816, 7403 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2007-05-09T07:55:25.000000Z
         handler_name    : GPAC ISO Video Handler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
       Metadata:
         creation_time   : 2007-05-09T07:55:29.000000Z
         handler_name    : GPAC ISO Audio Handler

     Metadata:
       major_brand     : isom
       minor_version   : 1
       compatible_brands: isomavc1
       creation_time   : 2007-07-17T09:18:37.000000Z
       genre           : Trailer
       artist          : Fox
       title           : The Simpsons Movie
       date            : 2007
     Duration: 00:02:17.25, start: 0.000000, bitrate: 8591 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x800, 8486 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2007-07-17T09:18:37.000000Z
         handler_name    : GPAC ISO Video Handler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, 5.1, fltp, 107 kb/s (default)
       Metadata:
         creation_time   : 2007-07-17T09:18:45.000000Z
         handler_name    : GPAC ISO Audio Handler
       Stream #0:2: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 101x150 [SAR 72:72 DAR 101:150], 90k tbr, 90k tbn, 90k tbc (attached pic)

     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       creation_time   : 2013-12-01T03:59:56.000000Z
       genre           : Trailer
       artist          : Warner Bros.
       title           : Gravity - 2K Trailer
       encoder         : HandBrake 0.9.9 2013051800
       date            : 2013
     Duration: 00:02:27.07, start: 0.000000, bitrate: 20296 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 2048x858, 20149 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2013-12-01T03:59:56.000000Z
         encoder         : JVT/AVC Coding
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 153 kb/s (default)
       Metadata:
         creation_time   : 2013-12-01T03:59:56.000000Z
       Stream #0:2: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 102x150 [SAR 72:72 DAR 17:25], 90k tbr, 90k tbn, 90k tbc (attached pic)
  • Use ffmpeg to stream live content to azure media services

    19 mars 2018, par Dadicool

    I’ve been trying to stream content to azure media services using ffmpeg as it’s one of the options described here : http://azure.microsoft.com/blog/2014/09/18/azure-media-services-rtmp-support-and-live-encoders/

    My command is :

    ffmpeg -v verbose -i 300.mp4 -strict -2 -c:a aac -b:a 128k -ar 44100 -r 30 -g 60 -keyint_min 60 -b:v 400000 -c:v libx264 -preset medium -bufsize 400k -maxrate 400k -f flv rtmp://nessma-****.channel.mediaservices.windows.net:1935/live/584c99f5c47f424d9e83ac95364331e7

    I have made sure that the streaming endpoint has one active streaming unit, I also made sure that the channel is actually Ready and I even get it to start streaming (which makes a PublishURL available).

    When I execute the ffmpeg command to start streaming, I keep getting the following error :

    ffmpeg version 2.5.2 Copyright (c) 2000-2014 the FFmpeg developers
     built on Dec 30 2014 11:31:18 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
     configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --arch=x86_64 --enable-runtime-cpudetect
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.102 / 56. 15.102
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Routing option strict to both codec and muxer layer
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9a0a002c00] overread end of atom 'colr' by 1 bytes
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9a0a002c00] stream 0, timescale not set
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9a0a002c00] max_analyze_duration 5000000 reached at 5003637 microseconds
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '300.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       creation_time   : 2014-01-11 05:39:32
       genre           : Trailer
       artist          : Warner Bros.
       title           : 300: Rise of an Empire - Trailer 2
       encoder         : HandBrake 0.9.9 2013051800
       date            : 2014
     Duration: 00:02:33.24, start: 0.000000, bitrate: 7377 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 (1920x1088), 7219 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2014-01-11 05:39:32
         encoder         : JVT/AVC Coding
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 157 kb/s (default)
       Metadata:
         creation_time   : 2014-01-11 05:39:32
       Stream #0:2: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 101x150 [SAR 72:72 DAR 101:150], 90k tbr, 90k tbn, 90k tbc
    rtmp://nessma-****.channel.mediaservices.windows.net:1935/live/584c99f5c47f424d9e83ac95364331e7: Input/output error

    The Azure blog post clearly states that this should be possible but I can’t find a working example anywhere.

    Environment :

    • MacOS Maverick
    • FFMPEG installed from official build
    • 300.mp4 : 1080p trailer of the latest 300 movie