Recherche avancée

Médias (1)

Mot : - Tags -/punk

Autres articles (78)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (16444)

  • Including objects to a shared library from a C++ archive (.a)

    1er septembre 2021, par El Sampsa

    I am trying to include some object files into a shared library I am building. Take the following command (things in [ETC] have been omitted for brevity) :

    



    


    /usr/bin/c++ -fPIC -std=c++14 -pthread -Iinclude/ext/liveMedia -Iinclude/ext/groupsock [ETC] -g -shared -Wl,-soname,libValkka.so -o lib/libValkka.so CMakeFiles/Valkka.dir/src/avthread.cpp.o CMakeFiles/Valkka.dir/src/opengl.cpp.o [ETC] CMakeFiles/Valkka.dir/src/decoders.cpp.o -lX11 -lGLEW -lGLU -lGL -Wl,—whole-archive lib/libavcodec.a -Wl,—no-whole-archive

    


    



    So basically I am just creating a shared library where most of the objects come from my own source code (i.e. CMakeFiles/Valkka.dir/src/*.o), but some of them come from an external static library, located at "lib/libavcodec.a". I get the following error :

    



    


    /usr/bin/ld : lib/libavcodec.a(h264_cabac.o) : relocation R_X86_64_PC32 against symbol 'ff_h264_cabac_tables' can not be used when making a shared object ; recompile with -fPIC
 /usr/bin/ld : final link failed : Bad value
 collect2 : error : ld returned 1 exit status

    


    



    But that is so untrue ! I can extract "libavcodec.a" with

    



    ar x libavcodec.a


    



    And after that check that

    



    readelf --relocs h264_cabac.o | egrep '(GOT|PLT|JU?MP_SLOT)' 


    



    does give some **it :

    



    


    00000000175d 003100000004 R_X86_64_PLT32 0000000000000000 __stack_chk_fail - 4
 000000001926 003100000004 R_X86_64_PLT32 0000000000000000 __stack_chk_fail - 4

    
 


    ...

    


    



    As does

    



    objdump -r h264_cabac.o | grep -i "relocation"


    



    So, indeed, the object files in "libavcodec.a" have been compiled to get PIC (position independent code).

    



    Why does the linker believe otherwise !?

    



    Related links :

    



    How to include all objects of an archive in a shared object ?

    



    Linking archives (.a) into shared object (.so)

    



    Is there a way to determine that a .a or .so library has been compiled as position indepenent code ?

    



    How can I tell, with something like objdump, if an object file has been built with -fPIC ?

    


  • Why won’t this mp4 play in a video-js tag any longer

    18 octobre 2019, par Velocedge

    I’m using ffmpeg to convert files to MP4. I’ve made some modifications to the ffmpeg string but now it seems no matter what I use, the video won’t play in an HTML5 tag (Chrome browser). Normally, I just used "-vcodec libx264 -s 1280x720 -ar 22050". When I try to load it in the video tag, I get the following error on http://family.gotsport.net/lmw/GotSport/videoPlayer.asp?WS=1&URL=/VideoFiles/2/4_70_highlight :

    The media could not be loaded, either because the server or network failed or because the format is not supported.

    No matter what parameters I use (or don’t use), it still won’t play. However, if you just call the url directly, it will play in Chrome (http://family.gotsport.net/videofiles/2/2_70_highlight.mp4). I’m using the 7.0.0 version of video-js from their CDN (although older versions give the same result).

    Video tag looks like :

    <video class="video-js vjs-default-skin" autoplay="autoplay" controls="controls" preload="auto">
       <source src="/VideoFiles/2/4_70_highlight.mp4" type="video/mp4"></source>
    </video>

    Here is the MediaInfo output from the file that won’t play :

    General
    Complete name                            : E:\VideoFiles\2\2_70_highlight.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    File size                                : 5.87 MiB
    Duration                                 : 27 s 60 ms
    Overall bit rate                         : 1 820 kb/s
    Writing application                      : Lavf58.29.100

    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L3.1
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 27 s 60 ms
    Bit rate                                 : 1 685 kb/s
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 29.970 (29970/1000) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.061
    Stream size                              : 5.44 MiB (93%)
    Writing library                          : x264 core 158 r2984 3759fcb
    Encoding settings                        : 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
    Codec configuration box                  : avcC

    Audio
    ID                                       : 2
    Format                                   : AAC LC
    Format/Info                              : Advanced Audio Codec Low Complexity
    Codec ID                                 : mp4a-40-2
    Duration                                 : 27 s 22 ms
    Duration_LastFrame                       : -6 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 128 kb/s
    Channel(s)                               : 2 channels
    Channel layout                           : L R
    Sampling rate                            : 22.05 kHz
    Frame rate                               : 21.533 FPS (1024 SPF)
    Compression mode                         : Lossy
    Stream size                              : 423 KiB (7%)
    Default                                  : Yes
    Alternate group                          : 1

    Do you see anything that would keep this format from playing in an HTML5 video tag ?

  • Setting dpi flag in image files generated using ffmpeg

    17 mars 2023, par jim_e_jib

    We're using ffmpeg to batch out some TIFF images that are being resized and having white borders created to fit specific paper sizes.

    &#xA;

    The resulting images default to 72dpi, even when the source is 300dpi. Is there a way to set the dpi flag in the output file ?

    &#xA;

    Many thanks :-)

    &#xA;

    The command we're using :

    &#xA;

    for %%a in ("*.tif") do ffmpeg -i "%%a" -vf "scale=6974:4919:force_original_aspect_ratio=decrease,pad=7016:4961:(ow-iw)/2:(oh-ih)/2:color=white, format=rgb24" "%%~na A2 poster 594x420mm-Border.tif"&#xA;

    &#xA;

    We have tried using -dpi 300 in the code but get the error that this is not a recognised.

    &#xA;

    Edit :

    &#xA;

    I have just managed to answer my own question :

    &#xA;

    for %%a in ("*.tif") do ffmpeg -i "%%a" -vf "scale=6974:4919:force_original_aspect_ratio=decrease,pad=7016:4961:(ow-iw)/2:(oh-ih)/2:color=white,format=rgb24" -dpi 300 "%%~na A2 poster 594x420mm-Border.tif"&#xA;

    &#xA;

    I had been placing the -dpi 300 in the wrong place when I'd tried it...

    &#xA;