
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (92)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (4684)
-
Flask send_file not sending file
30 avril 2021, par jackmerrillI'm using Flask with
send_file()
to have people download a file off the server.


My current code is as follows :



@app.route('/', methods=["GET", "POST"])
def index():
 if request.method == "POST":
 link = request.form.get('Link')
 with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 info_dict = ydl.extract_info(link, download=False)
 video_url = info_dict.get("url", None)
 video_id = info_dict.get("id", None)
 video_title = info_dict.get('title', None)
 ydl.download([link])
 print("sending file...")
 send_file("dl/"+video_title+".f137.mp4", as_attachment=True)
 print("file sent, deleting...")
 os.remove("dl/"+video_title+".f137.mp4")
 print("done.")
 return render_template("index.html", message="Success!")
 else:
 return render_template("index.html", message=message)




The only reason I have
.f137.mp4
added is because I am using AWS C9 to be my online IDE and I can't install FFMPEG to combine the audio and video on Amazon Linux. However, that is not the issue. The issue is that it is not sending the download request.


Here is the console output :



127.0.0.1 - - [12/Dec/2018 16:17:41] "POST / HTTP/1.1" 200 -
[youtube] 2AYgi2wsdkE: Downloading webpage
[youtube] 2AYgi2wsdkE: Downloading video info webpage
[youtube] 2AYgi2wsdkE: Downloading webpage
[youtube] 2AYgi2wsdkE: Downloading video info webpage
WARNING: You have requested multiple formats but ffmpeg or avconv are not installed. The formats won't be merged.
[download] Destination: dl/Meme Awards v244.f137.mp4
[download] 100% of 73.82MiB in 00:02
[download] Destination: dl/Meme Awards v244.f140.m4a
[download] 100% of 11.63MiB in 00:00
sending file...
file sent, deleting...
done.
127.0.0.1 - - [12/Dec/2018 16:18:03] "POST / HTTP/1.1" 200 -




Any and all help is appreciated. Thanks !


-
ffmpeg not working with filenames that have whitespace
18 mai 2021, par cmwI'm using FFMPEG to measure the duration of videos stored in an Amazon S3 Bucket.


I've read the FFMPEG docs, and they explicitly state that all whitespace and special characters need to be escaped, in order for FFMPEG to handle them properly :


See docs 2.1 and 2.1.1 : https://ffmpeg.org/ffmpeg-utils.html


However, when dealing with files whose filenames contain whitespace, ffmpeg fails to render a result.


I've tried the following, with no success


ffmpeg -i "http://s3.mybucketname.com/videos/my\ video\ file.mov" 2>&1 | grep Duration | awk '{print $2}' | tr -d
ffmpeg -i "http://s3.mybucketname.com/videos/my video file.mov" 2>&1 | grep Duration | awk '{print $2}' | tr -d
ffmpeg -i "http://s3.mybucketname.com/videos/my'\' video'\' file.mov" 2>&1 | grep Duration | awk '{print $2}' | tr -d
ffmpeg -i "http://s3.mybucketname.com/videos/my\ video\ file.mov" 2>&1 | grep Duration | awk '{print $2}' | tr -d



However, if I strip out the whitespace in the filename – all is well, and the duration of the video is returned.


-
"Invalid or unexpected token" error when trying to execute ffmpeg build on lambda
4 janvier 2019, par almarcI have a node.js script that uses ffmpeg to convert mp4 downloaded from YT to mp3 and save to Amazon S3. Uploading using the serverless framework. The "ffmpeg" file is included in the main directory (with .yml), downloaded from here :
https://johnvansickle.com/ffmpeg/
The code :
'use strict'
process.env.PATH = process.env.PATH + ':/tmp/'
process.env['FFMPEG_PATH'] = '/tmp/ffmpeg';
const BIN_PATH = process.env['LAMBDA_TASK_ROOT']
process.env['PATH'] = process.env['PATH'] + ':' + BIN_PATH;
module.exports.download_mp3 = function (event, context, callback)
{
require('child_process').exec('cp /var/task/ffmpeg /tmp/.; chmod 755
/tmp/ffmpeg;', function (error, stdout, stderr) {
if (error)
{
console.log('An error occured', error);
callback(null, null)
}
else
{
var ffmpeg = require('ffmpeg');
const aws = require('aws-sdk')
const s3 = new aws.S3()
const ytdl = require('ytdl-core');
function uploadFromStream(s3) {
const stream = require('stream')
var pass = new stream.PassThrough();
var params = {Bucket: "some-bucket", Key: "some-key", Body: pass};
s3.upload(params, function(err, data) {
console.log(err, data);
});
console.log("Should be finished")
callback(null)
}
let stream = ytdl("some-video-id", {
quality: 'highestaudio',
filter: 'audioonly'
});
ffmpeg(stream)
.audioBitrate(128)
.format('mp3')
.on('error', (err) => console.error(err))
.pipe(uploadFromStream(s3), {
end: true
});
}})
}When triggered, the function writes an error in logs :
2019-01-04T14:50:54.525Z 21da4d49-1030-11e9-b901-0dc32b691a16
/var/task/ffmpeg:1
(function (exports, require, module, __filename, __dirname) { ELF
^
SyntaxError: Invalid or unexpected token
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at /var/task/download.js:17:18It’s, most definetely, an error in the "ffmpeg" file I’ve mentioned above (link provided). But I don’t know what’s the exact issue, I followed the first answer here :
https://stackoverflow.com/questions/47882810/lambda-not-connecting-to-ffmpeg
to include the ffmpeg build.