
Recherche avancée
Autres articles (88)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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 (...) -
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
Sur d’autres sites (7217)
-
FFMPEG not found because FFMPEG-binaries is no longer supported
17 novembre 2019, par brenan patrickI have been attempting to create a Discord bot, but it cannot connect to a voice channel because it gives the error
Error: FFMPEG not found
. Is there a way to get around using FFMPEG-binaries or an older version that I can install manually ?const Discord = require('discord.js');
const {
prefix,
token,
} = require('./config.json');
const ytdl = require('ytdl-core');
const client = new Discord.Client();
const queue = new Map();
client.once('ready', () => {
console.log('Ready!');
});
client.once('reconnecting', () => {
console.log('Reconnecting!');
});
client.once('disconnect', () => {
console.log('Disconnect!');
});
client.on('message', async message => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const serverQueue = queue.get(message.guild.id);
if (message.content.startsWith(`${prefix}play`)) {
execute(message, serverQueue);
return;
} else if (message.content.startsWith(`${prefix}skip`)) {
skip(message, serverQueue);
return;
} else if (message.content.startsWith(`${prefix}stop`)) {
stop(message, serverQueue);
return;
} else {
message.channel.send('You need to enter a valid command!')
}
});
async function execute(message, serverQueue) {
const args = message.content.split(' ');
const voiceChannel = message.member.voiceChannel;
if (!voiceChannel) return message.channel.send('You need to be in a voice channel to play music!');
const permissions = voiceChannel.permissionsFor(message.client.user);
if (!permissions.has('CONNECT') || !permissions.has('SPEAK')) {
return message.channel.send('I need the permissions to join and speak in your voice channel!');
}
const songInfo = await ytdl.getInfo(args[1]);
const song = {
title: songInfo.title,
url: songInfo.video_url,
};
if (!serverQueue) {
const queueContruct = {
textChannel: message.channel,
voiceChannel: voiceChannel,
connection: null,
songs: [],
volume: 5,
playing: true,
};
queue.set(message.guild.id, queueContruct);
queueContruct.songs.push(song);
try {
var connection = await voiceChannel.join();
queueContruct.connection = connection;
play(message.guild, queueContruct.songs[0]);
} catch (err) {
console.log(err);
queue.delete(message.guild.id);
return message.channel.send(err);
}
} else {
serverQueue.songs.push(song);
console.log(serverQueue.songs);
return message.channel.send(`${song.title} has been added to the queue!`);
}
}
function skip(message, serverQueue) {
if (!message.member.voiceChannel) return message.channel.send('You have to be in a voice channel to stop the music!');
if (!serverQueue) return message.channel.send('There is no song that I could skip!');
serverQueue.connection.dispatcher.end();
}
function stop(message, serverQueue) {
if (!message.member.voiceChannel) return message.channel.send('You have to be in a voice channel to stop the music!');
serverQueue.songs = [];
serverQueue.connection.dispatcher.end();
}
function play(guild, song) {
const serverQueue = queue.get(guild.id);
if (!song) {
serverQueue.voiceChannel.leave();
queue.delete(guild.id);
return;
}
const dispatcher = serverQueue.connection.playStream(ytdl(song.url))
.on('end', () => {
console.log('Music ended!');
serverQueue.songs.shift();
play(guild, serverQueue.songs[0]);
})
.on('error', error => {
console.error(error);
});
dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
}
client.login(token);This is the error that appears after I attempt to ’ !play ’.
D:\Bot-Files-Test>node index.js
Ready!
Error: FFMPEG not found
at Function.selectFfmpegCommand (D:\Bot-Files-Test\node_modules\prism-media\src\transcoders\ffmpeg\Ffmpeg.js:46:13)
at new FfmpegTranscoder (D:\Bot-Files-Test\node_modules\prism-media\src\transcoders\ffmpeg\Ffmpeg.js:7:37)
at new MediaTranscoder (D:\Bot-Files-Test\node_modules\prism-media\src\transcoders\MediaTranscoder.js:10:19)
at new Prism (D:\Bot-Files-Test\node_modules\prism-media\src\Prism.js:5:23)
at new VoiceConnection (D:\Bot-Files-Test\node_modules\discord.js\src\client\voice\VoiceConnection.js:46:18)
at D:\Bot-Files-Test\node_modules\discord.js\src\client\voice\ClientVoiceManager.js:63:22
at new Promise (<anonymous>)
at ClientVoiceManager.joinChannel (D:\Bot-Files-Test\node_modules\discord.js\src\client\voice\ClientVoiceManager.js:45:12)
at VoiceChannel.join (D:\Bot-Files-Test\node_modules\discord.js\src\structures\VoiceChannel.js:130:30)
at execute (D:\Bot-Files-Test\index.js:75:40)
(node:9108) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at D:\Bot-Files-Test\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15
at D:\Bot-Files-Test\node_modules\snekfetch\src\index.js:215:21
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:9108) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:9108) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.</anonymous></anonymous> -
Dreamcast Operating Systems
16 septembre 2010, par Multimedia Mike — Sega DreamcastThe Sega Dreamcast was famously emblazoned with a logo proudly announcing that it was compatible with Windows CE :
It’s quite confusing. The console certainly doesn’t boot into some version of Windows to launch games. Apparently, there was a special version of CE developed for the DC and game companies had the option to leverage it. I do recall that some game startup screens would similarly advertise Windows CE.
Once the homebrew community got ahold of the device, the sky was the limit. I think NetBSD was the first alternative OS to support the Dreamcast. Meanwhile, I have recollections of DC Linux and LinuxDC projects along with more generic Linux-SH and SH-Linux projects.
DC Evolution hosts a disc image available for download with an unofficial version of DC Linux, assembled by one Adrian O’Grady. I figured out how to burn the disc (burning DC discs is a blog post of its own) and got it working in the console.
It’s possible to log in directly via the physical keyboard or through a serial terminal provided that you have a coder’s cable. That reminds me– my local Fry’s had a selection of USB-to-serial cables. I think this is another area that is sufficiently commoditized that just about any cable ought to work with Linux out of the box. Or maybe I’m just extrapolating from the experience of having the cheapest cable in the selection (made by io connect) plug and play with Linux.
Look ! No messy converter box in the middle as in the Belkin case. The reason I went with this cable is that the packaging claimed it was capable of up to 500 Kbits/sec. Most of the cables advertised a max of 115200 bps. I distinctly recall being able to use the DC coder’s cable at 230400 bps a long time ago. Alas, 115200 seems to be the speed limit, even with this new USB cable.
Anyway, the distribution is based on a 2.4.5 kernel circa 2001. I tried to make PPP work over the serial cable but the kernel doesn’t have support. If you’re interested, here is some basic information about the machine from Linux’s perspective, gleaned from some simple commands. This helps remind us of a simpler time when Linux was able to run comfortably on a computer with 16 MB of RAM.
Debian GNU/Linux testing/unstable dreamcast ttsc/1
dreamcast login : root
Linux dreamcast 2.4.5 #27 Thu May 31 07:06:51 JST 2001 sh4 unknownMost of the programs included with the Debian GNU/Linux system are
freely redistributable ; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyrightDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.dreamcast : # uname -a
Linux dreamcast 2.4.5 #27 Thu May 31 07:06:51 JST 2001 sh4 unknowndreamcast : # cat /proc/cpuinfo
cpu family : SH-4
cache size : 8K-byte/16K-byte
bogomips : 199.47Machine : dreamcast
CPU clock : 200.00MHz
Bus clock : 100.00MHz
Peripheral module clock : 50.00MHzdreamcast : # top -b
09:14:54 up 14 min, 1 user, load average : 0.04, 0.03, 0.03
15 processes : 14 sleeping, 1 running, 0 zombie, 0 stopped
CPU states : 1.1% user, 5.8% system, 0.0% nice, 93.1% idle
Mem : 14616K total, 11316K used, 3300K free, 2296K buffers
Swap : 0K total, 0K used, 0K free, 5556K cachedPID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
219 root 18 0 1072 1068 868 R 5.6 7.3 0:00 top
1 root 9 0 596 596 512 S 0.0 4.0 0:01 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 9 0 0 0 0 SW 0.0 0.0 0:00 kswapd
4 root 9 0 0 0 0 SW 0.0 0.0 0:00 kreclaimd
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 kupdated
7 root 9 0 0 0 0 SW 0.0 0.0 0:00 kmapled
39 root 9 0 900 900 668 S 0.0 6.1 0:00 devfsd
91 root 8 0 652 652 556 S 0.0 4.4 0:00 pump
96 daemon 9 0 524 524 420 S 0.0 3.5 0:00 portmap
149 root 9 0 944 944 796 S 0.0 6.4 0:00 syslogd
152 root 9 0 604 604 456 S 0.0 4.1 0:00 klogd
187 root 9 0 540 540 456 S 0.0 3.6 0:00 getty
201 root 9 0 1380 1376 1112 S 0.0 9.4 0:01 bashNote that at this point I had shutdown both gpm and inetd. The rest of the processes, save for bash, are default. The above stats only report about 14 MB of RAM ; where are the other 2 MB ?
dreamcast : # df -h Filesystem Size Used Avail Use% Mounted on /dev/rd/1 2.0M 560k 1.4M 28% /
-
FFmpeg record and stream
16 janvier 2019, par RobertI’m getting the following error.
E/FFmpeg: Exception while trying to run:
[/data/user/0/com.example.pathways.testipcam/files/ffmpeg, -y, -i,
rtsp://log:pass@IP:port/video.h264, -acodec, copy, -vcodec, copy, -t,
00:03:00,
content://com.example.android.fileprovider/external_files/Android/data/com.example.pathways.testipcam/files/Movies/IPcam_20190116_150628_6019720208966811003.m>kv]
java.io.IOException: Cannot run program "/data/user/0/com.example.pathways.testipcam/files/ffmpeg": error=2, No such >file or directoryOK I’m trying to learn how to record and stream my IP cam on android. I can stream the video in a surface view media player no problem so I then went to the record task. Now I’m a bit lost. I know this is possible as I have read people say they used this to do it.
I started with implamenting
implementation 'nl.bravobit:android-ffmpeg:1.1.5'
But I can’t figure out what I am missing or doing wrong as there aren’t really any tutorials explaining this completely. So hopefully this can be the thread everyone else finds for a solution. I have listed my code below. Exactly what have I got wrong here. It runs and goes to onStart...then right on onFailure.
DO I need to have 2 streams in order to view and watch ? or what the deal.
I know FFmpeg can do that.
"ffmpeg supports multiple outputs created out of the same input(s) in the same process. The usual way to accomplish this is :ffmpeg -i input1 -i input2 \
-acodec … -vcodec … output1 \
-acodec … -vcodec … output2 \"but I have no idea how to sue that.
Anyway, I know I’m kind of close, at least I hope I need a little help on getting over the finish line on this. What have I done wrong, how does this work.Here is what I did, I streamed the video as the app does. no problem
surfaceView = (SurfaceView) findViewById(R.id.videoView);
_surfaceHolder = surfaceView.getHolder();
_surfaceHolder.addCallback(this);
_surfaceHolder.setFixedSize(320, 240);
....
@Override
public void surfaceCreated(SurfaceHolder holder) {
mpPlayerRun();
}
public void mpPlayerRun(){
_mediaPlayer = new MediaPlayer();
_mediaPlayer.setDisplay(_surfaceHolder);
try {
// Specify the IP camera's URL and auth headers.
_mediaPlayer.setDataSource(RTSP_URL);
// Begin the process of setting up a video stream.
_mediaPlayer.setOnPreparedListener(this);
_mediaPlayer.prepareAsync();
}
catch (Exception e) {}
}
...
@Override
public void onPrepared(MediaPlayer mp) {
_mediaPlayer.start();
}OK, so then I created a button to record.
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.IPcamback:
break;
case R.id.IPcamrecord:
if (ContextCompat.checkSelfPermission(this,
Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
takeIPvid();
} else {
requestIPCamPermission();
}.....
requested permission then results.
private void requestIPCamPermission() {
if (ActivityCompat.shouldShowRequestPermissionRationale(this,
Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
new AlertDialog.Builder(this)
.setTitle("Permission needed")
.setMessage("This permission is needed do to android safety protocol")
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
ActivityCompat.requestPermissions(MainActivity.this,
new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, 420);
}
})
.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
})
.create().show();
} else {
ActivityCompat.requestPermissions(this,
new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, 420);
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
if (requestCode == 420) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
takeIPvid();
} else {
Toast.makeText(this, "Permission DENIED", Toast.LENGTH_SHORT).show();
}
.....then I made the file provider and createVideoOutputFile() method and the takeIPvid method.
private File createVideoOutputFile() throws IOException {
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "IPcam_" + timeStamp + "_";
IPstorageDir = getExternalFilesDir(Environment.DIRECTORY_MOVIES);
IPvideo_file = File.createTempFile(
imageFileName, /* prefix */
".mp4", /* suffix */
IPstorageDir /* directory */
);
// Save a file: path for use with ACTION_VIEW intents
String IPmVideoFilename = IPvideo_file.getAbsolutePath();
return IPvideo_file;
}
private void takeIPvid() {
File ipfile = null;
try {
ipfile = createVideoOutputFile();
} catch (IOException e) {
e.printStackTrace();
}
IPvideo_uri = FileProvider.getUriForFile(this,
"com.example.android.fileprovider",
ipfile);
String[] cmd = {"-y", "-i", "rtsp://Login:Passord@IP:port/video.h264", "-acodec", "copy", "-vcodec", "copy","-t","00:00:20", IPvideo_uri.toString() };
FFmpeg.getInstance(this).execute(cmd,new ExecuteBinaryResponseHandler(){
@Override
public void onStart() {
super.onStart();
}
@Override
public void onFailure(String message) {
super.onFailure(message);
}
@Override
public void onSuccess(String message) {
super.onSuccess(message);
}
@Override
public void onProgress(String message) {
super.onProgress(message);
}
@Override
public void onFinish() {
super.onFinish();
}
});
}