Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (48)

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (6831)

  • Problems video playing in some android devices (version 4+) but not in others

    5 juin 2014, par anquegi

    following the settings for video in android developers, http://developer.android.com/guide/appendix/media-formats.html I encoded a video using ffmpeg like this :

    ffmpeg -i gravityTrailer.mp4 -y -f mp4 -vcodec libx264 -profile:v baseline -acodec aac    -strict -2  -profile:a aac_low -b:v 500k -ar 44100 -b:a 128k -ac 2 -r 30 -s 480x360  output_hq.mp4

    which corresponds on sd highquality in table 2 from android developers (link above).

    Then i put this video in a server and use the class android.media.MediaPlayer to reproduce it from that URL like this

    https://cloudapp.somedomain.com/bmftvideos/output_hq.mp4

    The problem is that the video is played on android version 4+

    you can see the video on :
    LG G2,
    Sony xperia S

    you cannot see the video on :
    Samsung galaxy S4,
    BQ (spanish) aquaris 4.5

    And I don not know why

    this is the ffmpeg output :

    ffmpeg version 1.2.6 Copyright (c) 2000-2014 the FFmpeg developers
     built on Mar  5 2014 08:21:01 with gcc 4.8.2 (GCC) 20131212 (Red Hat 4.8.2-7)
     configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
     libavutil      52. 18.100 / 52. 18.100
     libavcodec     54. 92.100 / 54. 92.100
     libavformat    54. 63.104 / 54. 63.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 42.103 /  3. 42.103
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x14e5ba0] stream 0, timescale not set
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x14e5ba0] max_analyze_duration 5000000 reached at 5013333 microseconds
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'gravityTrailer.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       creation_time   : 2013-12-01 03:59:56
       genre           : Trailer
       artist          : Warner Bros.
       title           : Gravity - 2K Trailer
       encoder         : HandBrake 0.9.9 2013051800
       date            : 2013
     Duration: 00:02:27.07, start: 0.000000, bitrate: 20296 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2048x858, 20149 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
       Metadata:
         creation_time   : 2013-12-01 03:59:56
       Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 153 kb/s
       Metadata:
         creation_time   : 2013-12-01 03:59:56
       Stream #0:2: Video: mjpeg, yuvj420p, 102x150 [SAR 72:72 DAR 17:25], 90k tbr, 90k tbn, 90k tbc
    [libx264 @ 0x1667680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x1667680] profile Constrained Baseline, level 3.0
    [libx264 @ 0x1667680] 264 - core 130 r2282 1db4621 - 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=6 lookahead_threads=1 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=abr mbtree=1 bitrate=500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'output_hq.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       date            : 2013
       genre           : Trailer
       artist          : Warner Bros.
       title           : Gravity - 2K Trailer
       encoder         : Lavf54.63.104
       Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 480x360, q=-1--1, 500 kb/s, 15360 tbn, 30 tbc
       Metadata:
         creation_time   : 2013-12-01 03:59:56
       Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s
       Metadata:
         creation_time   : 2013-12-01 03:59:56
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> libx264)
     Stream #0:1 -> #0:1 (aac -> aac)
    Press [q] to stop, [?] for help
    frame= 4410 fps= 65 q=-1.0 Lsize=   11154kB time=00:02:27.07 bitrate= 621.3kbits/s dup=885 drop=0    
    video:9062kB audio:1969kB subtitle:0 global headers:0kB muxing overhead 1.115392%
    [libx264 @ 0x1667680] frame I:186   Avg QP:28.41  size:  4446
    [libx264 @ 0x1667680] frame P:4224  Avg QP:29.20  size:  2001
    [libx264 @ 0x1667680] mb I  I16..4: 75.5%  0.0% 24.5%
    [libx264 @ 0x1667680] mb P  I16..4:  7.5%  0.0%  3.6%  P16..4: 23.1%  6.2%  1.8%  0.0%  0.0%    skip:57.7%
    [libx264 @ 0x1667680] final ratefactor: 27.96
    [libx264 @ 0x1667680] coded y,uvDC,uvAC intra: 24.0% 31.9% 8.6% inter: 7.4% 7.6% 0.6%
    [libx264 @ 0x1667680] i16 v,h,dc,p: 58% 15% 13% 14%
    [libx264 @ 0x1667680] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28%  9% 27%  7%  6%  8%  5%  7%  3%
    [libx264 @ 0x1667680] i8c dc,h,v,p: 80%  7% 12%  2%
    [libx264 @ 0x1667680] ref P L0: 84.7%  9.4%  5.9%
    [libx264 @ 0x1667680] kb/s:504.98

  • FFmpeg / libmp3lame crash while converting from .wav to .mp3 with vibrato

    1er juillet 2020, par Chitrang

    I have integrated mobile-ffmpeg-full-gpl:4.3.1.LTS library in my android app. And trying to convert .wav file to .mp3 format with vibrato option and libmp3lame encoder.

    


    ffmpegCommand = "-i input.wav " +
                "-af vibrato=f=4 " +
                "-c:a libmp3lame " +
                "-b:a 96k " +
                "-ac 1 " +
                "-ar 44100 " +
                "-y output.mp3"


    


    FFmpeg Logs :

    


    a.b.com I/mobile-ffmpeg: Loading mobile-ffmpeg.
