Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (48)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (2705)

  • FFMPEG android is processing slow

    25 août 2018, par jpc

    I’m using https://github.com/WritingMinds/ffmpeg-android-java as my framework for FFMPEG

    I’m trying to convert an image to a video using this command

    ffmpeg -y -loop 1 -i input.jpg -strict -2 -vcodec mpeg4 -t 5 -pix_fmt yuv420p out.mp4

    It took about 32 seconds to finish the process which is very slow for my requirements.

    Is there a way to speed this up ? I’m thinking of something around 5 seconds, perhaps approximately equal to the specified length of the video

    here’s the log btw

    11-23 12:12:13.587 4228-4228/com.lo.and.dev W/com.lo.and.util: WARNING: linker: /data/data/com.lo.and.dev/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavutil      54.  7.100 / 54.  7.100
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavcodec     56.  1.100 / 56.  1.100
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavformat    56.  4.101 / 56.  4.101
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavdevice    56.  0.100 / 56.  0.100
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavfilter     5.  1.100 /  5.  1.100
    11-23 12:12:13.617 4228-4228/com.lo.and.dev W/com.lo.and.util:   libswscale      3.  0.100 /  3.  0.100
    11-23 12:12:13.617 4228-4228/com.lo.and.dev W/com.lo.and.util:   libswresample   1.  1.100 /  1.  1.100
    11-23 12:12:13.617 4228-4228/com.lo.and.dev W/com.lo.and.util:   libpostproc    53.  0.100 / 53.  0.100
    11-23 12:12:13.707 4228-4228/com.lo.and.dev W/com.lo.and.util: Input #0, image2, from '/storage/emulated/0/DCIM/Camera/20151122_172809.jpg':
    11-23 12:12:13.707 4228-4228/com.lo.and.dev W/com.lo.and.util:   Duration: 00:00:00.04, start: 0.000000, bitrate: 95165 kb/s
    11-23 12:12:13.717 4228-4228/com.lo.and.dev W/com.lo.and.util:     Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
    11-23 12:12:13.727 4228-4228/com.lo.and.dev W/com.lo.and.util: [swscaler @ 0xb5d89000] deprecated pixel format used, make sure you did set range correctly
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util: Output #0, mp4, to '/storage/emulated/0/DCIM/out.mp4':
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:   Metadata:
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:     encoder         : Lavf56.4.101
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:     Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:     Metadata:
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:       encoder         : Lavc56.1.100 mpeg4
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util: Stream mapping:
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:   Stream #0:0 -> #0:0 (mjpeg (native) -> mpeg4 (native))
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util: Press [q] to stop, [?] for help
    11-23 12:12:14.707 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=    3 fps=0.0 q=2.0 size=     343kB time=00:00:00.12 bitrate=23400.5kbits/s    
    11-23 12:12:15.247 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=    5 fps=4.2 q=4.9 size=     345kB time=00:00:00.20 bitrate=14125.9kbits/s    
    11-23 12:12:15.737 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=    7 fps=4.0 q=10.2 size=     347kB time=00:00:00.28 bitrate=10149.8kbits/s    
    11-23 12:12:16.467 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   10 fps=4.1 q=18.9 size=     350kB time=00:00:00.40 bitrate=7167.7kbits/s    
    11-23 12:12:17.037 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   12 fps=4.0 q=24.8 size=     352kB time=00:00:00.48 bitrate=6007.9kbits/s    
    11-23 12:12:17.567 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   14 fps=3.9 q=27.8 size=     403kB time=00:00:00.56 bitrate=5893.7kbits/s    
    11-23 12:12:18.337 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   17 fps=4.0 q=31.0 size=     406kB time=00:00:00.68 bitrate=4891.5kbits/s    
    11-23 12:12:18.847 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   19 fps=3.9 q=31.0 size=     408kB time=00:00:00.76 bitrate=4398.6kbits/s    
    11-23 12:12:19.607 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   22 fps=3.9 q=31.0 size=     411kB time=00:00:00.88 bitrate=3827.4kbits/s    
    11-23 12:12:20.107 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   24 fps=3.9 q=31.0 size=     413kB time=00:00:00.96 bitrate=3525.9kbits/s    
    11-23 12:12:20.637 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   26 fps=3.9 q=31.0 size=     460kB time=00:00:01.04 bitrate=3624.3kbits/s    
    11-23 12:12:21.157 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   28 fps=3.9 q=31.0 size=     462kB time=00:00:01.12 bitrate=3381.1kbits/s    
    11-23 12:12:21.667 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   30 fps=3.9 q=31.0 size=     464kB time=00:00:01.20 bitrate=3169.7kbits/s    
    11-23 12:12:22.167 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   32 fps=3.9 q=31.0 size=     466kB time=00:00:01.28 bitrate=2984.6kbits/s    
    11-23 12:12:22.897 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   35 fps=3.9 q=31.0 size=     469kB time=00:00:01.40 bitrate=2746.8kbits/s    
    11-23 12:12:23.657 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   38 fps=3.9 q=31.0 size=     517kB time=00:00:01.52 bitrate=2788.3kbits/s    
    11-23 12:12:24.387 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   41 fps=4.0 q=31.0 size=     521kB time=00:00:01.64 bitrate=2600.1kbits/s    
    11-23 12:12:24.887 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   43 fps=3.9 q=31.0 size=     523kB time=00:00:01.72 bitrate=2488.9kbits/s    
    11-23 12:12:25.417 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   45 fps=3.9 q=31.0 size=     525kB time=00:00:01.80 bitrate=2387.6kbits/s    
    11-23 12:12:25.967 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   47 fps=3.9 q=31.0 size=     527kB time=00:00:01.88 bitrate=2294.9kbits/s    
    11-23 12:12:26.477 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   49 fps=3.9 q=24.8 size=     572kB time=00:00:01.96 bitrate=2390.0kbits/s    
    11-23 12:12:27.297 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   52 fps=3.9 q=31.0 size=     577kB time=00:00:02.08 bitrate=2271.5kbits/s    
    11-23 12:12:27.987 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   55 fps=3.9 q=31.0 size=     580kB time=00:00:02.20 bitrate=2159.1kbits/s    
    11-23 12:12:28.737 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   58 fps=3.9 q=31.0 size=     583kB time=00:00:02.32 bitrate=2058.2kbits/s    
    11-23 12:12:29.247 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   60 fps=3.9 q=31.0 size=     585kB time=00:00:02.40 bitrate=1996.6kbits/s    
    11-23 12:12:30.017 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   63 fps=3.9 q=31.0 size=     633kB time=00:00:02.52 bitrate=2057.7kbits/s    
    11-23 12:12:30.557 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   65 fps=3.9 q=31.0 size=     635kB time=00:00:02.60 bitrate=2000.8kbits/s    
    11-23 12:12:31.057 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   67 fps=3.9 q=31.0 size=     637kB time=00:00:02.68 bitrate=1947.4kbits/s    
    11-23 12:12:31.627 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   69 fps=3.9 q=31.0 size=     639kB time=00:00:02.76 bitrate=1897.0kbits/s    
    11-23 12:12:32.167 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   71 fps=3.9 q=31.0 size=     641kB time=00:00:02.84 bitrate=1849.5kbits/s    
    11-23 12:12:32.927 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   74 fps=3.9 q=31.0 size=     689kB time=00:00:02.96 bitrate=1907.2kbits/s    
    11-23 12:12:33.407 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   76 fps=3.9 q=31.0 size=     691kB time=00:00:03.04 bitrate=1862.8kbits/s    
    11-23 12:12:34.157 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   79 fps=3.9 q=31.0 size=     694kB time=00:00:03.16 bitrate=1800.0kbits/s    
    11-23 12:12:34.657 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   81 fps=3.9 q=31.0 size=     696kB time=00:00:03.24 bitrate=1760.7kbits/s    
    11-23 12:12:35.217 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   83 fps=3.9 q=31.0 size=     698kB time=00:00:03.32 bitrate=1723.3kbits/s    
    11-23 12:12:35.777 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   85 fps=3.9 q=24.8 size=     744kB time=00:00:03.40 bitrate=1791.6kbits/s    
    11-23 12:12:36.297 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   87 fps=3.9 q=31.0 size=     747kB time=00:00:03.48 bitrate=1759.6kbits/s    
    11-23 12:12:36.827 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   89 fps=3.9 q=31.0 size=     750kB time=00:00:03.56 bitrate=1724.8kbits/s    
    11-23 12:12:37.547 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   92 fps=3.9 q=31.0 size=     753kB time=00:00:03.68 bitrate=1675.4kbits/s    
    11-23 12:12:38.297 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   95 fps=3.9 q=31.0 size=     756kB time=00:00:03.80 bitrate=1629.1kbits/s    
    11-23 12:12:38.797 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   97 fps=3.9 q=24.8 size=     801kB time=00:00:03.88 bitrate=1690.8kbits/s    
    11-23 12:12:39.547 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  100 fps=3.9 q=31.0 size=     806kB time=00:00:04.00 bitrate=1650.2kbits/s    
    11-23 12:12:40.047 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  102 fps=3.9 q=31.0 size=     808kB time=00:00:04.08 bitrate=1621.9kbits/s    
    11-23 12:12:40.807 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  105 fps=3.9 q=31.0 size=     811kB time=00:00:04.20 bitrate=1581.6kbits/s    
    11-23 12:12:41.267 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  107 fps=3.9 q=31.0 size=     813kB time=00:00:04.28 bitrate=1555.9kbits/s    
    11-23 12:12:42.057 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  110 fps=3.9 q=31.0 size=     861kB time=00:00:04.40 bitrate=1602.8kbits/s    
    11-23 12:12:42.557 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  112 fps=3.9 q=31.0 size=     863kB time=00:00:04.48 bitrate=1578.1kbits/s    
    11-23 12:12:43.307 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  115 fps=3.9 q=31.0 size=     866kB time=00:00:04.60 bitrate=1542.4kbits/s    
    11-23 12:12:43.817 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  117 fps=3.9 q=31.0 size=     868kB time=00:00:04.68 bitrate=1519.6kbits/s    
    11-23 12:12:44.517 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  120 fps=3.9 q=31.0 size=     871kB time=00:00:04.80 bitrate=1486.8kbits/s    
    11-23 12:12:45.277 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  123 fps=3.9 q=31.0 size=     919kB time=00:00:04.92 bitrate=1530.6kbits/s    
    11-23 12:12:45.987 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  125 fps=3.9 q=31.0 size=     921kB time=00:00:05.00 bitrate=1509.4kbits/s    
    11-23 12:12:45.987 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  125 fps=3.9 q=31.0 Lsize=     923kB time=00:00:05.00 bitrate=1511.6kbits/s    
    11-23 12:12:45.987 4228-4228/com.lo.and.dev W/com.lo.and.util: video:921kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.148301%
  • FFMPEG android is processing slow

    23 novembre 2015, par jpc

    I’m using https://github.com/WritingMinds/ffmpeg-android-java as my framework for FFMPEG

    I’m trying to convert an image to a video using this command

    ffmpeg -y -loop 1 -i input.jpg -strict -2 -vcodec mpeg4 -t 5 -pix_fmt yuv420p out.mp4

    It took about 32 seconds to finish the process which is very slow for my requirements.

    Is there a way to speed this up ? I’m thinking of something around 5 seconds, perhaps approximately equal to the specified length of the video

    here’s the log btw

    11-23 12:12:13.587 4228-4228/com.lo.and.dev W/com.lo.and.util: WARNING: linker: /data/data/com.lo.and.dev/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavutil      54.  7.100 / 54.  7.100
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavcodec     56.  1.100 / 56.  1.100
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavformat    56.  4.101 / 56.  4.101
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavdevice    56.  0.100 / 56.  0.100
    11-23 12:12:13.607 4228-4228/com.lo.and.dev W/com.lo.and.util:   libavfilter     5.  1.100 /  5.  1.100
    11-23 12:12:13.617 4228-4228/com.lo.and.dev W/com.lo.and.util:   libswscale      3.  0.100 /  3.  0.100
    11-23 12:12:13.617 4228-4228/com.lo.and.dev W/com.lo.and.util:   libswresample   1.  1.100 /  1.  1.100
    11-23 12:12:13.617 4228-4228/com.lo.and.dev W/com.lo.and.util:   libpostproc    53.  0.100 / 53.  0.100
    11-23 12:12:13.707 4228-4228/com.lo.and.dev W/com.lo.and.util: Input #0, image2, from '/storage/emulated/0/DCIM/Camera/20151122_172809.jpg':
    11-23 12:12:13.707 4228-4228/com.lo.and.dev W/com.lo.and.util:   Duration: 00:00:00.04, start: 0.000000, bitrate: 95165 kb/s
    11-23 12:12:13.717 4228-4228/com.lo.and.dev W/com.lo.and.util:     Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
    11-23 12:12:13.727 4228-4228/com.lo.and.dev W/com.lo.and.util: [swscaler @ 0xb5d89000] deprecated pixel format used, make sure you did set range correctly
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util: Output #0, mp4, to '/storage/emulated/0/DCIM/out.mp4':
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:   Metadata:
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:     encoder         : Lavf56.4.101
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:     Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:     Metadata:
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:       encoder         : Lavc56.1.100 mpeg4
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util: Stream mapping:
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util:   Stream #0:0 -> #0:0 (mjpeg (native) -> mpeg4 (native))
    11-23 12:12:13.777 4228-4228/com.lo.and.dev W/com.lo.and.util: Press [q] to stop, [?] for help
    11-23 12:12:14.707 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=    3 fps=0.0 q=2.0 size=     343kB time=00:00:00.12 bitrate=23400.5kbits/s    
    11-23 12:12:15.247 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=    5 fps=4.2 q=4.9 size=     345kB time=00:00:00.20 bitrate=14125.9kbits/s    
    11-23 12:12:15.737 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=    7 fps=4.0 q=10.2 size=     347kB time=00:00:00.28 bitrate=10149.8kbits/s    
    11-23 12:12:16.467 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   10 fps=4.1 q=18.9 size=     350kB time=00:00:00.40 bitrate=7167.7kbits/s    
    11-23 12:12:17.037 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   12 fps=4.0 q=24.8 size=     352kB time=00:00:00.48 bitrate=6007.9kbits/s    
    11-23 12:12:17.567 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   14 fps=3.9 q=27.8 size=     403kB time=00:00:00.56 bitrate=5893.7kbits/s    
    11-23 12:12:18.337 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   17 fps=4.0 q=31.0 size=     406kB time=00:00:00.68 bitrate=4891.5kbits/s    
    11-23 12:12:18.847 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   19 fps=3.9 q=31.0 size=     408kB time=00:00:00.76 bitrate=4398.6kbits/s    
    11-23 12:12:19.607 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   22 fps=3.9 q=31.0 size=     411kB time=00:00:00.88 bitrate=3827.4kbits/s    
    11-23 12:12:20.107 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   24 fps=3.9 q=31.0 size=     413kB time=00:00:00.96 bitrate=3525.9kbits/s    
    11-23 12:12:20.637 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   26 fps=3.9 q=31.0 size=     460kB time=00:00:01.04 bitrate=3624.3kbits/s    
    11-23 12:12:21.157 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   28 fps=3.9 q=31.0 size=     462kB time=00:00:01.12 bitrate=3381.1kbits/s    
    11-23 12:12:21.667 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   30 fps=3.9 q=31.0 size=     464kB time=00:00:01.20 bitrate=3169.7kbits/s    
    11-23 12:12:22.167 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   32 fps=3.9 q=31.0 size=     466kB time=00:00:01.28 bitrate=2984.6kbits/s    
    11-23 12:12:22.897 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   35 fps=3.9 q=31.0 size=     469kB time=00:00:01.40 bitrate=2746.8kbits/s    
    11-23 12:12:23.657 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   38 fps=3.9 q=31.0 size=     517kB time=00:00:01.52 bitrate=2788.3kbits/s    
    11-23 12:12:24.387 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   41 fps=4.0 q=31.0 size=     521kB time=00:00:01.64 bitrate=2600.1kbits/s    
    11-23 12:12:24.887 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   43 fps=3.9 q=31.0 size=     523kB time=00:00:01.72 bitrate=2488.9kbits/s    
    11-23 12:12:25.417 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   45 fps=3.9 q=31.0 size=     525kB time=00:00:01.80 bitrate=2387.6kbits/s    
    11-23 12:12:25.967 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   47 fps=3.9 q=31.0 size=     527kB time=00:00:01.88 bitrate=2294.9kbits/s    
    11-23 12:12:26.477 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   49 fps=3.9 q=24.8 size=     572kB time=00:00:01.96 bitrate=2390.0kbits/s    
    11-23 12:12:27.297 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   52 fps=3.9 q=31.0 size=     577kB time=00:00:02.08 bitrate=2271.5kbits/s    
    11-23 12:12:27.987 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   55 fps=3.9 q=31.0 size=     580kB time=00:00:02.20 bitrate=2159.1kbits/s    
    11-23 12:12:28.737 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   58 fps=3.9 q=31.0 size=     583kB time=00:00:02.32 bitrate=2058.2kbits/s    
    11-23 12:12:29.247 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   60 fps=3.9 q=31.0 size=     585kB time=00:00:02.40 bitrate=1996.6kbits/s    
    11-23 12:12:30.017 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   63 fps=3.9 q=31.0 size=     633kB time=00:00:02.52 bitrate=2057.7kbits/s    
    11-23 12:12:30.557 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   65 fps=3.9 q=31.0 size=     635kB time=00:00:02.60 bitrate=2000.8kbits/s    
    11-23 12:12:31.057 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   67 fps=3.9 q=31.0 size=     637kB time=00:00:02.68 bitrate=1947.4kbits/s    
    11-23 12:12:31.627 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   69 fps=3.9 q=31.0 size=     639kB time=00:00:02.76 bitrate=1897.0kbits/s    
    11-23 12:12:32.167 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   71 fps=3.9 q=31.0 size=     641kB time=00:00:02.84 bitrate=1849.5kbits/s    
    11-23 12:12:32.927 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   74 fps=3.9 q=31.0 size=     689kB time=00:00:02.96 bitrate=1907.2kbits/s    
    11-23 12:12:33.407 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   76 fps=3.9 q=31.0 size=     691kB time=00:00:03.04 bitrate=1862.8kbits/s    
    11-23 12:12:34.157 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   79 fps=3.9 q=31.0 size=     694kB time=00:00:03.16 bitrate=1800.0kbits/s    
    11-23 12:12:34.657 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   81 fps=3.9 q=31.0 size=     696kB time=00:00:03.24 bitrate=1760.7kbits/s    
    11-23 12:12:35.217 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   83 fps=3.9 q=31.0 size=     698kB time=00:00:03.32 bitrate=1723.3kbits/s    
    11-23 12:12:35.777 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   85 fps=3.9 q=24.8 size=     744kB time=00:00:03.40 bitrate=1791.6kbits/s    
    11-23 12:12:36.297 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   87 fps=3.9 q=31.0 size=     747kB time=00:00:03.48 bitrate=1759.6kbits/s    
    11-23 12:12:36.827 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   89 fps=3.9 q=31.0 size=     750kB time=00:00:03.56 bitrate=1724.8kbits/s    
    11-23 12:12:37.547 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   92 fps=3.9 q=31.0 size=     753kB time=00:00:03.68 bitrate=1675.4kbits/s    
    11-23 12:12:38.297 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   95 fps=3.9 q=31.0 size=     756kB time=00:00:03.80 bitrate=1629.1kbits/s    
    11-23 12:12:38.797 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=   97 fps=3.9 q=24.8 size=     801kB time=00:00:03.88 bitrate=1690.8kbits/s    
    11-23 12:12:39.547 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  100 fps=3.9 q=31.0 size=     806kB time=00:00:04.00 bitrate=1650.2kbits/s    
    11-23 12:12:40.047 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  102 fps=3.9 q=31.0 size=     808kB time=00:00:04.08 bitrate=1621.9kbits/s    
    11-23 12:12:40.807 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  105 fps=3.9 q=31.0 size=     811kB time=00:00:04.20 bitrate=1581.6kbits/s    
    11-23 12:12:41.267 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  107 fps=3.9 q=31.0 size=     813kB time=00:00:04.28 bitrate=1555.9kbits/s    
    11-23 12:12:42.057 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  110 fps=3.9 q=31.0 size=     861kB time=00:00:04.40 bitrate=1602.8kbits/s    
    11-23 12:12:42.557 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  112 fps=3.9 q=31.0 size=     863kB time=00:00:04.48 bitrate=1578.1kbits/s    
    11-23 12:12:43.307 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  115 fps=3.9 q=31.0 size=     866kB time=00:00:04.60 bitrate=1542.4kbits/s    
    11-23 12:12:43.817 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  117 fps=3.9 q=31.0 size=     868kB time=00:00:04.68 bitrate=1519.6kbits/s    
    11-23 12:12:44.517 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  120 fps=3.9 q=31.0 size=     871kB time=00:00:04.80 bitrate=1486.8kbits/s    
    11-23 12:12:45.277 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  123 fps=3.9 q=31.0 size=     919kB time=00:00:04.92 bitrate=1530.6kbits/s    
    11-23 12:12:45.987 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  125 fps=3.9 q=31.0 size=     921kB time=00:00:05.00 bitrate=1509.4kbits/s    
    11-23 12:12:45.987 4228-4228/com.lo.and.dev W/com.lo.and.util: frame=  125 fps=3.9 q=31.0 Lsize=     923kB time=00:00:05.00 bitrate=1511.6kbits/s    
    11-23 12:12:45.987 4228-4228/com.lo.and.dev W/com.lo.and.util: video:921kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.148301%
  • Xbox Sphinx Protocol

    21 octobre 2013, par Multimedia Mike — DRM, xbox

    I’ve gone down the rabbit hole of trying to read the Xbox DVD drive from Linux. Honestly, I’m trying to remember why I even care at this point. Perhaps it’s just my metagame of trying to understand how games and related technologies operate. In my last post of the matter, I determined that it is possible to hook an Xbox drive up to a PC using a standard 40-pin IDE interface and read data sectors. However, I learned that just because the Xbox optical drive is reading an Xbox disc, that doesn’t mean it’s just going to read the sectors in response to a host request.

    Oh goodness, no. The drive is going to make the host work for those sectors.

    To help understand the concept of locked/unlocked sectors on an Xbox disc, I offer this simplistic diagram :


    Xbox locked disc diagram

    Any DVD drive (including the Xbox drive) is free to read those first 6992 sectors (about 14 MB of data) which just contain a short DVD video asking the user to insert the disc into a proper Xbox console. Reading the remaining sectors involves performing a sequence of SCSI commands that I have taken to calling the “Sphinx Protocol” for reasons I will explain later in this post.

    References
    Doing a little Googling after my last post on the matter produced this site hosting deep, technical Xbox information. It even has a page about exactly what I am trying to achieve : Use an Xbox DVD Drive in Your PC. The page provides a tool named dvdunlocker written by “The Specialist” to perform the necessary unlocking. The archive includes a compiled Windows binary as well as its source code. The source code is written in Delphi Pascal and leverages Windows SCSI APIs. Still, it is well commented and provides a roadmap, which I will try to describe in this post.

    Sphinx Protocol
    Here is a rough flowchart of the steps that are (probably) involved in the unlocking of those remaining sectors. I reverse engineered this based on the Pascal tool described in the previous section. Disclaimer : at the time of this writing, I haven’t tested all of the steps due to some Linux kernel problems, described later.


    Xbox SCSI Unlock Protocol

    Concerning the challenge/response table that the drive sends back, it’s large (0×664 / 1636 bytes), and not all of the bytes’ meanings are known. However, these are the bytes that seem to be necessary (all multi-byte numbers are big endian) :

     bytes 0-1        Size of mode page payload data (should be 0x0662)
     bytes 2-771      Unknown
     byte  772        Should be 1
     byte  773        Number of entries in challenge/response table
     bytes 774-1026   Encrypted challenge/response table
     bytes 1027-1186  Unknown
     bytes 1187-1230  Key basis (44 bytes)
     bytes 1231-1635  Unknown
    

    The challenge/response table is the interesting part, but it’s encrypted with RC4 a.k.a. ARCFOUR. The key is derived from the 44 bytes I have labeled “key basis”– cryptographic literature probably has a better term for it ; chime in if you know what that might be. An SHA-1 hash is computed over the 44 bytes.

    The resulting SHA-1 hash — the first part of it, to be exact — is fed as the key into the RC4 decryption. The output of SHA-1 contains 160 bits of information. 160 / 8 = 20 bytes of information. To express this as a printable hex digest requires 40 characters. The SHA-1 hash is converted to a hex digest and then the first 7 of the characters are fed into the RC4 initialization function as the key. Then, the RC4 decrypter does its work on the 253 bytes of the challenge/response table.

    So that’s why I took to calling this the “Sphinx Protocol” — I felt like I was being challenged with a bizarre riddle. Perhaps that describes a lot of cryptosystems, though You have to admit it sounds kind of cool.

    The challenge/response table contains 23 11-byte records. The format of this table is (again, multi-byte numbers are big-endian) :

     byte  0     This is 1 if this challenge/response pair is valid
     byte  1     Challenge ID
     bytes 2-5   Challenge
     byte  6     Response ID
     bytes 7-10  Response
    

    Example
    It’s useful to note that the challenge/response table and associated key is different for every disc (at least all the ones I have looked at). So this might be data that comes from the disc, since the values will always be the same for a given disc.

    Let’s examine Official Xbox Magazine disc #16 (Indiana Jones and The Emperor’s Tomb) :


    Xbox Magazine #16 featuring Indiana Jones

    Before I decrypt the challenge/response table, it looks like this :

       0 : 180, 172 : 0xEB100059 ;  66 : 0xD56AFB56
       1 :  34,  71 : 0x8F9BF03A ; 192 : 0xC32CBDF8
       2 : 226, 216 : 0xA29B77F2 ;  12 : 0x4474A6F1
       3 :  72, 122 : 0x9F5ABF33 ; 255 : 0xC5E3C304
       4 :   1, 103 : 0x76142ADA ; 233 : 0xDE145D42 ****
       5 :  49, 193 : 0xA1CD6192 ; 189 : 0x2169DBA5
       6 : 182, 250 : 0x9977894F ;  96 : 0x5A929E2B
       7 : 148,  71 : 0x6DD10A54 ; 115 : 0xF0BDAC4F
       8 :  12,  45 : 0x5D5EB6FD ; 148 : 0x84E60A00
       9 :  99, 121 : 0xFEAED372 ; 201 : 0xDA9986F9
      10 : 172, 230 : 0xE6C0D0B4 ; 214 : 0x9050C250
      11 :  84,  65 : 0x95CB8775 ; 104 : 0x550886C6
      12 : 210,  65 : 0x1ED23619 ; 171 : 0x6DF4A35B
      13 :   2, 155 : 0xD0AAE1E0 ; 130 : 0x00D1FFCF
      14 :  40,   2 : 0x172EFEB8 ; 159 : 0x37E03E50
      15 :  49,  15 : 0x43E5E378 ; 223 : 0x267F9C9A
      16 : 240, 173 : 0x357D5D1C ; 250 : 0x24965D67
      17 :  80, 184 : 0x5E7AF1A3 ;  81 : 0x3A8F69A7
      18 : 154, 186 : 0x6626BEAC ; 245 : 0xE639540A
      19 : 231, 249 : 0xFABAAFB7 ; 227 : 0x4C686A07
      20 : 150, 186 : 0x9A6D7AA3 ; 133 : 0x25971CF0
      21 : 236, 192 : 0x5CD97DD4 ; 247 : 0x26655EFB
      22 :  68, 173 : 0xE2D372E4 ; 207 : 0x103FBF94
    there are 1 valid pairs in the list : 4
    

    My best clue that it’s not right is that there is only 1 valid entry (denoted by my tool using ****). The source I reverse engineered for this data indicates that there needs to be at least 2 valid pairs. After running the RC4 decryption on the table, it looks like this and I get far more valid pairs :

       0 :   1, 174 : 0xBD628255 ;   0 : 0x9F0A31AF ****
       1 :   2, 176 : 0x3151B341 ;   2 : 0x9C87C180
       2 :   3, 105 : 0x018879E5 ;   1 : 0xFF068B5C
       3 :   2,   7 : 0x1F316AAF ;   3 : 0xF420D3ED
       4 :   3,  73 : 0xC2EBFBE9 ;   0 : 0x17062B5B
       5 : 252, 163 : 0xFF14B5CB ; 236 : 0xAF813FBC
       6 :   2, 233 : 0x5EE95C49 ;   1 : 0x37AA5511
       7 :   1, 126 : 0xBD628255 ;   0 : 0x5BA3FBD4 ****
       8 :   3,   4 : 0xB68BFEE6 ;   3 : 0xA8F3B918
       9 :   3,  32 : 0xEA614943 ;   2 : 0xA678D715
      10 :   2, 248 : 0x1BDD374E ;   0 : 0x8D2AC2C7
      11 :   3,  17 : 0x0EABCE81 ;   2 : 0xC90A7242
      12 :   1, 186 : 0xBD628255 ;   0 : 0xC4820242 ****
      13 :   3, 145 : 0xB178F942 ;   3 : 0x4D78AD62
      14 :   3,  37 : 0x4A6CE5E2 ;   2 : 0xBF94E1C6
      15 :   1, 102 : 0xBD628255 ;   0 : 0xFFB83D8D ****
      16 :   3, 122 : 0xF97B0905 ;   1 : 0x38533125
      17 :   3, 197 : 0x57A6865D ;   2 : 0xA61D31EF
      18 :   3,  27 : 0xC7227D7C ;   2 : 0xA3F9BA1E
      19 :   1,  16 : 0xBD628255 ;   0 : 0x8557CCC8 ****
      20 :   2,  53 : 0x1DA9D156 ;   3 : 0xC9051754
      21 :   2,  90 : 0x3CD66BEE ;   3 : 0xFD851D3E
      22 :   1, 252 : 0xBD628255 ;   0 : 0xB3F22701 ****
    there are 6 valid pairs in the list : 0 7 12 15 19 22
    

    So, hopefully, I have the decryption correct.

    Also of note is that you only get one chance to get this unlocking correct– fail, and the drive won’t return a valid DVD structure block again. You will either need to reboot the Xbox or eject & close the tray before you get to try again.

    Problems Making It Work In Linux
    There are a couple of ways to play with SCSI protocols under Linux. In more recent kernels, block devices are named /dev/sda, /dev/sdb, etc. Each of these block devices has a corresponding character device named /dev/sg0, /dev/sg1, etc. ‘sg’ stands for SCSI generic. This character devices can be opened as readable and/or writable and SCSI commands can be freely written with write() and data retrieved with read(). Pretty powerful.

    Except that the one machine I still possess which supports 40-pin IDE/ATAPI devices is running Linux kernel 2.6.24 which dates back to early 2008 and it still enumerates the IDE block devices as /dev/hda, /dev/hdb, etc. There are no corresponding /dev/sgX character devices. What to do ? It seems that a program can still issue SCSI commands using an ioctl() facility named SG_IO.

    I was able to make the SG_IO ioctl() work for the most part (except for the discovery that the Xbox drive doesn’t respond to a basic SCSI Inquiry command). However, I ran into a serious limitation– a program can only open a /dev/hdX block device in read-only mode if the device corresponds to a read-only drive like, for example, a DVD-ROM drive. This means that a program can’t issue SCSI mode select commands to the drive, which counts as writing. This means that my tool can’t unlock the drive.

    Current Status
    So this is where my experiment is blocked right now. I have been trying to compile various Linux kernels to remedy the situation. But I always seem to find myself stuck in one of 2 situations, depending on the configuration options I choose : Either the drives are enumerated with the /dev/hdX convention and I am stuck in read-only mode (with no mode select) ; or the drives are enumerated with /dev/sdX along with corresponding /dev/sgN character devices, in which case the kernel does not recognize the Xbox DVD-ROM drive.

    This makes me wonder if there’s a discrepancy between the legacy ATA/ATAPI drivers (which sees the drive) and the newer SATA/PATA subsystem (which doesn’t see the drive). I also wonder about hacking the kernel logic to allow SCSI mode select logic to proceed to the device for a read-only file handle.