
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (50)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)
Sur d’autres sites (7304)
-
How to Manage User Uploaded Content and Storage
6 novembre 2014, par BenI’m building an app in PHP (Laravel 4 framework) where a teacher in their account can create a digital lesson for a student. Digital lessons can contain the following content :
- Text (text from form, .doc, .txt, .pdf, etc.)
- Images (.gif, .png, .jpg etc.)
- Video (.avi, .mov, .mp4, etc.)
- Audio (.mp3, etc.)
Raw text entered from forms can obviously be stored in the DB against the lesson_id. All the other content formats will need to be stored somewhere, where I can manage and read the files, as well as keep track of the teachers storage total as I plan to bill for storage thresholds at 5GB, 10GB etc.
On the create a lesson page, content files need to be uploaded as lesson attachments before the lesson is saved, so a teacher can visually see all the lessons content, and then hit save to create the lesson instantly.
Here’s what I’ve come up with :
-
Upload all lesson file attachments to AWS S3 to the teachers dedicated bucket, before the lesson is created. Add the teachers ID and date time to each filename.
-
Force all uploaded video / audio files to be converted to .mp4, .mp3, etc. if they are not in an iDevice friendly format or they exceed a file size limit. Use FFmpeg to do this.
-
When the lesson is saved and created, record the S3 file URL’s against the lesson ID in the DB.
-
If the lesson has not been created after a specific period of time, run a cron job to check for uploaded S3 files with no lesson and delete them.
I am unsure what is the best way to solve this problem as user uploaded content management is really new to me.
What do you think of this approach ? Can you recommend an improved or better way to solve this problem ?
-
fluent-ffmpeg Output stream closed, when using aws s3
30 décembre 2022, par Eivydas VickusCan someone help, when I run this code I am getting
Output stream closed
Erorr fromfluent-ffmpeg
. How you can see I am passing stream directly to aws s3 and that what is causing a problem I think. If I just usefs.createWriteStream('output.webm')
in thepipe
, then it work flawlessly, but I want to directly pass stream to aws s3

const passthroughs = new PassThrough();
 const data = videoOptions[3];
 ffmpeg(fs.createReadStream(pathToFile))
 .format('webm')
 .outputOptions([
 `-vf scale=${data.scale}`,
 `-b:v ${data.avgBitRate}`,
 `-minrate ${data.minBitRate}`,
 `-maxrate ${data.maxBitRate}`,
 `-tile-columns ${data.tileColumns}`,
 `-g ${data.g}`,
 `-threads ${data.threads}`,
 `-quality ${data.quality}`,
 `-crf ${data.crf}`,
 `-c:v ${data.videoCodec}`,
 `-c:a ${data.audioCodec}`,
 `-speed ${data.speed}`,
 `-y`,
 ])
 .pipe(passthroughs)
 .on('error', (err) => {
 console.log(err);
 })
 .on('data', (data) => {
 console.log({ data });
 })
 .on('progress', (progress) => {
 console.log(progress);
 })
 .on('end', async () => {
 console.log('Video conversion complete');
 });

 const upload = new Upload({
 client: this.s3BucketService.client,
 params: {
 Bucket: 'youtube-nest',
 Key: 'test.webm',
 Body: passthroughs,
 },
 });

 await upload.done();



-
FFMPEG on AWS Lambda works selectively
20 novembre 2020, par Arindam BaralI am using FFMpeg on AWS Lambda to convert mp4 files to m3u8 format.


Here's my code :


