Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (74)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (9226)

  • ffmpeg skips frames/packets while playing a file over http

    24 janvier 2020, par coban
    Microsoft Windows [Version 10.0.18362.592]  
    libavutil      56. 31.100 / 56. 31.100
    libavcodec     58. 54.100 / 58. 54.100
    libavformat    58. 29.100 / 58. 29.100
    libavdevice    58.  8.100 / 58.  8.100
    libavfilter     7. 57.100 /  7. 57.100
    libswscale      5.  5.100 /  5.  5.100
    libswresample   3.  5.100 /  3.  5.100
    libpostproc    55.  5.100 / 55.  5.100
    [hls @ 0600cac0] Skip ('#EXT-X-VERSION:3')    0KB sq=    0B f=0/0
    [hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/chunklist_w1481451763.m3u8' for reading
    [hls @ 0600cac0] Skip ('#EXT-X-VERSION:3')    0KB sq=    0B f=0/0
    [hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_0.ts' for reading
    [hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_1.ts' for reading
    Input #0, hls, from 'http://ok2.se:8000/movie/xxxxxxxxxx/67933.m3u8':
    Duration: 02:02:22.46, start: 0.000000, bitrate: N/A
    Program 0
    Metadata: 0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
     variant_bitrate : 2788912
    Stream #0:0: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
     variant_bitrate : 2788912
    Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Metadata:
     variant_bitrate : 2788912
    Stream #0:2: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
     variant_bitrate : 2788912
    [http @ 060662c0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_2.ts' for reading
    [hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_2.ts' for reading
    [http @ 0606fb40] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_3.ts' for reading
    [hls @ 0600cac0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_3.ts' for reading
    [http @ 0c2442c0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_4.ts' for reading
    [http @ 0606f8c0] Opening 'http://198.144.145.236:1935/ondemand-1/_definst_/mp4:path2/FRENCH.MOVIES/2017.JOHN.WICK.CHAPTER.2.FRN.mp4/media_w1481451763_5.ts' for reading

    I am trying to create an A/V player using ffmpeg library and Delphi. After puzzling and puzzling I found out how to read/decode/sync/display etc...

    I think this behaviour is in some specific situations, because I tested live streams and noticed no problems. In this case this is a video file, while playing my app and ffplay.exe (from ffmpeg not compiled by myself) behaving the same, and skipping packets "every time when the app has to wait while packetqueue is full ?" and loses about 10-30 seconds of audio and video.

    VLC doesn’t seem to have such a like behaviour, while as I understand from VLC credits, they are using ffmpeg or ffmpeg methods imported for decoding/encoding. inspecting vlc source doesn’t make much sense for me because I am a (noob) Delphi programmer. It’s like my main language is Dutch and try to translate form French to German language.

    Please any suggestions how to avoid this, because I think it has to do something with delivery of data from the server and/or read buffer of ffmpeg. If I increase the max size of packetqueue the skipping does happen later and if decrease the size, the skipping happens sooner.

    Including code from my app is not necessary because ffplay.exe has exact the same behavior. You can see debug from ffplay.exe.

  • How to create AVStream with AV_DISPOSITION_TIMED_THUMBNAILS flag

    11 mars 2020, par VGSPB

    I’m try to make audiobook using ffmpeg. m4b format support covers picture for each chapter. ffmpeg load it as well, but I’cant create AVStream with AV_DISPOSITION_TIMED_THUMBNAILS disposition flag.

    int addVideoStream( AVFormatContext *ctx, CoverData *cover) {
       const AVCodec *c = avcodec_find_encoder( AV_CODEC_ID_MJPEG );
       if ( !c )
           return -1;

       int stream_indx = ctx->nb_streams;

       AVStream *stream = avformat_new_stream( ctx, NULL );
       AVCodecContext *img_codec_ctx = avcodec_alloc_context3( c );

       img_codec_ctx->width = cover->width();
       img_codec_ctx->height = cover->height();
       img_codec_ctx->pix_fmt = AV_PIX_FMT_YUVJ420P;

       if ( ctx->oformat->flags & AVFMT_GLOBALHEADER )
           img_codec_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

       int res = avcodec_parameters_from_context( stream->codecpar, img_codec_ctx );
       avcodec_free_context( &img_codec_ctx );


       return stream_indx;
    }

    int new_v_stream_index = addVideoStream( out_ctx, img_data );
    AVStream *v_stream = out_ctx->streams[ new_v_stream_index ];
    v_stream->disposition = AV_DISPOSITION_DEFAULT|AV_DISPOSITION_ATTACHED_PIC|AV_DISPOSITION_TIMED_THUMBNAILS;
    int error = avformat_write_header( out_ctx, NULL );

    return error = -22

    if set disposition only

    v_stream->disposition = AV_DISPOSITION_ATTACHED_PIC;

    error = 0, but it is only for one attached picture packet : stream->attached_pic

    where am i wrong ?

  • Metadata when Remuxing MP3 Audiobooks into Apple-friendly MP4 with FFmpeg

    23 août 2022, par Crissov

    Since there is apparently no way to tell iTunes or iOS that MP3s contain an audiobook (or radioplay) by ID3 tag or file extension, I would like to remux them into MPEG-4 Part 14 containers with an .m4b file extension (without converting, i.e. transcoding or reencoding, the audio stream to AAC) and set the proper media type tag (stik = 2 Audiobook).

    



    $ ffmpeg -hide_banner -y \
         -i "infile.mp3" -codec copy -map 0 \
         "outfile.m4b"


    



    When auto-detecting the intended format from the output filename, FFmpeg (version 4.2.1 at the time of writing) toggles its -f ipod compatibility mode for .m4a and .m4b, which means it will apparently not accept MPEG 1/2 Layer 3 audio within an MP4 container :

    



    


    [ipod @ 00000223bd927e40]
    
 Could not find tag for codec mp3 in stream #0, codec not currently supported in container
    
 Could not write header for output file #0 (incorrect codec parameters ?) : Invalid argument

    


    



    I can override that (or change the file extension afterwards when using "outfile.mp4") :

    



    $ ffmpeg -hide_banner -y \
         -i "infile.mp3" -codec copy -map 0 -f mp4 \
         "outfile.m4b"


    



    The near-zero time required for the conversion and FFprobe assure me that the remuxing was successful :

    



    

    Stream #0:0(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)


    


    



    Custom ID3v2 tag fields and ones without a known MP4 cognate have been dropped, though. I would like to preserve them !

    



    How do I do that with -map_metadata, if it is possible at all ?

    



    How can I use -metadata to add the necessary tag field (atom : stik) which would mark the file as an audiobook 
– phrased more generally :
    
how do I add a manually specified metadata tag field (e.g. MP4 atom or box) with FFmpeg ?

    



    $ ffmpeg -hide_banner -y \
         -i "infile.mp3" -codec copy -map 0 -f mp4 \
         -metadata:s:a:0 language=deu \
         -metadata stik=2
         "outfile.m4b"


    



    FFmpeg documentation

    



    

      

    • -metadata[:metadata_specifier] key=value (output,per-metadata)
      
 Set a metadata key/value pair.
    • 


    • 


    • -map_metadata[:metadata_spec_out] infile[:metadata_spec_in] (output,per-metadata)
      
 Set metadata information of the next output file from infile. Note that those are file indices (zero-based), not filenames. Optional metadata_spec_in/out parameters specify, which metadata to copy. A metadata specifier can have the following forms :
 

        

      • g
        
 global metadata, i.e. metadata that applies to the whole file
      • 


      • s[:stream_spec]
        
 per-stream metadata. stream_spec is a stream specifier as described in the Stream specifiers chapter. In an input metadata specifier, the first matching stream is copied from. In an output metadata specifier, all matching streams are copied to.
      • 


      • c:chapter_index
        
 per-chapter metadata. chapter_index is the zero-based chapter index.
      • 


      • p:program_index
        
 per-program metadata. program_index is the zero-based program index.
      • 


    • 


    
 


    If metadata specifier is omitted, it defaults to global.

    
 


    By default, global metadata is copied from the first input file, per-stream and per-chapter metadata is copied along with streams/chapters. These default mappings are disabled by creating any mapping of the relevant type. A negative file index can be used to create a dummy mapping that just disables automatic copying.

    


    



    PS

    



      

    • Apple does not seem to formally document stik. MPMediaType is slightly different. Pointers to the contrary would be greatly appreciated.
    • 


    • Ideally, I would like to automatically add all *.mp3 files within a subdirectory sorted alphabetically (which share the same encoder settings) as chapters within a single .mp4 container, but that probably deserves a separate question.
    •