
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (96)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (10866)
-
What is Multi-Touch Attribution ? (And How To Get Started)
2 février 2023, par Erin — Analytics Tips -
Use FFMPEG as a demuxer-muxer when knowing all needed information about input stream
7 février 2023, par Javierd98I'm working on a project where I need to use FFMEPG only as a demuxer-muxer in order to receive a MPEG source with an audio and video streams and output the different streams separately. I also need it to introduce the smallest possible delay.
In order to do this, I have all the needed information about the input : used container, audio and video codecs, audio and video rate and audio channels, so I would like to provide FFMPEG with that information and avoid the proving phase. However, I can't get FFMPEG to work without specifying a big probesize, which introduces latency, and, depending on the input, causes FFMPEG to fail due to not being able to get the needed info (which I have beforehand).


I've been researching the different options that FFMPEG provides, and I've found the following ones which could help me :


- 

-codec:a
and-codec:v
to provide the information about the input's audio and video codecs.-f
to provide the information about the used container.-r:v
to provide the information about the video framerate. (I've also tried with-framerate
, but it seems that is only supported by a few demuxers, and mpeg is not one of them).-probesize
to avoid spending time probing the input, as I can provide the inpromation.-copy_unknown
to simply copy the streams instead of failing if it can't be recognized.












With all this, I'm using the following command :

./ffmpeg -hide_banner -loglevel debug -codec:v h264 -codec:a pcm_alaw -flags low_delay -probesize 32 -analyzeduration 0 -r:v 15 -f mpeg -i udp://127.0.0.1:41071?listen -y -map 0:a:0? -acodec copy -copy_unknown -ar 8000 -payload_type 8 -f rtp udp://127.0.0.1:33605?pkt_size=1200 -map 0:v:0? -vcodec copy -copy_unknown -payload_type 96 -f rtp udp://127.0.0.1:48527?pkt_size=1200


Splitting the commandline.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-codec:v' ... matched as option 'codec' (codec name) with argument 'h264'.
Reading option '-codec:a' ... matched as option 'codec' (codec name) with argument 'pcm_alaw'.
Reading option '-flags' ... matched as AVOption 'flags' with argument 'low_delay'.
Reading option '-probesize' ... matched as AVOption 'probesize' with argument '32'.
Reading option '-analyzeduration' ... matched as AVOption 'analyzeduration' with argument '0'.
Reading option '-r:v' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '15'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mpeg'.
Reading option '-i' ... matched as input url with argument 'udp://127.0.0.1:41071?listen'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a:0?'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-copy_unknown' ... matched as option 'copy_unknown' (Copy unknown stream types) with argument '1'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '8000'.
Reading option '-payload_type' ... matched as AVOption 'payload_type' with argument '8'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'rtp'.
Reading option 'udp://127.0.0.1:33605?pkt_size=1200' ... matched as output url.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v:0?'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-copy_unknown' ... matched as option 'copy_unknown' (Copy unknown stream types) with argument '1'.
Reading option '-payload_type' ... matched as AVOption 'payload_type' with argument '96'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'rtp'.
Reading option 'udp://127.0.0.1:48527?pkt_size=1200' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option hide_banner (do not show program banner) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Applying option copy_unknown (Copy unknown stream types) with argument 1.
 Last message repeated 1 times
