Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (29)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (6051)

  • ffmpeg for android, out of memory on decoding rotate mp4 file with openh264

    29 octobre 2018, par da que

    Version

    • ffmpeg : 4.0.2
    • openh264 : 1.8.0

    Problem

    I try to trim a .mp4 file which metadata info contains rotate info, but I failed with the error information.

    The file stream info :

     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       creation_time   : 2018-10-09T09:40:53.000000Z
       location        : +39.8983+116.4145/
       location-eng    : +39.8983+116.4145/
       com.android.version: 6.0
     Duration: 00:00:10.56, start: 0.000000, bitrate: 8671 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 8563 kb/s, SAR 1:1 DAR 16:9, 30.01 fps, 30 tbr, 90k tbn, 180k tbc (default)
       Metadata:
         rotate          : 180
         creation_time   : 2018-10-09T09:40:53.000000Z
         handler_name    : VideoHandle
       Side data:
         displaymatrix: rotation of -180.00 degrees
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
       Metadata:
         creation_time   : 2018-10-09T09:40:53.000000Z
         handler_name    : SoundHandle

    ffmpeg cmd

    ffmpeg -y -i 1.mp4 -threads 4 -b:v 2000k -vcodec libopenh264 -acodec copy -ss 0 -t 3 -f mp4 -movflags faststart -strict -2 ./output.mp4

    result

    Error reinitializing filters!
    Failed to inject frame into filter network: Out of memory
    Error while processing the decoded data for stream #0:0

    Then I found this answer : ffmpeg-for-android-out-of-memory, after i added -noautorotate command to my cmd, the video is trimmed successful.

    If I use -vcodec copy instead of -vcodec libopenh264, the result also is ok, I wonder if there is a bug when libopenh264 decode with ffmpeg’s autorotate function.

    I wipe the video’s rotate info from metadata with -metadata:s:v:0 command, the newly video can be trimmed successful with the origin cmd :(

  • FFmpeg | subtitles with ass format

    26 octobre 2018, par Praveen Tamil

    I would like to generate subtitles with dynamic font

    [Script Info]
    ScriptType: v4.00+
    PlayResX: 1280
    PlayResY: 720
    Title: WoFox

    [V4+ Styles]
    Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
    Style: Default,Arial,30,&Hffffff,&Hffffff,&H0000FF,&H0000FF,0,0,0,0,100,100,5,0,3,1,0,3,10,10,10,1
    Style: Default1,/home/nodeuser8/tmp/CharmonmanRegular.ttf,40,&Hffffff,&Hffffff,&H0000FF,&H0000FF,0,0,0,0,100,100,5,0,3,1,0,3,10,10,10,1

    [Events]
    Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
    Dialogue: 0,00:00:00.0,00:00:03.0,Default,,0,0,0,,My first subtitle! Click this text to edit
    Dialogue: 0,00:00:00.0,00:00:03.0,Default1,,0,0,0,,This box shows the amount of text that fits into one caption. As you change the style of the captions, you can preview how

    And my ffmpeg code is

    ffmpeg -i ./tmp/source.mp4 -t 5 -filter_complex "ass=filename=./tmp/subtitles.ass" ./t mp/output.mp4 -y

    But I didn’t get out expected output.

    The Console is

    [Parsed_ass_0 @ 0x58680c0] Shaper: FriBidi 1.0.5 (SIMPLE)
    [Parsed_ass_0 @ 0x58680c0] Using font provider fontconfig
    [Parsed_ass_0 @ 0x58680c0] Added subtitle file: './tmp/subtitles.ass' (3 styles, 2 events)
    Stream mapping:
     Stream #0:0 (h264) -> ass (graph 0)
     ass (graph 0) -> Stream #0:0 (libx264)
     Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [Parsed_ass_0 @ 0x5cd4180] Shaper: FriBidi 1.0.5 (SIMPLE)
    [Parsed_ass_0 @ 0x5cd4180] Using font provider fontconfig
    [Parsed_ass_0 @ 0x5cd4180] Added subtitle file: './tmp/subtitles.ass' (3  styles, 2 events)
    [Parsed_ass_0 @ 0x5cd4180] fontselect: (Arial, 400, 0) -> /usr/share/fonts/liberation/LiberationSans-Regular.ttf, 0, LiberationSans
    [Parsed_ass_0 @ 0x5cd4180] fontselect: (/home/nodeuser8/tmp/CharmonmanRegular.ttf, 400, 0) -> /usr/share/fonts/dejavu/DejaVuSans.ttf, 0, DejaVuSans
    [libx264 @ 0x5869880] using SAR=1/1
    [libx264 @ 0x5869880] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x5869880] profile High, level 3.1, 4:2:0, 8-bit
    [libx264 @ 0x5869880] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to './tmp/output.mp4':

    Here I’m trying to load font from /home/nodeuser8/tmp/CharmonmanRegular.ttf but ffmpeg load font from /usr/share/fonts/dejavu/DejaVuSans.ttf.

    So how to load fontfile for ass subtitles ?

  • Files gets corrupted after resizing with ffmpeg

    26 octobre 2018, par Liam

    I’m making a bot that sends videos to instagram. However instagram only allows 1:1 aspect ratio videos, so I’m trying to use ffmpeg in python (ffmpy module) to resize the video (.mp4) file.

    This is the ffmpeg code I’m using
    -analyzeduration 20M -probesize 20M -y -i FILE.MP4 -vf "scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2:white NEW_FILE.MP4

    However this corrupts the file ? The size of the file before resizing is 1.815305 MB but after the ffmpeg job it’s 0.058714 MB. So what gives ?

    (I also tried using -aspect 1:1 but that corrupts the file too)

    Ffmpy seems to work fine, because sometimes if the file is over 20 MB i run this to reduce the file size -y -i FILE.MP4 -vcodec libx264 -crf 24 NEW_FILE.MP4 and that works fine.

    Here’s the full log if needed :

    Oct 23 07:32:03 test-instabot app/worker.1: MP4 SIZE BEFORE ASPECT RESIZE IS: 1.815305 MB
    Oct 23 07:32:03 test-instabot app/worker.1: ffmpeg version 4.0.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
    Oct 23 07:32:03 test-instabot app/worker.1:   built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
    Oct 23 07:32:03 test-instabot app/worker.1:   configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
    Oct 23 07:32:03 test-instabot app/worker.1:   libavutil      56. 14.100 / 56. 14.100
    Oct 23 07:32:03 test-instabot app/worker.1:   libavcodec     58. 18.100 / 58. 18.100
    Oct 23 07:32:03 test-instabot app/worker.1:   libavformat    58. 12.100 / 58. 12.100
    Oct 23 07:32:03 test-instabot app/worker.1:   libavdevice    58.  3.100 / 58.  3.100
    Oct 23 07:32:03 test-instabot app/worker.1:   libavfilter     7. 16.100 /  7. 16.100
    Oct 23 07:32:03 test-instabot app/worker.1:   libswscale      5.  1.100 /  5.  1.100
    Oct 23 07:32:03 test-instabot app/worker.1:   libswresample   3.  1.100 /  3.  1.100
    Oct 23 07:32:03 test-instabot app/worker.1:   libpostproc    55.  1.100 / 55.  1.100
    Oct 23 07:32:03 test-instabot app/worker.1: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './media/t4nYbas.mp4':
    Oct 23 07:32:03 test-instabot app/worker.1:   Metadata:
    Oct 23 07:32:03 test-instabot app/worker.1:     major_brand     : isom
    Oct 23 07:32:03 test-instabot app/worker.1:     minor_version   : 512
    Oct 23 07:32:03 test-instabot app/worker.1:     compatible_brands: isomiso2avc1mp41
    Oct 23 07:32:03 test-instabot app/worker.1:     encoder         : Lavf58.12.100
    Oct 23 07:32:03 test-instabot app/worker.1:   Duration: 00:00:06.04, start: 0.000000, bitrate: 2404 kb/s
    Oct 23 07:32:03 test-instabot app/worker.1:     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x854, 2402 kb/s, 29.98 fps, 29.98 tbr, 19184 tbn, 59.95 tbc (default)
    Oct 23 07:32:03 test-instabot app/worker.1:     Metadata:
    Oct 23 07:32:03 test-instabot app/worker.1:       handler_name    : VideoHandler
    Oct 23 07:32:03 test-instabot app/worker.1: Stream mapping:
    Oct 23 07:32:03 test-instabot app/worker.1:   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Oct 23 07:32:03 test-instabot app/worker.1: Press [q] to stop, [?] for help
    Oct 23 07:32:03 test-instabot app/worker.1: [swscaler @ 0x6882200] Warning: data is not aligned! This can lead to a speed loss
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] profile High, level 3.2
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] 264 - core 155 r2901 7d0ff22 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Oct 23 07:32:03 test-instabot app/worker.1: Output #0, mp4, to './media/t4nYbas.mp4':
    Oct 23 07:32:03 test-instabot app/worker.1:   Metadata:
    Oct 23 07:32:03 test-instabot app/worker.1:     major_brand     : isom
    Oct 23 07:32:03 test-instabot app/worker.1:     minor_version   : 512
    Oct 23 07:32:03 test-instabot app/worker.1:     compatible_brands: isomiso2avc1mp41
    Oct 23 07:32:03 test-instabot app/worker.1:     encoder         : Lavf58.12.100
    Oct 23 07:32:03 test-instabot app/worker.1:     Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1080x1080, q=-1--1, 29.98 fps, 19184 tbn, 29.98 tbc (default)
    Oct 23 07:32:03 test-instabot app/worker.1:     Metadata:
    Oct 23 07:32:03 test-instabot app/worker.1:       handler_name    : VideoHandler
    Oct 23 07:32:03 test-instabot app/worker.1:       encoder         : Lavc58.18.100 libx264
    Oct 23 07:32:03 test-instabot app/worker.1:     Side data:
    Oct 23 07:32:03 test-instabot app/worker.1:       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Oct 23 07:32:03 test-instabot app/worker.1: frame=    1 fps=0.0 q=29.0 Lsize=      57kB time=00:00:00.00 bitrate=9032923.1kbits/s speed=7.89e-05x    
    Oct 23 07:32:03 test-instabot app/worker.1: video:57kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.383109%
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] frame I:1     Avg QP:29.91  size: 57223
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] mb I  I16..4: 12.6% 74.9% 12.5%
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] 8x8 transform intra:74.9%
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] coded y,uvDC,uvAC intra: 52.6% 24.4% 1.0%
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] i16 v,h,dc,p: 94%  0%  5%  1%
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 10% 28%  4%  6%  5%  7%  5%  7%
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 17% 15%  7%  9%  7%  9%  7%  9%
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] i8c dc,h,v,p: 78%  9% 12%  2%
    Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] kb/s:13722.08
    Oct 23 07:32:03 test-instabot app/worker.1: MP4 SIZE AFTER ASPECT RESIZE IS: 0.058714 MB