
Recherche avancée
Autres articles (20)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
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 (...)
Sur d’autres sites (3840)
-
ffplay 461 Unsupported transport
28 octobre 2017, par CeratoPlease help me to understand what I am doing wrong.
I am executing the following command for making a live stream
Executing: powershell gst-launch-1.0 filesrc location=D:/testVODs/sample.mkv ! matroskademux name=dmx dmx. ! h264parse config-interval=1 ! queue ! rtspclientsink profiles=avpf protocols=udp location="rtsp://192.168.1.1:8554/8c83bea4-b49b-4776-9c0f-d11e9e8898f0/1" name=rtsp_out dmx. ! opusparse ! queue ! rtsp_out.
and in the result, I see that the execution ended after 00:01:21 which means that the stream is ended successfully after my video ended :
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.1:8554/8c83bea4-b49b-4776-9c0f-d11e9e8898f0/1
Progress: (open) Retrieving server options
Progress: (open) Opened Stream
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending RECORD request
Progress: (record) Sending server stream info
Progress: (request) Sending RECORD request
Progress: (request) SETUP stream 1
Progress: (request) SETUP stream 0
Progress: (record) Starting recording
Got EOS from element "pipeline0".
Execution ended after 0:01:21.318315052
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...at the same time I am trying to play the stream using the following request :
Executing: powershell ffplay -rtsp_transport http "rtsp://192.168.1.1:8554/live/8c83bea4-b49b-4776-9c0f-d11e9e8898f0/1"
but I have the following response :
ffplay started on 2017-10-27 at 18:52:13
Report written to "D:/testVODs/Stream1to.log"
ffplay version 3.4 Copyright (c) 2003-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
[rtsp @ 000001930a05e500] method SETUP failed: 461 Unsupported transport
rtsp://192.168.1.1:8554/live/8c83bea4-b49b-4776-9c0f-d11e9e8898f0/1: Unknown errorwhy method SETUP failed as 461 Unsupported transport and how it can be solved ?
I tried to use different ffplay, ffmpeg commands, but all of them lead to the same result.
If I do not use rtsp_trasport command I have the error [udp @ 000001d1ab52c300] ’circular_buffer_size’ option was set but it is not supported on this build (pthread support is required)
and the same 461 Unsupported transportBefore I added "profiles=avpf" to my stream creation request I managed to play it successfully with "rtsp_transport tcp".
But now profiles=avpf is required and I need to understand how to deal with it -
FFmpeg library (ver 5.1) multithread decode and scaler
19 août 2022, par wolverinI wrote my own code that takes the video from v4l2 MJPEG and streams it to the rtsp server in H264.


Everything is fine as long as the incoming and outgoing stream resolution is 640x480, but if the incoming is 1920x1080 and I do sws_scale, then decoding and scaling are very slow.


If I run ffmpeg from the command line, I see swscale errors, which means that sws_getContext is called 20 times, which means a queue of 20 scaling threads is created


Input #0, video4linux2,v4l2, from '/dev/video0':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 640x480, 30 fps, 30 tbr, 1000k tbn
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x14b8160] [swscaler @ 0x14c18b0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14df9b0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14fd790] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x151b570] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x1539350] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14c18b0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14db1a0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14f8f80] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x1516d60] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x15396f0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x152d3d0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14c2060] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14dfe40] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14fdc20] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x151ba00] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x152d3d0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14c2060] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14dfe40] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x14fdc20] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x14b8160] [swscaler @ 0x151ba00] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x14a0950] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x14a0950] profile High 4:2:2, level 3.0, 4:2:2 8-bit
[libx264 @ 0x14a0950] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=cbr mbtree=0 bitrate=500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=500 vbv_bufsize=1000 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
Output #0, rtsp, to 'rtsp://localhost:554/cam':
 Metadata:
 encoder : Lavf59.25.100
 Stream #0:0: Video: h264, yuv422p(tv, bt470bg/unknown/unknown, progressive), 640x480, q=2-31, 500 kb/s, 30 fps, 90k tbn
 Metadata:
 encoder : Lavc59.33.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 500000/0/500000 buffer size: 1000000 vbv_delay: N/A



1. How to create a multithreading ffmpeg for sws_scale ?


2. Does internal multithreading work for mjpeg decoding, for example in AVCodecContext ? If not, what is the best way to create multithreading for decoding ?


-
How to make drawtext work in AWS Lambda ffmpeg ?
22 mars 2020, par codeulI have setup an AWS Lambda function to use ffmpeg using layer
https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:145266761615:applications~ffmpeg-lambda-layer
.Some ffmpeg commands work, but noticed when I use
drawtext
ordrawbox
, I am not getting a proper mp4 file. The output looks corrupted and is low in size. (FYI : The output file is/tmp/test2.mp4
and then I copy it to an S3 bucket.)Whats wrong here ? Would appreciate any help. Thanks.
ffmpeg command :
ffmpeg -f lavfi -i color=0x142d3d:s=1280*720:d=10 -vf "drawtext=fontcolor=white:fontsize=50:fontfile=aladin.ttf:text='test':y=10:x=10" -movflags +faststart -y /tmp/test2.mp4
From log :
o --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --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-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, lavfi, from 'color=0x142d3d:s=1280*720:d=10':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[Parsed_drawtext_0 @ 0x5852500] Using "/var/task/fonts/aladin.ttf"
[libx264 @ 0x5850080] using SAR=1/1
[libx264 @ 0x5850080] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x5850080] profile Progressive High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x5850080] 264 - core 157 r2969 d4099dd - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/tmp/test2.mp4':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc58.35.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 2 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 9 fps=7.5 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 17 fps=9.8 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 25 fps= 11 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 30 fps=7.4 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
=================