
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (90)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (12777)
-
Anomalie #2749 (Fermé) : Problème de cookie
21 mars 2013, par guytarr °il y a bien http://forum.spip.net/fr_248457.html mais rien trouvé dans forum ou sur les listes de "récent".
-
Unknown issue with Discord.js and ytdl, completely skips playing audio
21 novembre 2017, par Gman0064One of the commands I have for my Discord bot is to play a predefined music clip in the current user’s voice channel. The bot can connect, but rather than playing the song, it instantaneously leaves. I’ve tried using both
connection.playStream
as well asconnection.playFile
, and both seem to return the same (lack of) output. Am I missing some sort of dependency or is my code just written incorrectly ? Any help would be greatly appreciated !const Discord = require('discord.js');
const ytdl = require('ytdl-core');
const client = new Discord.Client();
const streamOptions = { seek: 0, volume: 1};
client.on('ready', () => {
console.log('Login Success');
});
client.on('message', message => {
if (message.content === '$vaporwave') {
if (!message.guild) return;
if(message.member.voiceChannel) {
message.member.voiceChannel.join().then(connection => {
console.log("joined channel");
//const stream = ytdl('https://www.youtube.com/watch?v=cU8HrO7XuiE', { filter : 'audioonly' });
const dispatcher = connection.playFile('./mcp420.mp3');
//const dispatcher = connection.playStream(stream, streamOptions);
dispatcher.on("end", end => {
console.log("left channel");
message.member.voiceChannel.leave();
});
}).catch(err => console.log(err));
}
}
});- NPM v4.6.1
- Node.js v8.9.1
- FFMPEG v3.2.8-1
-
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 -