a.b.com I/mobile-ffmpeg: Loaded mobile-ffmpeg-full-gpl-arm64-v8a-4.3.1-lts-20200125.
a.b.com D/mobile-ffmpeg: Callback thread started.
a.b.com I/mobile-ffmpeg: ffmpeg version git-2020-01-25-fd11dd500
a.b.com I/mobile-ffmpeg:  Copyright (c) 2000-2020 the FFmpeg developers
a.b.com I/mobile-ffmpeg:   built with Android (5220042 based on r346389c) clang version 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf643d27dbca1bb228957008617) (https://android.googlesource.com/toolchain/llvm 3c393fe7a7e13b0fba4ac75a01aa683d7a5b11cd) (based on LLVM 8.0.7svn)
a.b.com I/mobile-ffmpeg:   configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android21-clang --cxx=aarch64-linux-android21-clang++ --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disa
a.b.com I/mobile-ffmpeg:   libavutil      56. 38.100 / 56. 38.100
a.b.com I/mobile-ffmpeg:   libavcodec     58. 65.102 / 58. 65.102
a.b.com I/mobile-ffmpeg:   libavformat    58. 35.101 / 58. 35.101
a.b.com I/mobile-ffmpeg:   libavdevice    58.  9.103 / 58.  9.103
a.b.com I/mobile-ffmpeg:   libavfilter     7. 70.101 /  7. 70.101
a.b.com I/mobile-ffmpeg:   libswscale      5.  6.100 /  5.  6.100
a.b.com I/mobile-ffmpeg:   libswresample   3.  6.100 /  3.  6.100
a.b.com W/mobile-ffmpeg: [wav @ 0x7294a86600] Estimating duration from bitrate, this may be inaccurate
a.b.com W/mobile-ffmpeg: Guessed Channel Layout for Input Stream #0.0 : mono
a.b.com I/mobile-ffmpeg: Input #0, wav, from '/data/user/0/a.b.com/cache/creation/input.wav':
a.b.com I/mobile-ffmpeg:   Duration: 
a.b.com I/mobile-ffmpeg: 00:00:07.15
a.b.com I/mobile-ffmpeg: , bitrate: 
a.b.com I/mobile-ffmpeg: 705 kb/s
a.b.com I/mobile-ffmpeg:     Stream #0:0
a.b.com I/mobile-ffmpeg: : Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
a.b.com I/mobile-ffmpeg: Stream mapping:
a.b.com I/mobile-ffmpeg:   Stream #0:0 -> #0:0
a.b.com I/mobile-ffmpeg:  (pcm_s16le (native) -> mp3 (libmp3lame))
a.b.com I/mobile-ffmpeg: Press [q] to stop, [?] for help
a.b.com I/mobile-ffmpeg: Output #0, mp3, to '/data/user/0/a.b.com/cache/creation/output.mp3':
a.b.com I/mobile-ffmpeg:   Metadata:
a.b.com I/mobile-ffmpeg:     TSSE            : 
a.b.com I/mobile-ffmpeg: Lavf58.35.101
a.b.com I/mobile-ffmpeg:     Stream #0:0
a.b.com I/mobile-ffmpeg: : Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp, 96 kb/s
a.b.com I/mobile-ffmpeg:     Metadata:
a.b.com I/mobile-ffmpeg:       encoder         : 
a.b.com I/mobile-ffmpeg: Lavc58.65.102 libmp3lame
a.b.com I/mobile-ffmpeg: --------- beginning of crash
a.b.com A/libc: psymodel.c:576: void calc_energy(const PsyConst_CB2SB_t *, const FLOAT *, FLOAT *, FLOAT *, FLOAT *): assertion "el >= 0" failed
a.b.com A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 25800 (a.b.com), pid 25800 (a.b.com)


    


    Crash :

    


    --------- beginning of crash
 A/libc: psymodel.c:576: void calc_energy(const PsyConst_CB2SB_t *, const FLOAT *, FLOAT *, FLOAT *, FLOAT *): assertion "el >= 0" failed

? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
? A/DEBUG: Build fingerprint: 'samsung/star2qltecs/star2qltecs:10/QP1A.190711.020/G965WVLS7DTE1:user/release-keys'
? A/DEBUG: Revision: '14'
? A/DEBUG: ABI: 'arm64'
? A/DEBUG: Timestamp: 2020-06-29 15:13:17-0400
? A/DEBUG: pid: 1849, tid: 1849, name: a.b.com  >>> a.b.com <<<
? A/DEBUG: uid: 12171
? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
? A/DEBUG: Abort message: 'psymodel.c:576: void calc_energy(const PsyConst_CB2SB_t *, const FLOAT *, FLOAT *, FLOAT *, FLOAT *): assertion "el >= 0" failed'
? A/DEBUG:     x0  0000000000000000  x1  0000000000000739  x2  0000000000000006  x3  0000007fd65f7bb0
? A/DEBUG:     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000008
? A/DEBUG:     x8  00000000000000f0  x9  7f96d7a39856d151  x10 0000000000000001  x11 0000000000000000
? A/DEBUG:     x12 fffffff0fffffbdf  x13 000000005efa3d4c  x14 001c23c1a79207f5  x15 000079d970d48db2
? A/DEBUG:     x16 00000073e009e8c0  x17 00000073e007afe0  x18 00000073e492c000  x19 0000000000000739
? A/DEBUG:     x20 0000000000000739  x21 00000000ffffffff  x22 0000007fd65fc44c  x23 0000007fd65f8640
? A/DEBUG:     x24 0000007fd65fd120  x25 0000007fd65fd3a8  x26 0000007fd65f8240  x27 0000007fd65f9e40
? A/DEBUG:     x28 00000071f9f60900  x29 0000007fd65f7c50
? A/DEBUG:     sp  0000007fd65f7b90  lr  00000073e002c27c  pc  00000073e002c2a8
? A/DEBUG: backtrace:
? A/DEBUG:       #00 pc 00000000000832a8  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 55ce0a7d78144b0290f9746ed1615719)
? A/DEBUG:       #01 pc 00000000000839e8  /apex/com.android.runtime/lib64/bionic/libc.so (__assert2+36) (BuildId: 55ce0a7d78144b0290f9746ed1615719)
? A/DEBUG:       #02 pc 0000000000969c60  /data/app/a.b.com-jXqE8oxytEkfSsn6pcdloQ==/lib/arm64/libavcodec.so


    


    I referred link1, link2 to understand the problem but could not find a solution.

    


  • Rust Win32 FFI : User-mode data execution prevention (DEP) violation

    28 avril 2022, par TheElix

    I'm trying to pass a ID3D11Device instance from Rust to a C FFI Library (FFMPEG).

    


    I made this sample code :

    


    pub fn create_d3d11_device(&amp;mut self, device: &amp;mut Box, context: &amp;mut Box) {&#xA;            let av_device : Box<avbufferref> = self.alloc(HwDeviceType::D3d11va);&#xA;            unsafe {&#xA;                let device_context = Box::from_raw(av_device.data as *mut AVHWDeviceContext);&#xA;                let mut d3d11_device_context = Box::from_raw(device_context.hwctx as *mut AVD3D11VADeviceContext);&#xA;                d3d11_device_context.device = device.as_mut() as *mut _;&#xA;                d3d11_device_context.device_context = context.as_mut() as *mut _;&#xA;                let avp = Box::into_raw(av_device);&#xA;                av_hwdevice_ctx_init(avp);&#xA;                self.av_hwdevice = Some(Box::from_raw(avp));&#xA;            }&#xA;        }&#xA;</avbufferref>

    &#xA;

    On the Rust side the Device does work, but on the C side, when FFMEPG calls ID3D11DeviceContext_QueryInterface the app crashes with the following error : Exception 0xc0000005 encountered at address 0x7ff9fb99ad38: User-mode data execution prevention (DEP) violation at location 0x7ff9fb99ad38

    &#xA;

    The address is actually the pointer for the lpVtbl of QueryInterface, like seen here :

    &#xA;

    The disassembly of the address also looks correct (this is done on an another debugging session) :

    &#xA;

    (lldb) disassemble --start-address 0x00007ffffdf3ad38&#xA;    0x7ffffdf3ad38: addb   %ah, 0x7ffffd(%rdi,%riz,8)&#xA;    0x7ffffdf3ad3f: addb   %al, (%rax)&#xA;    0x7ffffdf3ad41: movabsl -0x591fffff80000219, %eax&#xA;    0x7ffffdf3ad4a: outl   %eax, $0xfd&#xA;

    &#xA;

    Do you have any pointer to debug this further ?

    &#xA;

    EDIT : I made a Minimal Reproducion Sample. Interestingly this does not causes a DEP Violation, but simply a Segfault.

    &#xA;

    On the C side :

    &#xA;

    int test_ffi(ID3D11Device *device){&#xA;    ID3D11DeviceContext *context;&#xA;    device->lpVtbl->GetImmediateContext(device, &amp;context);&#xA;    if (!context) return 1;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    On the Rust side :

    &#xA;

    unsafe fn main_rust(){&#xA;    let mut device = None;&#xA;    let mut device_context = None;&#xA;    let _ = match windows::Win32::Graphics::Direct3D11::D3D11CreateDevice(None, D3D_DRIVER_TYPE_HARDWARE, OtherHinstance::default(), D3D11_CREATE_DEVICE_DEBUG, &amp;[], D3D11_SDK_VERSION, &amp;mut device, std::ptr::null_mut(), &amp;mut device_context) {&#xA;        Ok(e) => e,&#xA;        Err(e) => panic!("Creation Failed: {}", e)&#xA;    };&#xA;    let mut device = match device {&#xA;        Some(e) => e,&#xA;        None => panic!("Creation Failed2")&#xA;    };&#xA;    let mut f2 : ID3D11Device = transmute_copy(&amp;device); //Transmuting the WinAPI into a bindgen ID3D11Device&#xA;    test_ffi(&amp;mut f2);&#xA;}&#xA;

    &#xA;

    The bindgen build.rs :

    &#xA;

    extern crate bindgen;&#xA;&#xA;use std::env;&#xA;use std::path::PathBuf;&#xA;&#xA;fn main() {&#xA;    // Tell cargo to tell rustc to link the system bzip2&#xA;    // shared library.&#xA;    println!("cargo:rustc-link-lib=ffi_demoLIB");&#xA;    println!("cargo:rustc-link-lib=d3d11");&#xA;&#xA;    // Tell cargo to invalidate the built crate whenever the wrapper changes&#xA;    println!("cargo:rerun-if-changed=library.h");&#xA;&#xA;    // The bindgen::Builder is the main entry point&#xA;    // to bindgen, and lets you build up options for&#xA;    // the resulting bindings.&#xA;    let bindings = bindgen::Builder::default()&#xA;        // The input header we would like to generate&#xA;        // bindings for.&#xA;        .header("library.h")&#xA;        // Tell cargo to invalidate the built crate whenever any of the&#xA;        // included header files changed.&#xA;        .parse_callbacks(Box::new(bindgen::CargoCallbacks))&#xA;        .blacklist_type("_IMAGE_TLS_DIRECTORY64")&#xA;        .blacklist_type("IMAGE_TLS_DIRECTORY64")&#xA;        .blacklist_type("PIMAGE_TLS_DIRECTORY64")&#xA;        .blacklist_type("IMAGE_TLS_DIRECTORY")&#xA;        .blacklist_type("PIMAGE_TLS_DIRECTORY")&#xA;        // Finish the builder and generate the bindings.&#xA;        .generate()&#xA;        // Unwrap the Result and panic on failure.&#xA;        .expect("Unable to generate bindings");&#xA;&#xA;    // Write the bindings to the $OUT_DIR/bindings.rs file.&#xA;    let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());&#xA;    bindings&#xA;        .write_to_file(out_path.join("bindings.rs"))&#xA;        .expect("Couldn&#x27;t write bindings!");&#xA;}&#xA;

    &#xA;

    The Complete Repo can be found over here : https://github.com/TheElixZammuto/demo-ffi

    &#xA;