
Recherche avancée
Autres articles (79)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP 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 (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (8279)
-
Dreamcast SD Adapter and DreamShell
31 décembre 2014, par Multimedia Mike — Sega DreamcastNope ! I’m never going to let go of the Sega Dreamcast hacking. When I was playing around with Dreamcast hacking early last year, I became aware that there is such a thing as an SD card adapter for the DC that plugs into the port normally reserved for the odd DC link cable. Of course I wanted to see what I could do with it.
The primary software that leverages the DC SD adapter is called DreamShell. Working with this adapter and the software requires some skill and guesswork. Searching for these topics tends to turn up results from various forums where people are trying to cargo-cult their way to solutions. I have a strange feeling that this post might become the unofficial English-language documentation on the matter.
Use Cases
What can you do with this thing ? Undoubtedly, the primary use is for backing up (ripping) the contents of GD-ROMs (the custom optical format used for the DC) and playing those backed up (ripped) copies. Presumably, users of this device leverage the latter use case more than the former, i.e., download ripped games, load them on the SD card, and launch them using DreamShell.However, there are other uses such as multimedia playback, system exploration, BIOS reprogramming, high-level programming, and probably a few other things I haven’t figured out yet.
Delivery
I put in an order via the dc-sd.com website and in about 2 short months, the item arrived from China. This marked my third lifetime delivery from China and curiously, all 3 of the shipments have pertained to the Sega Dreamcast.
I thought it was very interesting that this adapter came in such complete packaging. The text is all in Chinese, though the back states “Windows 98 / ME / 2000 / XP, Mac OS 9.1, LINUX2.4”. That’s what tipped me off that they must have just cannibalized some old USB SD card readers and packaging in order to create these. Closer inspection of the internals through the translucent pink case confirms this.
Usage
According to its change log, DreamShell has been around for a long time with version 1.0.0 released in February of 2004. The current version is 4.0.0 RC3. There are several downloads available :- DreamShell 4.0 RC 3 CDI Image
- DreamShell 4.0 RC 3 + Boot Loader
- DreamShell 4.0 RC 3 + Core CDI image
Option #2 worked for me. It contains a CDI disc image and the DreamShell files in a directory named DS/.
Burn the CDI to a CD-R in the normal way you would burn a bootable Dreamcast disc from a CDI image. This is open-ended and left as an exercise to the reader, since there are many procedures depending on platform. On Linux, I used a small script I found once called burncdi-dc.sh.
Then, copy the contents of the DS/ folder to an SD card. As for filesystem, FAT16 and FAT32 are both known to work. The files in DS/ should land in the root of the SD card ; the folder DS/ should not be in the root.
Plug the SD card into the DC SD adapter and plug the adapter in the link cable port on the back of the Dreamcast. Then, boot the disc. If it works, you will see this minor corruption of the usual Sega licensing screen :
Then, there will be a brief white-on-black text screen that explains the booting process :
Then, there will be the main DreamShell logo :
Finally, you will land on the DreamShell main desktop :
Skepticism
At first, I was supremely skeptical of the idea that this SD adapter could perform speedily enough to play games reasonably. This was predicated on the observation that my DC coder’s cable that I used to use for homebrew development could not transfer faster than 115200 bits/second, amounting to about 11 kbytes/sec. I assumed that this was a fundamental limitation of the link port.In fact, I ripped a few of my Dreamcast discs over a decade ago and still have those rips lying around. So I copied the ISO image of Resident Evil : Code Veronica — the game I personally played most on the DC — to the SD card (anywhere works) and used the “ISO loader” icon seen on the desktop above to launch the game.
It works :
The opening FMV plays at full speed. Everything loads as fast as I remember. I was quite surprised.
Digression : My assumptions about serial speeds have often been mistaken. 10 years ago, I heard stories about how we would soon be able to watch streaming video on our cell phones. I scoffed because I thought the 56K limitation of dialup modems was some sort of fundamental speed-of-light type of limitation for telephony bandwidth, wired or wireless.
The desktop menu also includes a ‘speedtest’ tool that profiles the write and read performance of your preferred storage medium. For my fastest SD card (a PNY 2 GB card) :
This is probably more representative of the true adapter bandwidth as reading and writing is a good deal faster through more modern interfaces on PC and Mac with this same card.
Look at the other options on the speedtest console. Hard drive ? Apparently, it’s possible, but it requires a good deal more hardware hacking than just purchasing this SD adapter.
Ripping
As you can see from the Resident Evil screenshot, playing games works quite nicely. How about ripping ? I’m pleased to say that DreamShell has a beautiful ripping interface :
Enter a name for the disc (or read the disc label), select the storage medium, and let it, well, rip. It indicates which track it’s working on and the Sega logo acts as a progress bar, shading blue as the track rip progresses.
I’m finally, efficiently, archiving that collection of Sega Dreamcast demo discs ; I’m hoping they’ll eventually find a home at the Internet Archive. How is overall ripping performance ? Usually about 38-40 minutes to rip a full 900-1000 MB. That certainly beats the 27-28 hours that were required when I performed the ripping at 11 kbytes/sec via the DC coders cable.
All is well until I get a sector reading error :
That’s when it can come in handy to have 3 DC consoles (see ?! not crazy !).
Other Uses
There’s a file explorer. You can browse the filesystem of the SD card, visual memory unit, or the CD portion of the GD-ROM (would be more useful if it accessed the GD area). There are FFmpeg files included. So I threw a random Cinepak file and random MPEG-1 file at it to see what happens. MPEG-1 didn’t do anything, but this Cinepak file from some Sierra game played handily :
If you must enter strings, it helps to have a Dreamcast keyboard (which I do). Failing that, here’s a glimpse of the onscreen keyboard that DreamShell equips :
Learning to use it is a game in itself.
There is an option of installing DreamShell in the BIOS. I did not attempt this. I don’t know if it’s possible (not like there’s a lot of documentation)– perhaps a custom BIOS modchip is needed. But here’s what the screen looks like :
There is also a plain console to interact with (better have a physical keyboard). There are numerous file manipulation commands and custom system interaction commands. I see one interesting command called ‘addr’ that looks useful for dumping memory regions to a file.
A Lua language interpreter is also built in. I would love to play with this if I could ascertain whether DreamShell provided Dreamcast-specific APIs.
Tips And Troubleshooting
I have 3 Dreamcast consoles, affectionately named Terran, Protoss, and Zerg after the StarCraft II stickers with which they are adorned. Some seem to work better than others. Protoss seemed to be able to boot the DreamShell disc more reliably than the others. However, I was alarmed when it couldn’t boot one morning when it was churning the previous day.I think the problem is that it was just cold. That seemed to be the issue. I put in a normal GD-ROM and let it warm up on that disc for awhile and then DreamShell booted fine. So that’s my piece of cargo-culting troubleshooting advice.
-
How to crop video with ffmpeg library in Android ?
23 décembre 2016, par DylanTo crop video in Android app I use ffmpeg library
In SO example I found for cropping the video the following command :
ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4
I created a String array :
String[] cmd = "ffmpeg", "-i", originalVideoPath, "-vf", "\"crop=" + imageWidth + " :" + imageHeight + " :" + xCoordinate + " :" + yCoordinate + "\"", "-c:a", "copy", croppedVideoPath ;
And I pass this array to execute() method :
try {
ffmpeg = FFmpeg.getInstance(getContext());
ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {
@Override
public void onStart() {
Log.i(TAG, "onStart: Crop Video started");
}
@Override
public void onProgress(String message) {
Log.i(TAG, "onProgress: " + message);
}
@Override
public void onFailure(String message) {
Log.i(TAG, "onFailure: " + message);
}
@Override
public void onSuccess(String message) {
Log.i(TAG, "onSuccess: " + message);
}
@Override
public void onFinish() {
Log.i(TAG, "onFinish: Video cropping finished");
}
});
} catch (FFmpegCommandAlreadyRunningException e) {
// Handle if FFmpeg is already running
Log.i(TAG, "doInBackground: Exception + Device is not supported");
}The log result is :
12-14 11:33:33.246 5731-5731/com.studioidan.dmc I/CropImageFragment: onStart: Crop Video started
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: built with gcc 4.8 (GCC)
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --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/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: libavutil 55. 17.103 / 55. 17.103
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: libavcodec 57. 24.102 / 57. 24.102
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: libavformat 57. 25.100 / 57. 25.100
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: libavdevice 57. 0.101 / 57. 0.101
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: libavfilter 6. 31.100 / 6. 31.100
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: libswscale 4. 0.100 / 4. 0.100
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: libswresample 2. 0.101 / 2. 0.101
12-14 11:33:33.246 5731-5731/dmc I/CropImageFragment: onProgress: libpostproc 54. 0.100 / 54. 0.100
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DMC/diamondVideo.mp4':
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: Metadata:
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: major_brand : isom
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: minor_version : 0
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: compatible_brands: isom3gp4
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: creation_time : 2016-12-14 08:33:10
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: Duration: 00:00:05.14, start: 0.000000, bitrate: 13480 kb/s
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 13824 kb/s, SAR 1:1 DAR 16:9, 29.96 fps, 30 tbr, 90k tbn, 180k tbc (default)
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: Metadata:
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: creation_time : 2016-12-14 08:33:10
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: handler_name : VideoHandle
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 96 kb/s (default)
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: Metadata:
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: creation_time : 2016-12-14 08:33:10
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: handler_name : SoundHandle
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: [NULL @ 0x433f5f40] Unable to find a suitable output format for 'ffmpeg'
12-14 11:33:33.316 5731-5731/dmc I/CropImageFragment: onProgress: ffmpeg: Invalid argument
12-14 11:33:33.326 5731-5731/dmc I/CropImageFragment: onFailure: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --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/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DMC/diamondVideo.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2016-12-14 08:33:10
Duration: 00:00:05.14, start: 0.000000, bitrate: 13480 kb/s
Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 13824 kb/s, SAR 1:1 DAR 16:9, 29.96 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2016-12-14 08:33:10
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 96 kb/s (default)
Metadata:
creation_time : 2016-12-14 08:33:10
handler_name : SoundHandle
[NULL @ 0x433f5f40] Unable to find a suitable output format for 'ffmpeg'
ffmpeg: Invalid argument
12-14 11:33:33.326 5731-5731/dmc I/CropImageFragment: onFinish: Video cropping finishedBut when I delete ffmpeg from array of command
String[] cmd = "-i", originalVideoPath, "-vf", "\"crop=" + imageWidth + " :" + imageHeight + " :" + xCoordinate + " :" + yCoordinate + "\"", "-c:a", "copy", croppedVideoPath ;
After execute it, the result is :
12-14 11:56:46.366 25930-26592/dmc I/CropImageFragment: onStart: Crop Video started
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: built with gcc 4.8 (GCC)
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --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/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: libavutil 55. 17.103 / 55. 17.103
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: libavcodec 57. 24.102 / 57. 24.102
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: libavformat 57. 25.100 / 57. 25.100
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: libavdevice 57. 0.101 / 57. 0.101
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: libavfilter 6. 31.100 / 6. 31.100
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: libswscale 4. 0.100 / 4. 0.100
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: libswresample 2. 0.101 / 2. 0.101
12-14 11:56:46.426 25930-25930/dmc I/CropImageFragment: onProgress: libpostproc 54. 0.100 / 54. 0.100
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DMC/diamondVideo.mp4':
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: Metadata:
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: major_brand : isom
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: minor_version : 0
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: compatible_brands: isom3gp4
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: creation_time : 2016-12-14 08:56:40
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: Duration: 00:00:05.27, start: 0.000000, bitrate: 13189 kb/s
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 13886 kb/s, SAR 1:1 DAR 16:9, 30.01 fps, 30 tbr, 90k tbn, 180k tbc (default)
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: Metadata:
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: creation_time : 2016-12-14 08:56:40
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: handler_name : VideoHandle
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 96 kb/s (default)
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: Metadata:
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: creation_time : 2016-12-14 08:56:40
12-14 11:56:46.506 25930-25930/dmc I/CropImageFragment: onProgress: handler_name : SoundHandleIt looks like the process starts and after that it freezes
What I do wrong ?
-
Revision 69399 : On refait les critères dans l’inclusion des graphiques, mais on n’affiche ...
25 janvier 2013, par rastapopoulos@… — LogOn refait les critères dans l’inclusion des graphiques, mais on n’affiche cette inclusion que s’il n’y a pas un trop grand nombre de points ! (là 2000 en dur, complètement au hasard).
En vrai il faudrait surtout que les graphiques ne s’affichent qu’avec une pagination mois par mois, un truc dans ce genre !