Recherche avancée

Médias (1)

Mot : - Tags -/vidéo

Autres articles (111)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (9073)

  • How can I extract PGS/SUP subtitles from mkv container via libav

    24 août 2024, par Elia

    Trying to write a C code that does the equivalent of the following ffmpeg command :

    


    ffmpeg -i video.mkv -map 0:"$STREAM_INDEX" -c:s copy subtitles.sup


    


    I have managed to read the media container, locate the subtitle streams, and filter the relevant one based on stream metadata. However I only succeeded in getting the bitmap data, without the full PGS header and sections.

    


    Tried dumping packet->data to a file hoping it includes full sections, but the data doesn't start with the expected PGS magic header 0x5047.
    
Also using avcodec_decode_subtitle2 doesn't seem to be useful as it only gives bitmap data without the full PGS header and sections.

    


    What steps are supposed to happen after finding the relevant subtitle stream that allows extracting it as raw data that exactly matches the output of the ffmpeg command above ?

    


    Some sample code :

    


        while(av_read_frame(container_ctx, packet) == 0) {
      if(packet->stream_index != i) {
        continue;
      }

      // Try 1 - dump packet data to file
      fwrite(packet->data, 1, packet->size, fout);

      // Try 2 - decode subtitles
      int bytes_read = 0, success = 0;
      AVSubtitle sub;

      if ((bytes_read = avcodec_decode_subtitle2(codec_context, &sub, &success, packet)) < 0) {
        fprintf(stderr, "Failed to decode subtitles %s", av_err2str(bytes_read));
        goto end;
      }
      fprintf(stdout, "Success! Status:%d - BytesRead:%d NumRects:%d\n", success, bytes_read, sub.num_rects);

      if (success) {
        // Only managed to extract bitmap data here via sub.rects
      }

      av_packet_unref(packet);
    }


    


  • FFMPEG with NVENC and DVB Subtitles and Overlay option

    3 novembre 2019, par Sambir

    Hi I have some questions regarding NVENC, DVB subs and overlay feature.

    I managed to burn dvb subtitles to the input video but I noticed that this cannot be performed fully on the GPU because I am using the Overlay feature of FFMPEG which is only possible with software.

    Current code Scales the subtitles to 1920x1080 before applying the overlay. I noticed that this uses more CPU than just overlaying the subtitles directly over the video. The problem is that I want to overlay the subtitles in the center bottom. Current code centers the subtitles in the center of the screen (kinda annoying)

    Eventually I would like a full hw transcode option (guess it’s not possible ? is it)

    I would like the subtitles unscaled in the center bottom (cpu load 50% less)
    I would like the subtitles scaled 50% in the center bottom (cpu load 30% less) this makes the subtitles better readable.

    Current code for subtitles scaled to video size (how to full hw transcode ?) :

    Code subtitle unscaled but centered. How to change to center bottom :

    -hwaccel_device 4 -hwaccel cuvid -vcodec h264_cuvid -resize 1920x1080 -deint 2 -drop_second_field 1 -i 'http://stream' -filter_complex "[i:0x1389]hwdownload,format=nv12[base];[base][i:0x13ee]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2[v];[v]hwupload_cuda[k]" -map "[k]" -map i:0x1393 -acodec libfdk_aac -b:a 96k -c:v h264_nvenc -gpu 4 -preset llhq -vprofile high -rc:v vbr -qmin:v 26 -qmax:v 32 -b:v 4M -maxrate 4M -bufsize 8M -threads 0 -r 25 -g 100 -f flv 'rtmp://127.0.0.1:8001/input/nvenctest.stream'

    ffprobe output :

    [mpegts @ 0x3786200] sub2video: using 1920x1080 canvas
    [Parsed_showinfo_0 @ 0x3785340] config in time_base: 1/90000, frame_rate: 0/1
    [Parsed_showinfo_0 @ 0x3785340] config out time_base: 0/0, frame_rate: 0/0
    No information about the input framerate is available. Falling back to a default value of 25fps for output stream #0:0. Use the -r option if you want a different framerate.
    Output #0, null, to 'pipe:':
     Metadata:
       encoder         : Lavf58.3.100
       Stream #0:0: Video: wrapped_avframe, bgra, 1920x1080, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
       Metadata:
         encoder         : Lavc58.9.100 wrapped_avframe
    [Parsed_showinfo_0 @ 0x3785340] n:   0 pts:      0 pts_time:0       pos:       -1 fmt:bgra sar:0/1 s:1920x1080 i:P iskey:1 type:? checksum:00000000 plane_checksum:[00000000] mean:[0] stdev:[0.0]
    [Parsed_showinfo_0 @ 0x3785340] n:   1 pts:      0 pts_time:0       pos:       -1 fmt:bgra sar:0/1 s:1920x1080 i:P iskey:1 type:? checksum:00000000 plane_checksum:[00000000] mean:[0] stdev:[0.0]
    [Parsed_showinfo_0 @ 0x3785340] n:   2 pts:  39599 pts_time:0.439989 pos:       -1 fmt:bgra sar:0/1 s:1920x1080 i:P iskey:1 type:? checksum:00000000 plane_checksum:[00000000] mean:[0] stdev:[0.0]
    [graph 0 input from stream 0:2 @ 0x37c9340] Changing frame properties on the fly is not supported by all filters.
    Segmentation fault (core dumped)
  • dvbsubdec : Fixed segfault when decoding subtitles

    21 octobre 2016, par Lorenz Brun
    dvbsubdec : Fixed segfault when decoding subtitles
    

    This fixes a segfault (originally found in Movian, but traced to libav)
    when decoding subtitles because only an array of rects is allocated,
    but not the actual structs it contains. The issue was probably
    introduced in commit 2383323 where the loop to allocate the rects in
    the array was thrown away.

    Signed-off-by : Vittorio Giovara <vittorio.giovara@gmail.com>

    • [DBH] libavcodec/dvbsubdec.c