
Recherche avancée
Autres articles (46)
-
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (5244)
-
FFMPEG for aws s3 bucket signed url not working in node js
21 août 2018, par ahmed shariefI am trying to create thumbnails from an amazon s3 bucket signed url. I am able to generate thumbnails when i run the command in terminal
ffmpeg -ss 00:00:02 -i "https://test-s3-bucket.s3.ap-south-1.amazonaws.com/user_gallery_assets/5b6936069ac2bf0602085367/gallery/images/5b7be08527641dee8c1f8134.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxx%2F20180821%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20180821T095101Z&X-Amz-Expires=900&X-Amz-Signature=d7f81f4eed3d6c87c04dc1b0ad06beeb946afa33d417585f57fad72aeadb3ac0&X-Amz-SignedHeaders=host" -vframes 1 -q:v 2 -f image2 output.jpg
I am running the above command in terminal and its working fine but when i try to implement the same in node js its showing "no such file or directory error". Though i am encoding the url with double quotes then also its showign same error. Here is my node js code....
function uploadThumbNailForVideo(obj,url, thumb_url){
return new Promise((resolve, reject) => resolve(url))
.then((url) => awsHelper.getImage(url))
.then((result) => {
var resUrl = "\""+result+"\"";
var args = [
'-i', resUrl,
'-ss', '00:00:02',
'-vframes', '1',
'-f','image2',
'output.jpg'
]
//console.log(args)
var ffmpeg = require('child_process').spawn('ffmpeg', args);
ffmpeg.on('error', function (err) {
console.log(err);
});
ffmpeg.on('close', function (code) {
});
ffmpeg.stderr.on('data', function (data) {
var tData = data.toString('utf8');
var a = tData.split('\n');
console.log("A",a);
});
ffmpeg.stdout.on('data', function (data) {
//
});
});}
and i am getting the following error
A [ 'ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg
developers' ]
A [ '',
' built with Apple LLVM version 9.1.0 (clang-902.0.39.2)',
' configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-
shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --
enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-
gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
opencl --enable-videotoolbox --disable-lzma',
' libavutil 56. 14.100 / 56. 14.100',
' libavcodec 58. 18.100 / 58. 18.100',
' libavformat 58. 12.100 / 58. 12.100',
' libavdevice 58. 3.100 / 58. 3.100',
' libavfilter 7. 16.100 / 7. 16.100',
' libavresample 4. 0. 0 / 4. 0. 0',
' libswscale 5. 1.100 / 5. 1.100',
' libswresample 3. 1.100 / 3. 1.100',
' libpostproc 55. 1.100 / 55. 1.100',
'"https://test-s3-bucket.s3.ap-south-1.amazonaws.com/user_gallery_assets/5b6936069ac2bf0602085367/gallery/images/5b7be08527641dee8c1f8134.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxx%2F20180821%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20180821T095101Z&X-Amz-Expires=900&X-Amz-Signature=d7f81f4eed3d6c87c04dc1b0ad06beeb946afa33d417585f57fad72aeadb3ac0&X-Amz-SignedHeaders=host": No such file or directory',
'' ]
ffmpeg exited with code 1 -
How to generate video as fast as possible with subtitles and audio on node.js + ffmpeg ?
12 septembre 2018, par DSereginIntro :
We receive from the site some pieces of text
Pieces arrive to node.js-serverAt the output we need to get a video, merged from all the pieces of text, voiced by the machine voice, with the added subtitles and audio substrate. So that user could be share this video in the social networks. MKV format doesn`t supported by VK.com
The options that we have tried :
1. Get all the text at once, generate the entire speech, create a file with subtitles, burn subtitles in the video .mp4 (vk.com does not support the .mkv container). It took 12 seconds of operations for a 45-second video on the local computer.
2. Generate audio and video files for each piece of text (with added subtitles). It took one second for one piece of text. At the final request, we merge all pieces together. The last request (merging) took 2-3 seconds, which is already bearable.The second variant looks acceptable in terms of speed, but if you run 50 clients at the same time, then the computer (tested on a MacBook PRO 2013, 2.4 GHz i7, 8gb 1600 Mhz DDR3, SSD 256gb) processed only 1 piece from 1 client in 60 seconds (60 times slower), then the computer hung tight.
- Generation of audio is done through Amazon Polly
- Generate subtitles via https://github.com/gsantiago/subtitle.js#readme
- From node.js we call ffmpeg using https://github.com/fluent-ffmpeg/node-fluent-ffmpeg
- Resolution for video - 1280x720
The commands we used :
- Burn video subtitles and trim up to conditional 6 seconds (in the code send unix timestamp)
ffmpeg -i import / back.mov -i export_0 / tmp.srt -scodec mov_text -t 6 export_0 / output.mov
- Merging all audio
ffmpeg -i audio1.mp3 .... -i audio15.mp3 merged.mp3
- Overlay audio-substrate on the text
ffmpeg -i merged.mp3 -i back.mp3 -filter_complex amerge -ac 2-c: a libmp3lame -q: a 4 -shortest audio.mp3
- Merging all videos
ffmpeg -i video.txt -f concat -c copy video.mp4
- Overlay audio on video
ffmpeg -i audio.mp3 -i video.mp4 -i test.mp4 -i export / output.mp3 -c: v copy -c: a aac -map 0: v: 0 -map 1: a: 0 -shortest output .mp4
Questions that torment :
-
Is it faster ?
-
Can I use other codecs or methods of gluing without re-encoding ?
-
Try to call ffmpeg directly without a wrapper ? (in fact, it gives 50-100 ms of speed)
-
Try not to save to disk, and write data to Stream and have them glue together in the end ?
-
Muxing in audio to gstreamer RTMP stream kills both video and Audio
1er avril 2015, par AdamI need some genius help here - I’m trying to set up a live stream for my upcoming wedding... and I have it ALMOST working - audio seems to be the problem.
This is my setup
- Raspberry Pi Model B+
- Logitech C920 (with onboard h264 encoding that I am utilising)
- on-camera (C920) microphone
- USB wifi to iPhone 4G connection
- gstreamer1.0
- Amazon EC2 Wowza RTMP server
I have it all set up, but as soon as I mux in the audio, the streams wont play by any player.
What Works :
- my gstreamer pipeline WITHOUT the audio muxed in
- Wowza receives a consistent stream, no failures
- The various Flash players / iOS / Android and VLC all play back the videoWhat doesnt :
- enabling audio in the mux (using the pipeline below)
- BUT gstreamer doesnt complain
- BUT Wowza receives a consistent stream, no failures
- The various flash players fail to play both Audio and Video. some just display the first video frame
- VLC plays 1 video frame, and about 100ms of audio, then stopsIdeally I’d like the muxed audio/video FLV stored on the SD card too in case the network goes down - but if the ’tee’ needs to be sacrificed to make it work, so be it.
This is my current FAILING pipeline - I assume there’s something really stupid in it because I know practically nothing about gstreamer.... The first frame loads in all the players (except iOS.. which never shows anything)
# set camera resolution to 720p, and the data format to H264 (alternatives are YUV and JPG)
v4l2-ctl --device=/dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=1
# set the frame rate
v4l2-ctl --device=/dev/video0 --set-parm=10
gst-launch-1.0 -v -e uvch264src initial-bitrate=300000 average-bitrate=300000 device=/dev/video0 name=src auto-start=true src.vidsrc \
! queue \
! video/x-h264,width=1280,height=720,framerate=10/1 \
! h264parse \
! flvmux streamable=true name=mux \
! queue \
! tee name=t \
! queue \
! filesink location=/home/pi/wedding.flv t. \
! queue \
! rtmpsink location='rtmp://wowzaserver/live/wedding live=1' >>/home/pi/wedding.log 2>&1Some of the things I can’t really afford to change at this late stage are the encapsulation (FLV) and wowza RTMP because I’ve built everything around that...
Please Help !! Thanks !
UPDATE
Given that I am also saving the FLV file, I have found that if I use ffmpeg to send that FLV file (using audio copy, video copy) to the RTMP server, everything works (but obviously its not live) ! So I am now starting to believe this is a problem with the way Gstreamer encapsulates RTMP - and by putting ffmpeg in the middle it fixes it... but it’s not live of course.
Is it possible to pipe my output to ffmpeg and using ffmpeg’s RTMP ?