
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (9)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Les thèmes de MediaSpip
4 juin 20133 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
Thèmes MediaSPIP
3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...) -
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 (...)
Sur d’autres sites (2816)
-
FFmpeg Hardware Acceleration with NVENC produces Half Green output video
17 juin 2016, par Dan SandlandUsing the FFmpeg build found here : https://github.com/illuspas/ffmpeg-hw-win32
gcc 5.3.0
--enable-nvenc nvidia_video_sdk_6.0.1
--enable-libmfx Intel(R)_Media_SDK_2016.0.1
--enable-libfdk-aac 0.1.4
--enable-libspeex 1.2rc1
--enable-libx264 1:148.20150725
--enable-libopenh264 1.5.0
--enable-libx265 1.8
--enable-libopus 1.1.2
--enable-libmp3lame 3.99.5
--enable-libkvazaar 0.8.2./configure —prefix=/home/aliang/FFmpeg/x86_64 —enable-small —disable-debug —disable-doc —arch=x86_64 —cc=’ccache x86_64-w64-mingw32-gcc’ —cross-prefix=x86_64-w64-mingw32- —enable-cross-compile —target-os=mingw32 —enable-libfdk-aac —enable-libmp3lame —enable-libopus —enable-libspeex —enable-libx264 —enable-libx265 —enable-libmfx —enable-nvenc —enable-libopenh264 —enable-libkvazaar —enable-gpl —enable-nonfree
I’m running Windows on a MacBook Pro. I also tried with a more recent build and had the same output.
Input video is from sample-videos.com.
The ffmpeg command I am running is :
ffmpeg -y -i sample.mp4 -vcodec nvenc_h264 -pixel_format yuv420p -f mp4 sample-out-nvenc.mp4
sample-out-nvenc.mp4 looks like this via ffplay or vlc :
When I grab a frame using jpeg2, the colors appear normal, but the height is squished.
ffmpeg -y -ss 15.5 -i sample.mp4 -vframes 1 -s 480x300 -f image2 grab.jpg
The ffprobe results for the output (sample-out-nvenc.mp4) :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample-out-nvenc.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:00:31.02, start: 0.021333, bitrate: 1994 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv), 640x480 [SAR 1:1 DAR 4:3], 1650 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 342 kb/s (default)
Metadata:
handler_name : SoundHandlerLastly the output from the nvenc encoding command :
ffmpeg -y -i sample.mp4 -vcodec nvenc_h264 -pixel_format yuv420p -f mp4 sample-out-nvenc.mp4
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --prefix=/home/aliang/FFmpeg/x86_64 --enable-small --disable-debug --disable-doc --arch=x86_64 --cc='ccache x86_64-w64-mingw32-gcc' --cross-prefix=x86_64-w64-mingw32- --enable-cross-compile --target-os=mingw32 --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libx264 --enable-libx265 --enable-libmfx --enable-nvenc --enable-libopenh264 --enable-libkvazaar --enable-gpl --enable-nonfree
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.24.2
Duration: 00:00:31.00, start: 0.000000, bitrate: 1353 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 966 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
Output #0, mp4, to 'sample-out-nvenc.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Stream #0:0(und): Video: h264 (nvenc_h264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 2000 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
encoder : Lavc57.24.102 nvenc_h264
Side data:
unknown side data type 10 (24 bytes)
Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1, fltp, 341 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
encoder : Lavc57.24.102 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (nvenc_h264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 774 fps=253 q=-0.0 Lsize= 7551kB time=00:00:30.99 bitrate=1995.6kbits/s speed=10.1x
video:6236kB audio:1297kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.243011%
[aac @ 000001cdd9900520] Qavg: 743.457 -
unable to steam rtsp from mp4(h264) file using ffmpeg on os x : Connection refused Could not write header for output file
28 janvier 2023, par TalGim ussing the following command on my macbook os high sierra to stream rtsp from mp4 file using ffmpeg :


sudo ffmpeg -re -i ./Big_Buck_Bunny_1080_10s_1MB.mp4 -c:v libx264 -preset superfast -tune zerolatency -c:a aac -ar 44100 -f rtsp -rtsp_transport udp rtsp://127.0.0.1:8888/live



but get the following error :


[tcp @ 0x7fb979e22ec0] Connection to tcp://127.0.0.1:1935?timeout=0 failed: Connection refused
Could not write header for output file #0 (incorrect codec parameters ?): Connection refused
Error initializing output stream 0:0 -- 
Conversion failed!



here is the whole output of the command :


ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Big_Buck_Bunny_1080_10s_1MB.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 title : Big Buck Bunny, Sunflower version
 artist : Blender Foundation 2008, Janus Bager Kristensen 2013
 composer : Sacha Goedegebure
 encoder : Lavf57.63.100
 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
 genre : Animation
 Duration: 00:00:10.00, start: 0.000000, bitrate: 815 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 812 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7fb97a00de00] using SAR=1/1