Successfully parsed a group of options.
Parsing a group of options: input url udp://127.0.0.1:41071?listen.
Applying option codec:v (codec name) with argument h264.
Applying option codec:a (codec name) with argument pcm_alaw.
Applying option r:v (set frame rate (Hz value, fraction or abbreviation)) with argument 15.
Applying option f (force format) with argument mpeg.
Successfully parsed a group of options.
Opening an input file: udp://127.0.0.1:41071?listen.
[mpeg @ 0x55a769cc3d40] Opening 'udp://127.0.0.1:41071?listen' for reading
[udp @ 0x55a769cc4b00] No default whitelist set
[udp @ 0x55a769cc4b00] end receive buffer size reported is 425984
[mpeg @ 0x55a769cc3d40] Before avformat_find_stream_info() pos: 6 bytes read:40 seeks:0 nb_streams:0
[mpeg @ 0x55a769cc3d40] probing stream 1 pp:2500
[mpeg @ 0x55a769cc3d40] probed stream 1
[mpeg @ 0x55a769cc3d40] parser not found for codec pcm_alaw, packets or times may be invalid.
[mpeg @ 0x55a769cc3d40] Probe buffer size limit of 32 bytes reached
[mpeg @ 0x55a769cc3d40] Stream #0: not enough frames to estimate rate; consider increasing probesize
[mpeg @ 0x55a769cc3d40] Could not find codec parameters for stream 0 (Video: h264, 1 reference frame, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (32) options
[mpeg @ 0x55a769cc3d40] After avformat_find_stream_info() pos: 87804 bytes read:88476 seeks:0 frames:1
Input #0, mpeg, from 'udp://127.0.0.1:41071?listen':
 Duration: N/A, start: 50436.772978, bitrate: 64 kb/s
 Stream #0:0[0x1e0], 0, 1/90000: Video: h264, 1 reference frame, none, 90k tbr, 90k tbn
 Stream #0:1[0x1c0], 1, 1/90000: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Successfully opened the file.
Parsing a group of options: output url udp://127.0.0.1:33605?pkt_size=1200.
Applying option map (set input stream mapping) with argument 0:a:0?.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
Applying option ar (set audio sampling rate (in Hz)) with argument 8000.
Applying option f (force format) with argument rtp.
Successfully parsed a group of options.
Opening an output file: udp://127.0.0.1:33605?pkt_size=1200.
[udp @ 0x55a769cf6500] No default whitelist set
Successfully opened the file.
Parsing a group of options: output url udp://127.0.0.1:48527?pkt_size=1200.
Applying option map (set input stream mapping) with argument 0:v:0?.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Applying option f (force format) with argument rtp.
Successfully parsed a group of options.
Opening an output file: udp://127.0.0.1:48527?pkt_size=1200.
[udp @ 0x55a769d08fc0] No default whitelist set
Successfully opened the file.
Output #0, rtp, to 'udp://127.0.0.1:33605?pkt_size=1200':
 Metadata:
 encoder : Lavf59.16.100
 Stream #0:0, 0, 1/8000: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
[rtp @ 0x55a769d06f40] dimensions not set
Could not write header for output file #1 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 1:0 -- 
Stream mapping:
 Stream #0:1 -> #0:0 (copy)
 Stream #0:0 -> #1:0 (copy)
 Last message repeated 1 times
[AVIOContext @ 0x55a769d06d40] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0x55a769d19800] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0x55a769cd4fc0] Statistics: 88476 bytes read, 0 seeks



I'm using FFMPEG 5.0.2, which is a fairly updated version.


As you can see, the
-copy_unknown
option is having no effect, as FFMPEG still crashes when trying to recognize the input (I've also tried specifying it on the input, but the result is the same). From the logs, I think the main problem is that FFMPEG is not interpreting the framerate correctly, which prevents it from demuxing the video. I've been searching for another way to specify it, but couldn't find it.

Is this a bug ? Or maybe 'm missing something ? Does somebody know how could I achieve my goal ?


-
ffmpeg could not find codec parameters for stream 0 on Ubuntu 22.04, works fine on Ubuntu 18.04
22 février 2023, par ngmI'm new to ffmpeg but I've got an odd issue which seems to arise from using it on different Ubuntu versions.


I have an NVIDIA Jetson Nano running Ubuntu 18.04.5 LTS (GNU/Linux 4.9.201-tegra aarch64). Plugged into the Nano's carrier board is an embedded camera that shows up as a
Sunplus Innovation Technology Inc. USB2.0 Camera RGB
when I runlsusb
.

When I run this ffmpeg command, I can successfully record video from the camera, which seems to be
mjpeg
codec withyuvj422p
pixel format. The output is as follows :

ffmpeg -f video4linux2 -i /dev/video0 -an -vcodec libx264 test_capture.mp4
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
 configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 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
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Input #0, video4linux2,v4l2, from '/dev/video0':
 Duration: N/A, start: 166.142773, bitrate: N/A
 Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 928x400, 100 fps, 100 tbr, 1000k tbn, 1000k tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x558553df70] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x558553df70] profile High 4:2:2, level 3.2, 4:2:2 8-bit
