
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (69)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)
Sur d’autres sites (1860)
-
Discord bot returning odd error message and not playing sound
26 février 2020, par Ravenr_I am attempting to create a function of my discord bot that will join your voice channel then play something from youtube as specified in the command
i.e.
$play <youtube link="link"></youtube>
The problem is that my bot joins the voice channel but doesn’t play any sound and outputs an error to the console that I dont know how to fix
My Code :
const ytdl = require("ytdl-core");
module.exports = {
name: 'play',
description: 'initiates music methods of the bot',
execute(msg, args){
var servers = {};
function play(connection, msg){
var server = servers[msg.guild.id];
server.dispatcher = connection.playStream(ytdl(server.queue[0], {filter: "audioonly"}));
server.queue.shift();
server.dispatcher.on("end", function(){
if(server.queue[0]){
play(connection, msg);
}else{
connection.disconnect();
}
});
}
if(!args[1]){
return msg.channel.send("you need to provide a link");
}
if(!msg.member.voiceChannel){
return msg.channel.send("You must be in a voice channel to use this feature");
}
if(!servers[msg.guild.id]) servers[msg.guild.id] = {
queue: []
}
var server = servers[msg.guild.id];
server.queue.push(args[1]);
if(!msg.guild.voiceConnection) msg.member.voiceChannel.join().then(function(connection){
play(connection, msg);
})
}
}The Error :
2020-02-26T16:31:59.458215+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of Object
2020-02-26T16:31:59.458223+00:00 app[worker.1]: at validateString (internal/validators.js:117:11)
2020-02-26T16:31:59.458224+00:00 app[worker.1]: at normalizeSpawnArguments (child_process.js:406:3)
2020-02-26T16:31:59.458224+00:00 app[worker.1]: at Object.spawn (child_process.js:542:16)
2020-02-26T16:31:59.458225+00:00 app[worker.1]: at new FfmpegProcess (/app/node_modules/prism-media/src/transcoders/ffmpeg/FfmpegProcess.js:14:33)
2020-02-26T16:31:59.458225+00:00 app[worker.1]: at FfmpegTranscoder.transcode (/app/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:34:18)
2020-02-26T16:31:59.458226+00:00 app[worker.1]: at MediaTranscoder.transcode (/app/node_modules/prism-media/src/transcoders/MediaTranscoder.js:27:31)
2020-02-26T16:31:59.458226+00:00 app[worker.1]: at Prism.transcode (/app/node_modules/prism-media/src/Prism.js:13:28)
2020-02-26T16:31:59.458227+00:00 app[worker.1]: at AudioPlayer.playUnknownStream (/app/node_modules/discord.js/src/client/voice/player/AudioPlayer.js:97:35)
2020-02-26T16:31:59.458231+00:00 app[worker.1]: at VoiceConnection.playStream (/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:478:24)
2020-02-26T16:31:59.458232+00:00 app[worker.1]: at play (/app/commands/play.js:11:44)for reference these are the links I tested it with 1 & 2
I’m not sure how to make queue[0] a string, which is what I assume the problem is.
I was thinking of using a toString() i.e.
server.queue[0].toString()
but I think that will just return the memory address.If anyone can help me know what the issue is or how to fix it, that would be great.
-
Removing one audio track from a movie results in audio desync when copying, but not when reencoding --- why ?
18 avril 2020, par chskI'm trying to remove a superfluous audio track from a movie file. Specifically, this movie on
archive.org
has the original audio as track 2, and what appears to be a slavic (Russian ?) voiceover in track 1. I'd like to get rid of the latter.


I found this question that suggested I should do the following :



ffmpeg -i Benjamín\ dúfa.avi -map 0 -map -0:a:0 -c copy Benjamín\ dúfa\ \(aðeins\ íslenskt\ tal\).avi



But this doesn't work : after removing the first audio track, audio and video are not in sync in the resulting file anymore (when played in VLC). Now, I was able to overcome this problem by also reencoding the remaining audio track along the way, using



ffmpeg -i Benjamín\ dúfa.avi -map 0 -map -0:a:0 -c:v copy Benjamín\ dúfa\ \(aðeins\ íslenskt\ tal\).avi



But while this works, I'd like to understand why copying the audio track instead does not. I suppose it's a somewhat philosophical question --- consider it a matter of intellectual curiosity, combined with an aversion to needless lossy re-encoding.



So if anyone can explain this to me, I'd very grateful. Thanks !



EDIT : as per Gyan's request, here's ffmpeg's output for the first command :



ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.1.1 (GCC) 20190807
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, avi, from 'Benjamín dúfa.avi':
 Metadata:
 encoder : VirtualDubModRus 1.5.10.2 (build 2542/release)
 IAS1 : Islenska
 Duration: 01:27:37.00, start: 0.000000, bitrate: 1313 kb/s
 Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 kb/s
 Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
Output #0, avi, to 'b.avi':
 Metadata:
 IAS1 : Islenska
 ISFT : Lavf58.29.100
 Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], q=2-31, 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[avi @ 0000000002bf00c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=131425 fps=7616 q=-1.0 Lsize= 718952kB time=01:27:37.00 bitrate=1120.3kbits/s speed= 305x
video:628523kB audio:82141kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.166227%




And also for the second, for comparison :



ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.1.1 (GCC) 20190807
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, avi, from 'Benjamín dúfa.avi':
 Metadata:
 encoder : VirtualDubModRus 1.5.10.2 (build 2542/release)
 IAS1 : Islenska
 Duration: 01:27:37.00, start: 0.000000, bitrate: 1313 kb/s
 Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 kb/s
 Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:2 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, avi, to 'b2.avi':
 Metadata:
 IAS1 : Islenska
 ISFT : Lavf58.29.100
 Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], q=2-31, 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
 Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp
 Metadata:
 encoder : Lavc58.54.100 libmp3lame
[avi @ 00000000004b7440] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=131425 fps=1090 q=-1.0 Lsize= 718952kB time=01:27:37.00 bitrate=1120.3kbits/s speed=43.6x
video:628523kB audio:82141kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.166233%



-
Exoplayer FFMPEG issue. Video froze on the first frame after adding Exoplayer FFMPEG extension
13 mai 2020, par AravindI am working on adding Exoplayer and it works fine. But some of the videos were playing without audio, it plays fine in VLC medial player. So I was suggested to add Exoplayer FFMPEG. I added Exoplayer FFMPEG extension and I modified the code as below,



val videoTrackSelectionFactory: TrackSelection.Factory = AdaptiveTrackSelection.Factory(BANDWIDTH_METER)
val trackSelector: TrackSelector = DefaultTrackSelector(videoTrackSelectionFactory)

val renderersFactory: RenderersFactory = DefaultRenderersFactory(mContext, null, EXTENSION_RENDERER_MODE_PREFER)
mPlayer = ExoPlayerFactory.newSimpleInstance(mContext, renderersFactory, trackSelector)
mediaSource = mMediaSourceUri?.let { createLeafMediaSource(it) }!!
mPlayer.prepare(mediaSource)




After I modified the video stuck with the first frame and it keeps on loading. I checked the log and I didn't see any error.






Can anyone help me with this ? Thanks in advance !