
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (40)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (7368)
-
Using ffmpeg to convert the audio of an RTSP stream to PCM alaw and hosting an RTSP stream as the output
24 octobre 2020, par SirisianI have an RTSP stream on my network that is H264 for video and aac for audio. I need the audio converted to PCM alaw with the video just passed through.


I tried :


ffmpeg -rtsp_transport udp -i rtsp://10.0.0.10/main -vcodec copy -acodec pcm_alaw -rtsp_flags listen -f rtsp rtsp://localhost:8001/main



The output I get is :


ffmpeg version 4.3.1-2020-10-01-essentials_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 10.2.0 (Rev3, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 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
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
[rtsp @ 0000025ebdf1db00] Interleaved RTP mode is not supported yet.
Input #0, rtsp, from 'rtsp://10.0.0.10/main':
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc
 Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (aac (native) -> pcm_alaw (native))
Press [q] to stop, [?] for help



It's running, but it's not listening on port 8001. I've tried both UDP and TCP, so I think I am misunderstanding what "-rtsp_flags listen" does for ffmpeg ? My goal is to start an "RTSP server" locally and allow say VLC or any other player to connect and play it. Is this something ffmpeg can do or do I need to send the stream to something else to allow VLC or other media players to connect to it locally ? (The hardware I'm running isn't terribly fast, so I'd like to do this with the least amount of operations possible).


For reference if I run :


ffplay -rtsp_flags listen rtsp://localhost:8001/main



Then run :


ffmpeg -rtsp_transport udp -i rtsp://10.0.0.10/main -vcodec copy -acodec pcm_alaw -f rtsp rtsp://localhost:8001/main



It plays fine in the ffplay application. So it's like the "-rtsp_flags listen" only works with the input portion of ffplay and ffmpeg.


