
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (78)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 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 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (6512)
-
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.
-
Can't convert video with cuda after updating ffmpeg
8 avril 2024, par Peppei've used this command sometimes to convert 4k video into 1080p without problem with tool "ffmpeg batch" and ffmpeg 5.1 ? "2022-08-10-git-8fc7f0fdec-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.1.0 (Rev2, Built by MSYS2 project)" :



-map 0 -map -0:t -filter_complex "scale_cuda=1920:1080:format=yuv420p:interp_algo=lanczos,hwdownload" -fps_mode:v passthrough -c:v h264_nvenc -preset 18 -profile:v high -level 4.1 -b:v 13000K -rc cbr -c:a copy -c:s copy



this with pre-input "-hwaccell cuvid"


Now if i try to to the same with latest version of ffmpeg (6.1.1) it don't work. I've tried to change the pre-input with "-hwaccel cuda" but still nothing, it give me error "Cannot find a matching stream for unlabeled input pad scale_cuda:default".


If i try to add [v:0] before 'scale_cuda', i get this error (pgs subs error was present also before editing command) :


[matroska,webm @ 0000025b18315680] Invalid Block Addition value 0x0 for unknown Block Addition Mapping type 68766345, name ""
[matroska,webm @ 0000025b18315680] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0000025b18315680] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Multiple -hwaccel options specified for stream 0, only the last option '-hwaccel cuda' will be used.
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scale_0'
[fc#0 @ 0000025b18311c80] Error reinitializing filters!
[fc#0 @ 0000025b18311c80] Task finished with error code: -40 (Function not implemented)
[fc#0 @ 0000025b18311c80] Terminating thread with return code -40 (Function not implemented)
[vost#0:0/h264_nvenc @ 0000025b183319c0] Could not open encoder before EOF
[vost#0:0/h264_nvenc @ 0000025b183319c0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_nvenc @ 0000025b183319c0] Terminating thread with return code -22 (Invalid argument)
[h264_nvenc @ 0000025b183692c0] 10 bit encode not supported
[h264_nvenc @ 0000025b183692c0] Provided device doesn't support required NVENC features
[vost#0:1/h264_nvenc @ 0000025b18330d80] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:1 @ 0000025b18340900] Error sending frames to consumers: Function not implemented
[vf#0:1 @ 0000025b18340900] Task finished with error code: -40 (Function not implemented)
[vf#0:1 @ 0000025b18340900] Terminating thread with return code -40 (Function not implemented)
[vost#0:1/h264_nvenc @ 0000025b18330d80] Could not open encoder before EOF
[vost#0:1/h264_nvenc @ 0000025b18330d80] Task finished with error code: -22 (Invalid argument)
[vost#0:1/h264_nvenc @ 0000025b18330d80] Terminating thread with return code -22 (Invalid argument)
[out#0/matroska @ 0000025b18569c40] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lq=0.0 size= 0KiB time=N/A bitrate=N/A speed=N/A



of this if I try to use -vf instead of the "filter_complex" :


[matroska,webm @ 000001814b872040] Invalid Block Addition value 0x0 for unknown Block Addition Mapping type 68766345, name ""
[matroska,webm @ 000001814b872040] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 000001814b872040] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Multiple -hwaccel options specified for stream 0, only the last option '-hwaccel cuda' will be used.
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scale_0'
[vf#0:0 @ 000001814b895fc0] Error reinitializing filters!
[vf#0:0 @ 000001814b895fc0] Task finished with error code: -40 (Function not implemented)
[vf#0:0 @ 000001814b895fc0] Terminating thread with return code -40 (Function not implemented)
[vost#0:0/h264_nvenc @ 000001814b892780] Could not open encoder before EOF
[vost#0:0/h264_nvenc @ 000001814b892780] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_nvenc @ 000001814b892780] Terminating thread with return code -22 (Invalid argument)
[out#0/matroska @ 000001814b88e240] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A 



Can someone tell me the correct way to do it now with an rtx 4090 ?


-
How can I dynamically update metadata in audio output with libav so that updates appear in MPV ?
9 mars, par TeddyMy ultimate goal is to proxy an internet radio station and programmatically add metadata to it during the stream that can be displayed and updated in MPV, the media player playing the audio.


The metadata I would like to add is primarily the song title, but ideally additional information including artist, composer, and album.


I envision running the proxy program like this :


$ curl https://example.com/stream.mp3 | ./proxy_add_metadata | mpv -



or maybe this :


$ ./proxy_add_metadata &
#=> <output>
$ mpv <output>
</output></output>


How could I make song metadata updates dynamically over time using libav ?


I’m using FFmpeg version 7.1.


I first tried changing the metadata dictionary shortly before writing a frame with a few different container formats :


av_dict_set(&output_ctx->metadata, "title", "Title 1", 0);
/* [...] */
av_interleaved_write_frame(output_ctx, packet);



Setting metadata with
av_dict_set(&output_ctx->metadata, "title", "Title 1", 0);
only appears to work when done before writing the output header.

My next idea was to try setting metadata in
AVPacket
side data, but I’m unclear which container formats support this for the kind of metadata I’m working with.

I’m open to any output media container format or FFmpeg-originated network stream.


It’s unclear to me whether the metadata should be written to a separate stream within the media container or whether it should be written as side data in the output packets.


If what I’m trying to do is impossible, please explain why.


What I have so far reads audio from standard input and writes it to standard output. The input audio can be assumed to be in MP3 format. Non-working sections for metadata updates are commented out.


/* proxy_add_metadata.c */
#include 

#include <libavformat></libavformat>avformat.h>
#include <libavcodec></libavcodec>avcodec.h>

int main() {
 int _err;

 /* MP3 input */
 AVFormatContext *input_ctx = avformat_alloc_context();
 _err = avformat_open_input(&input_ctx, "pipe:0", NULL, NULL);
 _err = avformat_find_stream_info(input_ctx, NULL);

 AVFormatContext *output_ctx;
 _err = avformat_alloc_output_context2(&output_ctx, NULL, "matroska", "pipe:1");

 AVStream *input_stream = input_ctx->streams[0];
 AVStream *output_stream = avformat_new_stream(output_ctx, NULL);

 _err = avcodec_parameters_copy(output_stream->codecpar, input_stream->codecpar);
 _err = avio_open(&output_ctx->pb, "pipe:1", AVIO_FLAG_WRITE);

 _err = avformat_write_header(output_ctx, NULL);

 AVPacket *packet = av_packet_alloc();

 /* Set up packet side data. */
 /*
 AVDictionary *packet_side_data_dict;
 av_dict_set(&packet_side_data_dict, "title", "Title 1", 0);

 size_t packet_side_data_size = 0;
 uint8_t *packet_side_data = av_packet_pack_dictionary(
 packet_side_data_dict,
 &packet_side_data_size
 );
 av_dict_free(&packet_side_data_dict);
 */

 while (1) {
 _err = av_read_frame(input_ctx, packet);
 if (_err < 0) {
 break;
 }

 /* Can metadata updates be made here? */

 /* Option 1: Attempt to write metadata to the container. */
 /*
 _err = av_dict_set(&output_ctx->metadata, "title", "Title 1", 0);
 if (_err < 0) {
 fprintf(stderr, "error: can't set metadata title in stream: %s\n", av_err2str(_err));
 break;
 }
 */

 /* Option 2: Attempt to write metadata to packet side data. */
 /*
 _err = av_packet_add_side_data(
 packet,
 AV_PKT_DATA_METADATA_UPDATE,
 packet_side_data,
 packet_side_data_size
 );
 if (_err < 0) {
 fprintf(stderr, "error: can't add side data to packet: %s\n", av_err2str(_err));
 break;
 }
 */

 AVStream *input_stream = input_ctx->streams[packet->stream_index];
 AVStream *output_stream = output_ctx->streams[packet->stream_index];

 av_packet_rescale_ts(packet, input_stream->time_base, output_stream->time_base);
 packet->pos = -1;

 _err = av_interleaved_write_frame(output_ctx, packet);
 if (_err < 0) {
 fprintf(stderr, "error: packet write: %s\n", av_err2str(_err));
 break;
 }
 }

 av_write_trailer(output_ctx);

 av_packet_free_side_data(packet);
 av_packet_free(&packet);

 avio_closep(&output_ctx->pb);
 avformat_free_context(output_ctx);

 avformat_close_input(&input_ctx);

 return 0;
}



cc \
 -Wall \
 -g \
 -I/.../ffmpeg7/include \
 -o proxy_add_metadata \
 proxy_add_metadata.c \
 -L/.../ffmpeg7/lib -lavformat -lavcodec



$ < sample.mp3 ./proxy_add_metadata | mpv -