
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (89)
-
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...)
Sur d’autres sites (5557)
-
NodeJS fluent-ffmpeg + ytdl-core
22 décembre 2019, par hydr8I’m trying to write a very simple youtube converter/downloader in NodeJS.
So I wrote a srv.js File with Express to handle the whole Website stuff (Requests etc). In this file I also handle a post request on the url+’/download’ which receives the youtube url via a HTML form from the the main page. Within this POST handling I included a function from my api.js.
In the api.js in defined some functions I want to use during the whole process. One of them is responsible for converting a downloaded audio file from youtube. Almost everything is working fine except one thing.
As soon as the user submits the url and is directed to the mentioned ’/download’-site, he will see that the download is in progress and that he will be referred to the download asap. So far so good. The file will be downloaded and converted without any problems.
But as soon as the file is downloaded and converted the the user will not be redirected to a following site.
I tried already a lot of stuff with the ffmpeg events (end, saveToFile, save etc) but I can’t establish a working solution, that as soon as the file is completeley downloaded the user will be rteferred to the next website.
Maybe someone can give me a hint or some suggestion how to proceed.
srv.js :
........
// This is the Handler which calls the function from the api.js file
// After the execution of this process I need to load a new page
app.post('/download', function(req, res){
res.sendFile(path.join(__dirname + '/views/download.html'));
api.downloadConverter(req.body.url)
});
........api.js :
........
downloadConverter: function(url){
console.log("Downloading File from: " + url);
ffmpeg()
.input(ytdl(url), {
... options ....
})
.... some processing ....
.on('end', () => {
console.log("Download Done!");
})
.save('./files/file.mp4')
}
......I tried a lot with the events of the function in api.js. To return vaulues to the srv.js etc but nothings seems to work.
Edit
Of course I did already a lot of research on SO and other NodeJS related sites. But without any help. And I can’t provide tests of possible solutions of the last two days because I didn’t save them and I’m too lazy to retry every step I tried and provide codes with non-working solutions.
-
NodeJS + FFMPEG -sending response when FFMPEG is completed
2 février 2015, par eco_bachI have a working NodeJS+FFMPEG application. I am able to upload video files and have them converted on the server. I am using this NodeJS FFMPEG library
https://github.com/fluent-ffmpeg/node-fluent-ffmpegI get a message on the server when the job is complete, but how do I notify the client ?? In this case a simple AIR application. Right now I can only ’hear’ the initial response after a successful upload.
The initial video file was uploaded via a http POST request.
My primary node application without the dependencies is as follows
var ffmpeg = require('./lib/fluent-ffmpeg');
var express = require('express'),
multer = require('multer');
var app = express();
//auto save file to uploads folder
app.use(multer({ dest: './uploads/'}))
var temp;
app.post('/', function (req, res) {
console.log(req.body); //contains the variables
console.log("req.files ="+ req.files); //contains the file references
console.log("req.files.Filedata.path ="+ req.files.Filedata.path );
temp=req.files.Filedata.path;
// make sure you set the correct path to your video file
var proc = ffmpeg('./'+temp)
// set video bitrate
.videoBitrate(1024)
// set audio codec
.audioCodec('libmp3lame')
// set output format to force
.format('avi')
// setup event handlers
.on('end', function() {
console.log('file has been converted succesfully');
})
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
// save to file
.save('./converted/converted.avi');
res.send('Thank you for uploading!');
});
app.listen(8080); -
On-the-fly transcoding using derolf/transcoder
8 septembre 2015, par user1811678https://github.com/derolf/transcoder
I need to transcode locally and playback locally in my project, no other external connection to the server.
It is a good source of doing on the fly transcoding by ffmpeg.In my case i have to transcode it to mp4 as it could perform faster.
However i run into following problem, and i need some help in here to fix it.----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 34089)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 710, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 279, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipeHere is my code :
server.pyfrom flask import Flask, request, Response, abort, send_file, jsonify
import os, subprocess, re
import config
app = Flask(__name__)
@app.route('/media/.js')
def media_content_js(path):
d= os.path.abspath( os.path.join( config.media_folder, path ) )
print d
if not os.path.isfile( d ): abort(404)
cmdline= list()
cmdline.append( config.ffmpeg )
cmdline.append( "-i" )
cmdline.append( d );
print cmdline
duration= -1
FNULL = open(os.devnull, 'w')
proc= subprocess.Popen( cmdline, stderr=subprocess.PIPE, stdout=FNULL )
try:
for line in iter(proc.stderr.readline,''):
line= line.rstrip()
#Duration: 00:00:45.13, start: 0.000000, bitrate: 302 kb/s
m = re.search('Duration: (..):(..):(..)\...', line)
if m is not None: duration= int(m.group(1)) * 3600 + int(m.group(2)) * 60 + int(m.group(3)) + 1
finally:
proc.kill()
return jsonify(duration=duration)
@app.route('/media/.mp4')
def media_content_ogv(path):
d= os.path.abspath( os.path.join( config.media_folder, path ) )
print d
if not os.path.isfile( d ): abort(404)
start= request.args.get("start") or 0
print start
def generate():
cmdline= list()
cmdline.append( config.ffmpeg )
cmdline.append( "-i" )
cmdline.append( d );
cmdline.append( "-ss" )
cmdline.append( str(start) );
cmdline.extend( config.ffmpeg_args )
print cmdline
FNULL = open(os.devnull, 'w')
proc= subprocess.Popen( cmdline, stdout=subprocess.PIPE, stderr=FNULL )
try:
f= proc.stdout
byte = f.read(512)
while byte:
yield byte
byte = f.read(512)
finally:
proc.kill()
return Response(response=generate(),status=200,mimetype='video/mp4',headers={'Access-Control-Allow-Origin': '*', "Content-Type":"video/mp4","Content-Disposition":"inline","Content-Transfer-Enconding":"binary"})
@app.route('/', defaults={"path":"index.html"})
@app.route('/')
def static_content(path):
d= os.path.abspath( os.path.join( config.static_folder, path ) )
if not os.path.isfile( d ): abort(404)
return send_file( d )
app.run( host="0.0.0.0",port=config.port, threaded=True, debug=True )config.py
media_folder= "media"
static_folder= "static"
port= 8123
ffmpeg= "/usr/bin/ffmpeg"
ffmpeg_args= [ "-f", "avi" ,"-acodec", "libfdk_aac", "-b:a", "128k", "-vcodec", "libx264", "-b:v", "1200k" , "-flags" , "+aic+mv4", "pipe:1"]index.html
<code class="echappe-js"><script src="http://vjs.zencdn.net/4.5/video.js"></script><script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script><br />
var video= videojs('video');<br />
video.src("media/testavi.avi.mp4");<br />
<br />
// hack duration<br />
video.duration= function() { return video.theDuration; };<br />
video.start= 0;<br />
video.oldCurrentTime= video.currentTime;<br />
video.currentTime= function(time) <br />
{ <br />
if( time == undefined )<br />
{<br />
return video.oldCurrentTime() + video.start;<br />
}<br />
console.log(time)<br />
video.start= time;<br />
video.oldCurrentTime(0);<br />
video.src("media/testavi.avi.mp4?start=" + time);<br />
video.play();<br />
return this;<br />
};<br />
<br />
$.getJSON( "media/testavi.avi.js", function( data ) <br />
{<br />
video.theDuration= data.duration;<br />
});<br />
</script>