[libx264 @ 0x558553df70] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=6 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 'test_capture.mp4':
 Metadata:
 encoder : Lavf57.83.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj422p(pc), 928x400, q=-1--1, 100 fps, 12800 tbn, 100 tbc
 Metadata:
 encoder : Lavc57.107.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 192 fps= 65 q=-1.0 Lsize= 151kB time=00:00:01.89 bitrate= 654.4kbits/s dup=150 drop=0 speed=0.642x 
video:148kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.072495%
[libx264 @ 0x558553df70] frame I:1 Avg QP:23.62 size: 36953
[libx264 @ 0x558553df70] frame P:49 Avg QP:25.25 size: 2121
[libx264 @ 0x558553df70] frame B:142 Avg QP:30.55 size: 70
[libx264 @ 0x558553df70] consecutive B-frames: 1.0% 1.0% 0.0% 97.9%
[libx264 @ 0x558553df70] mb I I16..4: 10.1% 78.8% 11.1%
[libx264 @ 0x558553df70] mb P I16..4: 1.1% 1.9% 0.0% P16..4: 19.1% 3.0% 2.0% 0.0% 0.0% skip:72.8%
[libx264 @ 0x558553df70] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 2.7% 0.0% 0.0% direct: 0.1% skip:97.2% L0:36.8% L1:62.3% BI: 0.9%
[libx264 @ 0x558553df70] 8x8 transform intra:68.4% inter:77.4%
[libx264 @ 0x558553df70] coded y,uvDC,uvAC intra: 42.0% 80.2% 41.3% inter: 2.2% 5.4% 0.2%
[libx264 @ 0x558553df70] i16 v,h,dc,p: 50% 17% 10% 23%
[libx264 @ 0x558553df70] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 9% 32% 5% 7% 7% 5% 8% 5%
[libx264 @ 0x558553df70] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 15% 12% 5% 14% 11% 8% 5% 7%
[libx264 @ 0x558553df70] i8c dc,h,v,p: 50% 12% 26% 12%
[libx264 @ 0x558553df70] Weighted P-Frames: Y:28.6% UV:28.6%
[libx264 @ 0x558553df70] ref P L0: 56.4% 28.2% 12.0% 2.5% 0.9%
[libx264 @ 0x558553df70] ref B L0: 93.4% 5.3% 1.3%
[libx264 @ 0x558553df70] ref B L1: 94.9% 5.1%
[libx264 @ 0x558553df70] kb/s:628.21
Exiting normally, received signal 2.



However, I'd like to replace this Nano with another that I've upgraded to Ubuntu 22.04.1 LTS (GNU/Linux 4.9.299-tegra aarch64). The device still shows up as the same type when running
lsusb
. Running the exact same command results in the following :

ffmpeg -f video4linux2 -i /dev/video0 -an -vcodec libx264 test_capture.mp4
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --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-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
[video4linux2,v4l2 @ 0x55cab86450] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown), 1856x800): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, video4linux2,v4l2, from '/dev/video0':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 1856x800, 60 fps, 60 tbr, 1000k tbn, 1000k tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Exiting normally, received signal 2.



I'm not sure why I can't read this video stream when everything seems to be the same but the OS and the ffmpeg version.


I've checked the available codecs and pixel formats using
ffmpeg -codecs
andffmpeg -pix_fmts
:

Ubuntu 18.04.5, ffmpeg version 3.4.8-0ubuntu0.2 :


DEVIL. mjpeg Motion JPEG (encoders: mjpeg mjpeg_vaapi )


IO... yuvj422p 3 16


Ubuntu 22.04.1, ffmpeg version 4.4.2-0ubuntu0.22.04.1 :


DEVIL. mjpeg Motion JPEG (decoders: mjpeg mjpeg_cuvid ) (encoders: mjpeg mjpeg_vaapi )


IO... yuvj422p 3 16


So it seems like I should be able to record video on both with this codec/pixel format combination.


I've also tried forcing ffmpeg to use this combination on the 22.04 Nano with the following command :


ffmpeg -f v4l2 -input_format mjpeg -framerate 100 -video_size 928x400 -pix_fmt yuvj422p -i /dev/video0 -an -vcodec libx264 test_capture.mp4


But I get the same error. I've also tried increasing the
-analyzeduration
and-probesize
arguments to 100M, with no luck.

Are there other commands or settings I should use ? Should I downgrade my ffmpeg version if possible ?