Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (51)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (4426)

  • AVCodec h264_v4l2m2m hardware decoding unable to find device

    26 juillet 2023, par nathansizemore

    Using a custom compiled FFmpeg :

    


     $ ./ffmpeg -codecs | grep h264
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
  configuration: --arch=aarch64 --enable-cross-compile --target-os=linux --cross-prefix=aarch64-linux-gnu- --prefix=/builds/dronesense/rust/ffmpeg-build/ffmpeg/out --pkgconfigdir= --pkg-config=pkg-config --extra-libs='-ldl -lpthread' --enable-libvpx --enable-libx264 --enable-libx265 --enable-decklink --enable-gpl --enable-nonfree --enable-shared --disable-static
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_v4l2m2m )


    


    /dev/video32 seems to have H.264 decoding support :

    


    $ v4l2-ctl --list-formats-out -d /dev/video32
ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Output Multiplanar
    Pixel Format: 'MPG2' (compressed)
    Name        : MPEG-2 ES

    Index       : 1
    Type        : Video Output Multiplanar
    Pixel Format: 'H264' (compressed)
    Name        : H.264

    Index       : 2
    Type        : Video Output Multiplanar
    Pixel Format: 'HEVC' (compressed)
    Name        : HEVC

    Index       : 3
    Type        : Video Output Multiplanar
    Pixel Format: 'VP80' (compressed)
    Name        : VP8

    Index       : 4
    Type        : Video Output Multiplanar
    Pixel Format: 'VP90' (compressed)
    Name        : VP9


    


    I've tried two approaches (Rust with bindgen) :

    


    Approach 1 :

    


    fn init_decoder() -> Arc<contextwrapper> {&#xA;    let name = CString::new("h264_v4l2m2m").unwrap();&#xA;    let codec = unsafe { ffmpeg::avcodec_find_decoder_by_name(name.as_ptr()) };&#xA;    if codec.is_null() {&#xA;        error!("finding codec");&#xA;        process::exit(1);&#xA;    }&#xA;&#xA;    let ctx = unsafe { ffmpeg::avcodec_alloc_context3(codec) };&#xA;    if ctx.is_null() {&#xA;        error!("creating context");&#xA;        process::exit(1);&#xA;    }&#xA;&#xA;    let r = unsafe { ffmpeg::avcodec_open2(ctx, codec, ptr::null_mut()) };&#xA;    if r &lt; 0 {&#xA;        error!("opening codec: {r}");&#xA;        process::exit(1);&#xA;    }&#xA;&#xA;    Arc::new(ContextWrapper(ctx))&#xA;}&#xA;</contextwrapper>

    &#xA;

    Results in :

    &#xA;

    [h264_v4l2m2m @ 0x7f1c001600] Could not find a valid device&#xA;[h264_v4l2m2m @ 0x7f1c001600] can&#x27;t configure decoder&#xA;[ERROR] [decoder] [webrtc::codec] opening codec: -1&#xA;

    &#xA;

    Approach 2

    &#xA;

    fn init_decoder() -> Arc<contextwrapper> {&#xA;    let name = CString::new("h264_v4l2m2m").unwrap();&#xA;    let codec = unsafe { ffmpeg::avcodec_find_decoder_by_name(name.as_ptr()) };&#xA;    if codec.is_null() {&#xA;        error!("finding codec");&#xA;        process::exit(1);&#xA;    }&#xA;&#xA;    let mut i = 0;&#xA;    let mut hw_pix_fmt: AVPixelFormat = unsafe { mem::zeroed() };&#xA;    loop {&#xA;        let config = unsafe { ffmpeg::avcodec_get_hw_config(codec, i) };&#xA;        if config.is_null() {&#xA;            error!("decoder not supported");&#xA;            process::exit(1);&#xA;        }&#xA;&#xA;        unsafe {&#xA;            info!("device type: {:?}", (*config).device_type);&#xA;            if ((*config).methods &amp; ffmpeg::AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX as i32) > 0 {&#xA;                hw_pix_fmt = (*config).pix_fmt;&#xA;                break;&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    info!("pixel format: {:?}", hw_pix_fmt);&#xA;&#xA;    let ctx = unsafe { ffmpeg::avcodec_alloc_context3(codec) };&#xA;    if ctx.is_null() {&#xA;        error!("creating context");&#xA;        process::exit(1);&#xA;    }&#xA;&#xA;    let r = unsafe { ffmpeg::avcodec_open2(ctx, codec, ptr::null_mut()) };&#xA;    if r &lt; 0 {&#xA;        error!("opening codec: {r}");&#xA;        process::exit(1);&#xA;    }&#xA;&#xA;    Arc::new(ContextWrapper(ctx))&#xA;}&#xA;&#xA;</contextwrapper>

    &#xA;

    Results in :&#xA;error!("decoder not supported");

    &#xA;

    I feel like there is a major step missing because looking at FFmpeg's Hardware Decode Example there are looking for a device type, to which v4l2 is not a part of the enum, so I do not what functions to call to get it setup.

    &#xA;

    What is the proper way to setup an AVCodec decoder with H.264 hardware acceleration for v4l2m2m ?

    &#xA;

  • Anomalie #3217 (Nouveau) : Caractères spéciaux d’expression régulière présents dans une chaîne de ...

    22 mai 2014, par Pascal Verrier

    Bonjour,

    J’ai une boucle au sein de l’affichage d’un forum qui permet d’afficher les autres posts similaires ; pour cela, l’argument recherche est renseigné avec le titre du forum en cours d’affichage.

    Cela fonctionne bien sur la plupart des pages sauf sur un forum ayant le titre suivant : Sortie du kit compatible SPIP 3 ??

    J’ai une erreur MySQL 1139 :

    Got error ’repetition-operator operand invalid’ from regexp
    SELECT t.id_forum, t.titre, t.texte, t.auteur, t.email_auteur, t.nom_site, t.url_site FROM spip_forum AS t WHERE t.titre REGEXP ’Sortie du kit compatible SPIP 3 ??|Sortie|compatible|SPIP’ OR ...
    

    Ce sont les ?? qui coincent car manifestament ils sont interprétés en tant que métacaractères dans la regex, n’ayant pas été échappés.

    J’ai fait un autre essai en mettant d’autres opérateurs de regex : Sortie kit[0-9]* compatib(ilité|le) SPIP 3 ??, qui confirme ce que je pensais :

    Erreur SQL 1139
    Got error ’repetition-operator operand invalid’ from regexp
    SELECT ... WHERE t.titre REGEXP ’Sortie kit[0-9]* compatib(ilite|le) SPIP 3 ??|Sortie|kit[0-9]*|compatib(ilite|le)|SPIP’ OR ...
    

    à savoir la chaîne de recherche n’est pas prétraitée, et les caractères spéciaux sont repris tels quels, d’où le plantage MySQL.

    Je propose donc les corrections ci-joint pour ecrire/inc/rechercher.php (commentaires avec pverrier).

  • Anomalie #2972 : Suite du filtre ’minifier’

    8 avril 2013, par denisb -

    tous caches vidés (local/cache-js/ et tmp/cache/) ? et tu as bien le fichier plugins-dist/forum/prive/javascript/actiongroup.js ? si ’oui’ aux deux questions, ton problème est ailleurs...