ENCODE_SIZE = {
 '360p': ('360:640', '1000000'),
 '540p': ('540:960', '2000000'),
 '720p': ('720:1280', '5000000')
}
@app.route('/encode', methods=['GET'])
@token_required
def encodeVideo(current_user):
 try:
 userEmail = current_user.emailID
 
 courseID = request.args.get('courseID')
 fileKey = request.args.get('fileKey')
 print ('Input file key received ', fileKey)
 convType = 'all'
 if 'convType' in request.args:
 convType = request.args.get('convType')
 print ('Conv Type::::', convType)
 instiID = Course.query.filter_by(id=courseID).first().instiID
 adminEmail = Institute.query.filter_by(id=instiID).first().adminEmail
 if adminEmail != userEmail:
 return jsonify({'message': 'Not authorized'}), 403
 
 bucket = app.config['S3_CONTENT_FOLDER']
 folder = '/'.join(fileKey.split('/')[:-1])
 
 os.system('cp /var/task/ffmpeg /tmp/; chmod 755 /tmp/ffmpeg;')
 FFMPEG_STATIC = '/tmp/ffmpeg' #"/opt/bin/ffmpeg" # 
 # FFMPEG_STATIC = 'ffmpeg' #"/opt/bin/ffmpeg" # 
 
 preSignURL = getPreSignedS3URL(fileKey, bucket)
 print (preSignURL)
 
 outputFlag = []
 
 # outFileName = 'final_out.m3u8'
 outFileName = '/tmp/final_out.m3u8'
 with open(outFileName, 'a') as outFile:
 outFile.write('#EXTM3U\n')
 
 if convType == 'all':
 for ver in ENCODE_SIZE:
 print ('Starting for ver ', ver)
 outFileNameM3 = '/tmp/%s_out.m3u8' %(ver) 
 # outFileNameM3 = '%s_out.m3u8' %(ver) 
 
 subprocess.call([FFMPEG_STATIC, '-i', preSignURL, '-c:a', 'aac', '-c:v', 'libx264', '-s', ENCODE_SIZE[ver][0], '-f', 'hls', '-hls_list_size', '0', '-hls_time', '10', outFileNameM3])
 
 outFile.write('#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=%s %s\n' %(
 ENCODE_SIZE[ver][1], outFileName
 ))
 # ret = os.system(commandStr)
 # outputFlag.append(ret)
 print ('Encoding completed for ver ', ver)
 else:
 ver = convType
 outFileNameM3 = '/tmp/%s_out.m3u8' %(ver) 
 # outFileNameM3 = '%s_out.m3u8' %(ver) 

 subprocess.call([FFMPEG_STATIC, '-i', preSignURL, '-c:a', 'aac', '-c:v', 'libx264', '-s', ENCODE_SIZE[ver][0], '-f', 'hls', '-hls_list_size', '0', '-hls_time', '10', outFileNameM3]) 
 
 outFile.write('#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=%s %s\n' %(
 ENCODE_SIZE[ver][1], outFileName
 ))
 # ret = os.system(commandStr)
 # outputFlag.append(ret)
 outFile.close()
 print ('File Key Generated')
 #Upload files to s3
 streamFiles = glob.glob('/tmp/*.ts')
 print (streamFiles)
 for fl in streamFiles:
 finFileName = fl.split('/')[-1]
 fileKeyName = folder + '/' + finFileName
 uploadFileToS3(fl, fileKeyName, app.config['S3_CONTENT_FOLDER'])
 # m3u8Files = glob.glob('/tmp/*.m3u8')
 # print (m3u8Files)
 # for fl in m3u8Files:
 # finFileName = fl.split('/')[-1]
 # fileKeyName = folder + '/' + finFileName
 # uploadFileToS3(fl, fileKeyName, app.config['S3_CONTENT_FOLDER'])
 # print ('S3 upload completed')
 
 # files = glob.glob('/tmp/*')
 # for f in files:
 # os.remove(f)
 return jsonify({'message': 'Completed file encoding'}), 201
 except:
 print (traceback.format_exc())
 return jsonify({'message': 'Error in encoding file'}), 504
if __name__ == '__main__':
 app.run(debug=True,host="0.0.0.0", port=5000)




When I request for "540p", the m3u8 file gets converted perfectly.
However, when I request for "360p" and "720p", I see only the first 1 second of the video.


Please note - All the tls files are generated in all the cases. The problem is only in creation of the m3u8 playlist file.


Can someone please help in this regard ?


EDIT 1 : I am quite new to FFMPEG. So any help here will be very welcome


The log files are present here :
https://drive.google.com/file/d/1QFgi-4jDIN3f6mWLoR999mlXzZ-Ij83R/view?usp=sharing