[libx264 @ 0x7fb97a00de00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fb97a00de00] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x7fb97a00de00] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=12 sliced_threads=1 slices=12 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[tcp @ 0x7fb979e22ec0] Connection to tcp://127.0.0.1:1935?timeout=0 failed: Connection refused
Could not write header for output file #0 (incorrect codec parameters ?): Connection refused
Error initializing output stream 0:0 -- 
Conversion failed!



tried with and without sudo, tried changing rtsp ://... to http://
also tried udp but get same output..


chacked that the port is not in use(8888) and different ports (1935...) but still the same.


i installed ffmpeg via brew install...


when i run some test server on my localhost i never have issues ussing an unused port


really stuck here and any help would be amazing...thank you


EDIT :
Problem was in the command i used : "rtsp ://127.0.0.1:8888/live" - but i did not have a running server capable of accepting the data from ffmpeg and redestributing it - so i had to first run such server and only after that to run ffmpeg :


Servers which can receive from FFmpeg (to restream to multiple clients) include ffserver (linux only, though with cygwin it might work on windows), or Wowza Media Server, or Flash Media Server, Red5, or various others. Even VLC can pick up the stream from ffmpeg, then redistribute it, acting as a server.


i used the VLC option. You can read about it here : http://trac.ffmpeg.org/wiki/StreamingGuide


-
FFMPEG Error while processing the decoded data for stream #0:1
2 décembre 2020, par Michael Joseph AubryWhen using the FFMPEG command in my Lambda function I am getting this issue (version 4.2.1). When using it on my local machine it works fine (4.3.1).


Lambda Version Info


{
 data: 'ffmpeg version 4.2.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers\n' +
 'built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516\n' +
 'configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n' +
 'libavutil 56. 31.100 / 56. 31.100\n' +
 'libavcodec 58. 54.100 / 58. 54.100\n' +
 'libavformat 58. 29.100 / 58. 29.100\n' +
 'libavdevice 58. 8.100 / 58. 8.100\n' +
 'libavfilter 7. 57.100 / 7. 57.100\n' +
 'libswscale 5. 5.100 / 5. 5.100\n' +
 'libswresample 3. 5.100 / 3. 5.100\n' +
 'libpostproc 55. 5.100 / 55. 5.100\n'
}



Macbook Pro Version Info


{
 data: 'ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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- 
 librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable- 
 indev=jack
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100'
}



My goal with this command is to generate a thumbnail sprite sheet.


ffmpeg \
 -threads 8 \
 -ignore_editlist 1 \
 -i URL \
 -f image2 \
 -vf "select='not(mod(n,25))',setpts='N/(25*TB)',scale=180:180,tile=5x25" \ 
 -pix_fmt yuvj420p \
 -an \
 -qscale:v 28 \
 -vsync 0 \
 -preset veryfast \
 pipe:1



The same error occurs when I have a .jpg output on disk i.e
/tmp/test.jpg


This is the exact log from cloudwatch


{
 "errorType": "Error",
 "errorMessage": "ffmpeg exited with code 1: Error reinitializing filters!\nFailed to inject frame into filter network: Invalid argument\nError while processing the decoded data for stream #0:1\nConversion failed!\n",
 "stack": [
 "Error: ffmpeg exited with code 1: Error reinitializing filters!",
 "Failed to inject frame into filter network: Invalid argument",
 "Error while processing the decoded data for stream #0:1",
 "Conversion failed!",
 "",
 " at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:182:22)",
 " at ChildProcess.emit (events.js:314:20)",
 " at ChildProcess.EventEmitter.emit (domain.js:483:12)",
 " at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)"
 ]
}
</anonymous>


Here is the raw command using
fluent-ffmpeg
inside node.js

const passThrough = new stream.PassThrough();
 const fps = 25;
 const sWidth = 720 / 4;
 const sHeight = 1920 / 4;

 ffmpeg(s3Url)
 .setFfmpegPath("/opt/ffmpeg")
 .inputOptions([`-threads`, "8", "-ignore_editlist", "1"])
 .outputOptions([
 "-f",
 "image2",
 "-vf",
 `"select='not(mod(n,${fps}))',setpts='N/(${fps}*TB)',scale=${sWidth}:${sHeight},tile=5x25"`,
 "-pix_fmt",
 "yuvj420p",
 "-an",
 "-qscale:v",
 "28",
 "-vsync",
 "0",
 "-preset",
 "veryfast"
 ])
 .output(passThrough)
 .on("start", (cmdline) => console.log(cmdline))
 .on("progress", (progress) => {
 console.log(progress);
 })
 .on("error", (err) => {
 console.log(err);
 reject(err);
 })
 .run();



Additional log from cloudwatch


2020-12-02T18:42:55.023Z 2f334838-f748-4f2e-a639-15df0686ab4b INFO Error: ffmpeg exited with code 1: Error reinitializing filters!Failed to inject frame into filter network: Invalid argumentError while processing the decoded data for stream #0:1Conversion failed! at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:182:22) at ChildProcess.emit (events.js:314:20) at ChildProcess.EventEmitter.emit (domain.js:483:12) at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
</anonymous>