
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (46)
-
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 (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...)
Sur d’autres sites (6941)
-
No such file or directory Error with FFMPEG + CarrierWave screenshot method
10 juillet 2013, par dodgerogers747I am using AWS CORS to upload videos to my site, all of which works as planned.
I have the following model method which runs as an after_create callback (for speed) to take a screenshot from the video file on AWS. I plan to move this out into a delayed job but I don't think this will solve this particular issue. Please advise if mistaken.
I use FFMPEG to take a screenshot from the AWS self.file location, I then send the file to CarrierWave by saving the file to self.screenshot where it is uploaded to AWS.
Approx. 50% of the time it errors out with
Errno::ENOENT - No such file or directory
for the location of the screenshot image.How can I rectify my code to remove this error and how come it only occurs around 50% of the time ? If anyone needs more code just shout.
video.rb
after_create :take_screenshot
mount_uploader :screenshot, ImageUploader
def take_screenshot
location = "#{Rails.root}/public/uploads/tmp/screenshots/#{unique}_#{File.basename(file)}.jpg"
system `ffmpeg #{log_level} -i #{self.file} -ss 00:00:0#{time_frame} -vframes 1 #{location}`
logger.debug "Trying to take screenshot from #{self.file}"
#pass the actual file to CarrierWave to handle the image upload
self.screenshot = File.open(location)
self.save
logger.debug "Deleting tmp file: #{location}: #{File.delete(location)}" if self.screenshot.present?
end
def unique
(0..6).map{(65+rand(26)).chr}.join
end
def log_level
"-loglevel panic"
end
def time_frame
rand(0..3)
endStack trace :
Started POST "/videos" for 127.0.0.1 at 2013-07-10 03:58:49 +0800
Processing by VideosController#create as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"6M1Ia+Ag2E3HVKH2PO/p7jewxSpMPdWeVHGA933Bzjw=", "video"=>{"file"=>"http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v"}}
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 9 LIMIT 1
(0.1ms) BEGIN
SQL (0.2ms) INSERT INTO `videos` (`created_at`, `file`, `question_id`, `screenshot`, `updated_at`, `user_id`) VALUES ('2013-07-09 19:58:49', 'http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v', NULL, NULL, '2013-07-09 19:58:49', 9)
Trying to take screenshot from http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v
(0.8ms) ROLLBACK
Completed 500 Internal Server Error in 3550ms
Errno::ENOENT - No such file or directory - /Users/me/rails/project/public/uploads/tmp/screenshots/WCACLIC_Good_7iron.m4v.jpg:
app/models/video.rb:24:in `initialize'
app/models/video.rb:24:in `open'
app/models/video.rb:24:in `take_screenshot' -
No such file or directory Error with custom FFMPEG + CarrierWave method
10 juillet 2013, par dodgerogers747I am using AWS CORS to upload videos to my site, all of which works as planned.
I have the following model method which runs as an after_create callback (for speed) to take a screenshot from the video file on AWS. I plan to move this out into a delayed job but I don't think this will solve this particular issue. Please advise if mistaken.
I use FFMPEG to take a screenshot from the AWS self.file location, I then send the file to CarrierWave by saving the file to self.screenshot where it is uploaded to AWS.
Approx. 50% of the time it errors out with
Errno::ENOENT - No such file or directory
for the location of the screenshot image.How can I rectify my code to remove this error and how come it only occurs around 50% of the time ? If anyone needs more code just shout.
video.rb
after_create :take_screenshot
mount_uploader :screenshot, ImageUploader
def take_screenshot
location = "#{Rails.root}/public/uploads/tmp/screenshots/#{unique}_#{File.basename(file)}.jpg"
system `ffmpeg #{log_level} -i #{self.file} -ss 00:00:0#{time_frame} -vframes 1 #{location}`
logger.debug "Trying to take screenshot from #{self.file}"
#pass the actual file to CarrierWave to handle the image upload
self.screenshot = File.open(location)
self.save
logger.debug "Deleting tmp file: #{location}: #{File.delete(location)}" if self.screenshot.present?
end
def unique
(0..6).map{(65+rand(26)).chr}.join
end
def log_level
"-loglevel panic"
end
def time_frame
rand(0..3)
endStack trace :
Started POST "/videos" for 127.0.0.1 at 2013-07-10 03:58:49 +0800
Processing by VideosController#create as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"6M1Ia+Ag2E3HVKH2PO/p7jewxSpMPdWeVHGA933Bzjw=", "video"=>{"file"=>"http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v"}}
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 9 LIMIT 1
(0.1ms) BEGIN
SQL (0.2ms) INSERT INTO `videos` (`created_at`, `file`, `question_id`, `screenshot`, `updated_at`, `user_id`) VALUES ('2013-07-09 19:58:49', 'http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v', NULL, NULL, '2013-07-09 19:58:49', 9)
Trying to take screenshot from http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v
(0.8ms) ROLLBACK
Completed 500 Internal Server Error in 3550ms
Errno::ENOENT - No such file or directory - /Users/me/rails/project/public/uploads/tmp/screenshots/WCACLIC_Good_7iron.m4v.jpg:
app/models/video.rb:24:in `initialize'
app/models/video.rb:24:in `open'
app/models/video.rb:24:in `take_screenshot' -
I cannot play a mp3 file on Discord's voice channel using discord.py
1er décembre 2024, par ra1nedI am creating a discord bot that plays lofi for me. It does not play a song for me even though it shows a green indicator on a voice channel.


Here's what I've written :


if message.content == "!join":
 await message.author.voice.channel.connect()
 await message.channel.send("Successfully connected")

if message.content == "!play":
 if message.guild.voice_client is None: 
 await message.channel.send("use !join")
 return
 
 await message.channel.send("playing a song rn")
 print('*** playing a song rn')
 
 message.guild.voice_client.play(discord.FFmpegPCMAudio('lofi.mp3'))



I put
FFmpeg.exe
andlofi.mp3
in the same directory as this script.
Also, it is strange that FFmpeg does not return any exception nor output on console although it seems to have failed to load the file. I have seen people who had the same problem, but it seems like that they get some error messages, unlike me.

Here's the output on console after using !join


2024-12-01 16:59:39 INFO discord.voice_state Connecting to voice...
2024-12-01 16:59:39 INFO discord.voice_state Starting voice handshake... (connection attempt 1)
2024-12-01 16:59:40 INFO discord.voice_state Voice handshake complete. Endpoint found: japan8946.discord.media
2024-12-01 16:59:40 INFO discord.voice_state Voice connection complete.



after using !play, it only displays the message I wrote :


*** playing a song rn



Can someone help me with this ?