
Recherche avancée
Autres articles (57)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (6760)
-
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();
}
});
} -
My discord music bot works locally, but not on a server [closed]
8 décembre 2022, par AsmondyaI have an issue with my discord music bot that I made with discord.js v14.


When I run it locally, it works fine and plays music as it should. But when I put in on a server (here I use Vultr), it doesn't work.


I am not sure but it might come from FFmpeg. I am kinda desperate and cant really figure where the issue is from. I think it is FFmpeg because it is what converts the music.


What happens :


Me: !play a music
Bot: Now playing a music
*and right after, without playing the music*
Bot: Music finished



What should normally happen is that same thing but the "music finished" should be sent when the queue is finished.


The thing is that the bot works perfectly locally, but does this when it is hosted on a server. Also I don't have any error messages or else. It just doesn't play the music like if the music was 0 seconds length.


I tried making sure everything is installed on the server, same as making sure ffmpeg was installed globally and I have the good version of it. Here is the answer I have to the "ffmpeg -version" command :enter image description here.


Does anyone know what could be the issue or what could cause it ? I can show some code if needed, even tho it works perfectly fine locally.


Here's my code :


const { DisTube } = require('distube')
const Discord = require('discord.js')
const { EmbedBuilder } = require('discord.js')
const client = new Discord.Client({
 intents: [
 Discord.GatewayIntentBits.Guilds,
 Discord.GatewayIntentBits.GuildMessages,
 Discord.GatewayIntentBits.GuildVoiceStates,
 Discord.GatewayIntentBits.MessageContent,
 ]
})
const { ActivityType } = require('discord.js')
const fs = require('fs')
const dotenv = require("dotenv")
dotenv.config()
const { SpotifyPlugin } = require('@distube/spotify')
const { SoundCloudPlugin } = require('@distube/soundcloud')
const { YtDlpPlugin } = require('@distube/yt-dlp')

client.distube = new DisTube(client, {
 leaveOnStop: false,
 emitNewSongOnly: true,
 emitAddSongWhenCreatingQueue: false,
 emitAddListWhenCreatingQueue: false,
 plugins: [
 new SpotifyPlugin({
 emitEventsAfterFetching: true
 }),
 new SoundCloudPlugin(),
 new YtDlpPlugin()
 ]
})
client.commands = new Discord.Collection()
client.aliases = new Discord.Collection()

fs.readdir('./commands/', (err, files) => {
 if (err) return console.log('Could not find any commands!')
 const jsFiles = files.filter(f => f.split('.').pop() === 'js')
 if (jsFiles.length <= 0) return console.log('Could not find any commands!')
 jsFiles.forEach(file => {
 const cmd = require(`./commands/${file}`)
 console.log(`Loaded ${file}`)
 client.commands.set(cmd.name, cmd)
 if (cmd.aliases) cmd.aliases.forEach(alias => client.aliases.set(alias, cmd.name))
 })
})

client.on('ready', () => {
 console.log(`${client.user.tag} is ready to play music.`)
})

client.on('messageCreate', async message => {
 if (message.author.bot || !message.guild) return
 const prefix = "!"
 if (!message.content.startsWith(prefix)) return
 const args = message.content.slice(prefix.length).trim().split(/ +/g)
 const command = args.shift().toLowerCase()
 const cmd = client.commands.get(command) || client.commands.get(client.aliases.get(command))
 if (!cmd) return
 if (cmd.inVoiceChannel && !message.member.voice.channel) {
 return message.channel.send(`You must be in a voice channel!`)
 }
 try {
 cmd.run(client, message, args)
 } catch (e) {
 console.error(e)
 message.channel.send(`Error: \`${e}\``)
 }
})

// Add filters to the queue status :
// | Filter: \`${queue.filters.names.join(', ') || 'Off'}\` 

const status = queue =>
 `Volume: \`${queue.volume}%\` | Loop: \`${
 queue.repeatMode ? (queue.repeatMode === 2 ? 'All Queue' : 'This Song') : 'Off'
 }\` | Autoplay: \`${queue.autoplay ? 'On' : 'Off'}\``
client.distube
 .on('playSong', (queue, song) =>
 queue.textChannel.send({
 embeds: [
 new Discord.EmbedBuilder()
 .setTitle('Now playing')
 .setDescription(`\`${song.name}\` - \`${song.formattedDuration}\`\n${status(queue)}\n\nRequested by: \`${song.user.tag}\``)
 .setThumbnail(`${song.thumbnail}`)
 ]
 })
 )
 .on('addSong', (queue, song) =>
 queue.textChannel.send({
 embeds: [
 new Discord.EmbedBuilder()
 .setTitle('Song added to the queue')
 .setDescription(`${song.name} - \`${song.formattedDuration}\`\n\nRequested by: \`${song.user.tag}\``)
 .setThumbnail(`${song.thumbnail}`)
 ]
 })
 )
 .on('addList', (queue, playlist) =>
 queue.textChannel.send({
 embeds: [
 new Discord.EmbedBuilder()
 .setTitle(`Playlist added to the queue`)
 .setDescription(`\`${playlist.name}\` (${
 playlist.songs.length
 } songs)\n${status(queue)}\n\nRequested by: \`${song.user.tag}\``)
 .setThumbnail(`${song.thumbnail}`)
 ]
 })
 )
 .on('error', (channel, e) => {
 if (channel) channel.send(`An error encountered: ${e.toString().slice(0, 1974)}`)
 else console.error(e)
 })
 .on('empty', channel => channel.send('There is no one here. Im alone, again...'))
 .on('searchNoResult', (message, query) =>
 message.channel.send(`No result found for \`${query}\`!`)
 )
 .on('finish', queue => queue.textChannel.send("https://tenor.com/view/end-thats-all-folks-gif-10601784"))

client.on("ready", () => {
 client.user.setPresence({
 activities: [{
 name: 'AURORA',
 type: ActivityType.Listening
 }],
 status: "idle"
 })
})

client.login(process.env.TOKEN)



It does come from my ffpmeg, I need to install one of these packages instead of the npm installation : https://github.com/BtbN/FFmpeg-Builds/releases


How do I install it on a server (Vultr) ?