
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (5)
-
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 (...) -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (4094)
-
How exactly do I extract and merge a audio file using @ffmpeg/ffmpeg
5 octobre 2022, par jeff.gogoomaI have a lot of issues about audio transfer to server and frontend.


I am building a solution that is extracting and merging a file received from frontend.


I am using local ffmpeg file with node.js child_process package.


My Env :


framework : nest.js


runtime : node.js


lang : typescript


here is console.log(file : Express.Multer.File).
I am storing to S3 bucket these files. So I am not using multer's memory, disk storage.


// console.log(file);
 {
 fieldname: 'file',
 originalname: 'input1.mp3',
 encoding: '7bit',
 mimetype: 'audio/mpeg'
}



import cp from "child_process";

type Section = { from: number, to: number };

const files: Array = [];

export const setupAudioFileSection = async (file: Express.Multer.File, section: Section) => {
 try {
 const file1 = await cp.exec(`ffmpeg -i ${file} -y -ss 0 -t ${section.from}`);
 const file2 = await cp.exec(`ffmpeg -i ${file} -y -ss ${section.from} -t ${section.to}`);
 const file3 = await cp.exec(`ffmpeg -i ${file} -y -ss ${section.to}`);
 files.push(file1);
 files.push(file3);

 return file2;
 } catch (error) {
 console.log(error);
 throw new Error('setupAudioFileSection error');
 }



But, My Local ffmpeg is printing the error. because of [object Object]. I think local ffmpeg is not recognized the audio file received from client. So, I am resolving this issue by writing a file to disk or memory directly. but I am confusing this solution whether is right or not.


error Error: Command failed: ffmpeg -i [object Object] -y -ss 10 -t 20 -f mp3 ./TestOutput
ffmpeg version 5.1.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100

[object: No such file or directory




How can I write file on my server and read ? if that can be, I can resolve [object Object] of ffmpeg issue maybe. Please some answer or advise my issue. Thank you !


-
How to correctly use h264_amf on Windows ?
27 octobre 2022, par HarshivI'm trying to use hardware encoding with FFMPEG on Windows 10 with AMD Radeon r5 M330 DGPU on laptop : HP-AC026-TX. FFMPEG version is
5.1.2-full_build-www.gyan.dev
from gyan.dev. I'm using this :

fmpeg ^
 -hide_banner ^
 -v verbose ^
 -i "%1" ^
 -c:v h264_amf -acodec copy -y out.mp4



but it fails with :


[h264_amf @ 000001fb84d80b80] AMF initialisation succeeded via D3D11.
[h264_amf @ 000001fb847ab3c0] CreateComponent(AMFVideoEncoderVCE_AVC) failed with error 36
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height



The arguments seem as generic as I could hope, FFMPEG should use sensible defaults, so I can't Understand why it is failing.
Entire FFMPEG output is :


[h264 @ 000001fb84706c40] Reinit context to 1920x1088, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1366_pngl_20220816_161558.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2022-08-16T10:51:42.000000Z
 com.android.version: 11
 com.android.capture.fps: 30.000000
 Duration: 00:03:41.33, start: 0.000000, bitrate: 7517 kb/s
 Stream #0:0[0x1](eng): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709, progressive, left), 1920x1080 (1920x1088), 7259 kb/s, SAR 1:1 DAR 16:9, 29.96 fps, 29.99 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2022-08-16T10:51:42.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
 Metadata:
 creation_time : 2022-08-16T10:51:42.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_amf))
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264 @ 000001fb84787400] Reinit context to 1920x1088, pix_fmt: yuv420p
[graph 0 input from stream 0:0 @ 000001fb84cfd780] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:90000/3001 sar:1/1
[h264_amf @ 000001fb84d80b80] AMF initialisation succeeded via D3D11.
[h264_amf @ 000001fb847ab3c0] CreateComponent(AMFVideoEncoderVCE_AVC) failed with error 36
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 000001fb846f89c0] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 000001fb846f3f40] Statistics: 371902 bytes read, 3 seeks
Conversion failed!



What should I do to make hardware encoding work ?


-
shell script - youtube stream - ffmpeg [duplicate]
9 octobre 2022, par CodeMaker748Hey guys i found that script in web and try to get it to run. But i get some errors and wounder how this happens with this script maybe someone can help me to get this script running at ubuntu.


All Files are in the same directory.


#! /bin/bash
VBR="1500k"
FPS="24"
QUAL="superfast"

YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY="aaaa-aaaa-aaaa-aaaa-aaaa"

VIDEO_SOURCE= "./video.mp4"
AUDIO_SOURCE= "./audio.mp3" 
NP_SOURCE="./song.txt"
FONT="./ARIBL0.tff"

ffmpeg -re -f lavfi -i "movie=filename=$VIDEO_SOURCE:loop=0, setpts=N/(FRAME_RATE*TB)" -thread_queue_size 512 -i "$AUDIO_SOURCE" -map 0:v:0 -map 1:a:0 -map_metadata:g 1:g -vf drawtext="fontsize=20: fontfile=$FONT: box=0: boxcolor=black@0.5: boxborderw=20: textfile=$NP_SOURCE: reload=1: fontcolor=white@0.8: x=50: y=th" -vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR -acodec libmp3lame -ar 44100 -threads 6 -qscale:v 3 -b:a 320000 -bufsize 512k -f flv "$YOUTUBE_URL/$KEY"



and i get this errors :


root@v33476:~/LiveRadioScript2# bash startRadio.sh
startRadio.sh: line 9: ./video.mp4: Permission denied
startRadio.sh: line 10: ./audio.mp3: Permission denied
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
[Parsed_movie_0 @ 0x55d0e2286080] Failed to avformat_open_input ''
[lavfi @ 0x55d0e2284280] Error initializing filter 'movie' with args 'filename=:loop=0'
movie=filename=:loop=0, setpts=N/(FRAME_RATE*TB): No such file or directory