Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (43)

  • 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 (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • 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 ;

Sur d’autres sites (6993)

  • How to encode video with ffmpeg for playback on Android ?

    3 janvier 2012, par Sean

    I've got a c++ library that is encoding video in realtime from webcams to mp4 files (H264). The settings i've got are as follows :

       codecContex->profile=FF_PROFILE_H264_BASELINE; //Baseline
       codecContex->gop_size=250;
       codecContex->max_b_frames=0;
       codecContex->max_qdiff=4;
       codecContex->me_method=libffmpeg::ME_HEX;
       codecContex->me_range=16;
       codecContex->qmin=10;
       codecContex->qmax=51;
       codecContex->qcompress=0.6;
       codecContex->keyint_min=10;
       codecContex->trellis=0;
       codecContex->level=13; //Level 1.3
       codecContex->weighted_p_pred = 2;
       codecContex->flags2|=CODEC_FLAG2_WPRED+CODEC_FLAG2_8X8DCT;

    This creates MP4 files that play on iOS devices and on Windows Phone 7 devices but not on Android devices. I've read that Android only supports movies encoded with the baseline profile. These settings should produce a baseline movie but when I look at the generated MP4 file with MediaInfo it says it's AVC(High@L1.3). This might be why it's not working but I can't seem to get it to generate something with AVC(Baseline@L1.3)...

    If I remove the last line :

    codecContex->flags2|=CODEC_FLAG2_WPRED+CODEC_FLAG2_8X8DCT;

    Then MediaInfo reports the file as being "AVC(Main@L1.3)" instead - but those flags are part of the Baseline profile !

  • how to explicitly specify matroska format file to be VFR

    19 janvier 2012, par Ulterior

    I am moving my code performing AVI recording with ffmpeg library to matroska format due to native support of VFR stated by format. Changing guess_format to matroska not touching any other settings produced an mkv file which seems to be ok. But the MediaInfo reports it to be CFS (30).

    How do I explicitly state that its VFR ?

    Format                           : Matroska
    File size                        : 5.27 MiB
    Duration                         : 8s 0ms
    Overall bit rate                 : 5 528 Kbps
    Writing application              : Lavf52.78.1
    Writing library                  : Lavf52.78.1

    Video
    ID                               : 1
    Format                           : MPEG-4 Visual
    Format profile                   : Simple@L1
    Format settings, BVOP            : Yes
    Format settings, QPel            : No
    Format settings, GMC             : No warppoints
    Format settings, Matrix          : Default (H.263)
    Codec ID                         : V_MPEG4/ISO/ASP
    Codec ID/Info                    : Advanced Simple Profile
    Duration                         : 8s 0ms
    Width                            : 1 280 pixels
    Height                           : 720 pixels
    Display aspect ratio             : 16:9
    Frame rate                       : 30.000 fps
    Color space                      : YUV
    Bit depth                        : 8 bits
    Scan type                        : Progressive
    Writing library                  : Intel(R) MPEG-4 encoder based on Intel(R) IPP 6.1 build 137.36[6.1.137.779]
    Language                         : English

    Audio
    ID                               : 2
    Format                           : MPEG Audio
    Codec ID                         : A_MPEG/L3
    Codec ID/Hint                    : MP3
    Duration                         : 8s 0ms
    Channel(s)                       : 2 channels
    Sampling rate                    : 44.1 KHz
    Language                         : English
  • Set timeout on ffmpeg process

    30 octobre 2013, par Thomas Vervik

    Sometims ffmpeg never completes, and thereby preventing conversions of other videos in the queue. Is it possible to set some sort of timeout in ffmpeg such that it terminates if it isnt finished within some given time, example 5 min

    My command looks like this today :

    ffmpeg -i /home/tomcat/bsafevideo/1efef9daa7f5000ed83d67f6fbd0e7d9/aad5adc307c4dd7e457509423a7f3734/69451c31cd592e86138423f6849d8141 -y -r 24 -ar 22050 -f mov -vf [in]transpose=1[rt0],[rt0]scale=iw*480/ih:480[sc0],[sc0]pad=640:480:140[pd0],movie=/srv/bsafe/tomcat7/webapps/ROOT/resources/images/logo_watermark.png [wm],[pd0][wm] overlay=W-w-140:0[out] /home/tomcat/bsafevideo/1efef9daa7f5000ed83d67f6fbd0e7d9/aad5adc307c4dd7e457509423a7f3734/69451c31cd592e86138423f6849d8141.mov -ar 22050 -b 1500k -vcodec libtheora -acodec libvorbis -f ogg -vf [in]transpose=1[rt0],[rt0]scale=iw*480/ih:480[sc0],[sc0]pad=640:480:140[pd0],movie=/srv/bsafe/tomcat7/webapps/ROOT/resources/images/logo_watermark.png [wm],[pd0][wm] overlay=W-w-140:0[out] /home/tomcat/bsafevideo/1efef9daa7f5000ed83d67f6fbd0e7d9/aad5adc307c4dd7e457509423a7f3734/69451c31cd592e86138423f6849d8141.ogg -ar 22050 -vcodec libx264 -profile baseline -vf [in]transpose=1[rt0],[rt0]scale=iw*480/ih:480[sc0],[sc0]pad=640:480:140[pd0],movie=/srv/bsafe/tomcat7/webapps/ROOT/resources/images/logo_watermark.png [wm],[pd0][wm] overlay=W-w-140:0[out] /home/tomcat/bsafevideo/1efef9daa7f5000ed83d67f6fbd0e7d9/aad5adc307c4dd7e457509423a7f3734/69451c31cd592e86138423f6849d8141_mp4.mp4

    UPDATE. Thanks LordNeckBerd, you pointed me in right direction !

    So I see now its kind of not ffmpeg really hanging, the issue is that my java code which reads the inputstream from the linux process will block since ffmpeg never returns a end of line, which I see now when Im running the command. This is the blocking line, it waits for more input from me.

    Press [q] to stop, [?] for help

    So its two issues here now. First is why this particular conversion is failing, and second, how to make sure ffmpeg is not making this (for my Java process) blocking command asking for more input.

    C:\Program Files (x86)\Console2>ffmpeg -i C:/projectsGit/bsafe-server/classes/test/bs-   base/video/ac7601e2bc3bc1545cd30ad3160f5232 -y -r 24 -ar 22050 -f mov C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232.mov -ar 22050 -b:v 1500k -vcodec libtheora -acodec libvorbis -f ogg C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232.ogg -ar 22050 -vcodec libx264 -profile:v baseline C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232_mp4.mp4
    ffmpeg version N-54762-g38b701a Copyright (c) 2000-2013 the FFmpeg developers
    built on Jul 15 2013 18:47:20 with gcc 4.7.3 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --  enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-  libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable- libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable- libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable- libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame - -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable- libx264 --enable-libxavs --enable-libxvid --enable-zlib
    libavutil      52. 39.100 / 52. 39.100
    libavcodec     55. 18.102 / 55. 18.102
    libavformat    55. 12.102 / 55. 12.102
    libavdevice    55.  3.100 / 55.  3.100
    libavfilter     3. 81.101 /  3. 81.101
    libswscale      2.  3.100 /  2.  3.100
    libswresample   0. 17.102 /  0. 17.102
    libpostproc    52.  3.100 / 52.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/projectsGit/bsafe-server/classes/test/bs-  base/video/ac7601e2bc3bc1545cd30ad3160f5232':
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 2013-01-15 05:46:02
    Duration: 00:00:10.03, start: 0.000000, bitrate: 394 kb/s
    Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 264 kb/s, SAR 65536:65536 DAR 4:3, 10.95 fps, 90k tbr, 90k tbn, 180k tbc
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 127 kb/s
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : SoundHandle
    [ogg @ 00000000027d7860] Frame rate very high for a muxer not efficiently supporting it.
    Please consider specifying a lower framerate, a different muxer or -vsync 2
    [mp4 @ 00000000027dacc0] Frame rate very high for a muxer not efficiently supporting it.
    Please consider specifying a lower framerate, a different muxer or -vsync 2
    [libx264 @ 0000000003e6b9c0] using SAR=1/1
    [libx264 @ 0000000003e6b9c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0000000003e6b9c0] profile High, level 3.0
    [libx264 @ 0000000003e6b9c0] 264 - core 133 r2334 a3ac64b - H.264/MPEG-4 AVC codec -   Copyleft 2003-2013 - 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=24 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
    [libx264 @ 00000000027db4a0] using SAR=1/1
    [libx264 @ 00000000027db4a0] MB rate (108000000) > level limit (2073600)
    [libx264 @ 00000000027db4a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 00000000027db4a0] profile Constrained Baseline, level 5.2
    [libx264 @ 00000000027db4a0] 264 - core 133 r2334 a3ac64b - H.264/MPEG-4 AVC codec -  Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=3  deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1  me_range=16 chroma_me=1 trellis=1 8x8dct=0 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=0 weightp=0 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
    Output #0, mov, to 'C:/projectsGit/bsafe-server/classes/test/bs-  base/video/ac7601e2bc3bc1545cd30ad3160f5232.mov':
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    encoder         : Lavf55.12.102
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1  DAR 4:3], q=-1--1, 12288 tbn, 24 tbc
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (libvo_aacenc) (mp4a / 0x6134706D), 22050 Hz, mono, s16, 128 kb/s
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : SoundHandle
    Output #1, ogg, to 'C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232.ogg':
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    encoder         : Lavf55.12.102
    Stream #1:0(eng): Video: theora (libtheora), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 1500 kb/s, 90k tbn, 90k tbc
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : VideoHandle
    Stream #1:1(eng): Audio: vorbis (libvorbis), 22050 Hz, mono, fltp
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : SoundHandle
    Output #2, mp4, to 'C:/projectsGit/bsafe-server/classes/test/bs-base/video/ac7601e2bc3bc1545cd30ad3160f5232_mp4.mp4':
    Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    encoder         : Lavf55.12.102
    Stream #2:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 90k tbn, 90k tbc
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : VideoHandle
    Stream #2:1(eng): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 22050 Hz, mono, s16, 128 kb/s
    Metadata:
     creation_time   : 2013-01-15 05:46:02
     handler_name    : SoundHandle
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 -> libx264)
    Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
    Stream #0:0 -> #1:0 (h264 -> libtheora)
    Stream #0:1 -> #1:1 (aac -> libvorbis)
    Stream #0:0 -> #2:0 (h264 -> libx264)
    Stream #0:1 -> #2:1 (aac -> libvo_aacenc)
    Press [q] to stop, [?] for help