-
How to properly wrap H264 into FLV with FFMPEG ?
9 août 2017, par mOflFirst of all, the "properly" in the title refers to this related question, of which answer does not solve my problem.
tl ;dr : There is a difference between encoding a video and directly storing it into FLV and doing this in two separate steps. I need to do it separately, how do I get the same result as doing it directly ?
Nvidia’s hardware encoder NVENC produces raw H.264 data without a container, which is difficult to play in most video players. For an Adobe AIR application, I need to wrap the video into the FLV format, for which I wanted to use FFMPEG :
ffmpeg -f h264 -i "input.h264" -c copy -f flv "output.flv"
This did not work as expected, because the first frame of each video treated this way is simply not shown. Each video is only displayed from the second frame, which is a shame for single-frame videos (using the GPU’s hardware encoder for lightning-fast image compression only).
For inspection, I now reencode the input video twice : once directly to FLV output
ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f flv "A.flv"
and once to H.264, then shoving it into an FLV afterwards.
ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f h264 "reencode.h264"
ffmpeg -f h264 -i "reencode.h264" -c copy -f flv "B.flv"The first video plays fine, the second does not. The resulting FLV of the direct approach (A.flv, see below) has a slightly different file structure, especially the NAL unit differs, which I suspect is the reason for the different behavior.
So, my question is : If I already have a H.264 video and only want it to be copied into an FLV container without being transcoded, but the file and frame headers should be filled in correctly as is done when actually transcoding, how do I tell this to FFMPEG ? Are there commands for this, such as "-c copy butGenerateValidHeader" ?
Here the relevant portions of the files :
Direct approach
ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f flv "A.flv"
A.flv
46 4C 56 01 01 00 00 00 09 00 00 00 00 12 00 00 // FLV header + metadata
B8 00 00 00 00 00 00 00 02 00 0A 6F 6E 4D 65 74
61 44 61 74 61 08 00 00 00 08 00 08 64 75 72 61
74 69 6F 6E 00 3F A0 E5 60 41 89 37 4C 00 05 77
69 64 74 68 00 40 93 80 00 00 00 00 00 00 06 68
65 69 67 68 74 00 40 8E F0 00 00 00 00 00 00 0D
76 69 64 65 6F 64 61 74 61 72 61 74 65 00 40 9E
84 80 00 00 00 00 00 09 66 72 61 6D 65 72 61 74
65 00 40 3E 00 00 00 00 00 00 00 0C 76 69 64 65
6F 63 6F 64 65 63 69 64 00 40 1C 00 00 00 00 00
00 00 07 65 6E 63 6F 64 65 72 02 00 0D 4C 61 76
66 35 37 2E 37 31 2E 31 30 30 00 08 66 69 6C 65
73 69 7A 65 00 40 F9 5C B0 00 00 00 00 00 00 09
00 00 00 C3 09 00 00 2B 00 00 00 00 00 00 00 17 // AVC sequence start
00 00 00 00
01 4D 40 20 FF E1 00 17 // ?
67 4D 40 20 // Sequence parameter set
95 A0 13 81 F7 EB 01 10 00 00 3E 80 00 0E A6 08
F1 C3 2A
01 00 04 // ?
68 EE 3C 80 // Picture parameter set
00 00 00 36 09 01 // AVC NALU
94 9A 00 00 00 00 00 00 00 17 01 00 00 00
00 01 // ?
94 91
65 // IDR frame
[B8 04 1D FF ...]
00 01 94 A5 09 00 00 05 00 00 00 00 00 00 00 // ?
17 // AVC sequence end
02 00 00 00 00 00 00 10Encoding first
ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f h264 "reencode.h264"
reencode.h264
00 00 00 01 67 4D 40 20 95 A0 13 81 F7 EB 01 10 // Sequence parameter set
00 00 3E 80 00 0E A6 08 F1 C3 2A
00 00 00 01 68 // Picture parameter set
EE 3C 80
00 00 00 01 65 // IDR frame
[B8 04 1D FF ...] // Frame dataSqueeze into container
ffmpeg -f h264 -i "reencode.h264" -c copy -f flv "B.flv"
B.flv
46 4C 56 01 01 00 00 00 09 00 00 00 00 12 00 00 // FLV header + metadata
A4 00 00 00 00 00 00 00 02 00 0A 6F 6E 4D 65 74
61 44 61 74 61 08 00 00 00 07 00 08 64 75 72 61
74 69 6F 6E 00 3F A4 7A E1 47 AE 14 7B 00 05 77
69 64 74 68 00 40 93 80 00 00 00 00 00 00 06 68
65 69 67 68 74 00 40 8E F0 00 00 00 00 00 00 0D
76 69 64 65 6F 64 61 74 61 72 61 74 65 00 00 00
00 00 00 00 00 00 00 0C 76 69 64 65 6F 63 6F 64
65 63 69 64 00 40 1C 00 00 00 00 00 00 00 07 65
6E 63 6F 64 65 72 02 00 0D 4C 61 76 66 35 37 2E
37 31 2E 31 30 30 00 08 66 69 6C 65 73 69 7A 65
00 40 F9 5B 40 00 00 00 00 00 00 09
00 00 00 AF // AVC sequence start
09 00 00 05 00 00 00 00 00 00 00 17 00 00 00 00
00 00 00 10 09 01 94 BD 00 00 00 00 00 00 00 17 // AVC NALU
01 00 00
00 00 00 00 01 67 4D 40 20 95 A0 13 81 // Sequence parameter set
F7 EB 01 10 00 00 3E 80 00 0E A6 08 F1 C3 2A
00 // Picture parameter set
00 00 01 68 EE 3C 80
00 00 00 01 65 // IDR frame
[B8 04 1D FF // Frame data
...]
00 01 94 C8 09 00 00 05 00 00 00 00 00 00 00 // ?
17 // AVC sequence end
02 00 00 00 00 00 00 10Update 08.08.2017 : Added input and output files for examination
- input.h264
- ffmpeg -f h264 -i "input.h264" -c copy "copy.flv"
- ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f flv "A.flv"
- ffmpeg -f h264 -i "input.h264" -c:v h264_nvenc -f h264 "reencode.h264"
- ffmpeg -f h264 -i "reencode.h264" -c copy -f flv "B.flv"
- ffmpeg -f h264 -i "reencode.h264" -c copy -bsf:v extract_extradata -f flv "extradata.flv"
-
The Ultimate Guide to HeatMap Software