
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (31)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (4942)
-
ffmpeg slideshow video from images creating empty mp4
27 novembre 2017, par greenthumbtackI’m trying to use
ffmpeg
to create an.mp4
from a set of.JPG
files. This is theffmpeg
line I’m using :ffmpeg -framerate 1/5 -i image-%03d.JPG output.mp4
which returns :
ffmpeg version 2.8.4 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[mjpeg @ 04ee8ca0] Changeing bps to 8
Input #0, image2, from 'image-%03d.JPG':
Duration: 00:01:05.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 4608x3072, 0.20 tbr, 0.20 tbn, 0.20 tbc
File 'output.mp4' already exists. Overwrite ? [y/N] y
No pixel format specified, yuvj422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 04ef4a40] frame MB size (288x192) > level limit (36864)
[libx264 @ 04ef4a40] DPB size (4 frames, 221184 mbs) > level limit (3 frames, 184320 mbs)
[libx264 @ 04ef4a40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 04ef4a40] profile High 4:2:2, level 5.2, 4:2:2 8-bit
[libx264 @ 04ef4a40] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=1 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 'output.mp4':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj422p(pc), 4608x3072, q=-1--1, 0.20 fps, 16384 tbn, 0.20 tbc
Metadata:
encoder : Lavc56.60.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 13 fps=0.9 q=-1.0 Lsize= 18249kB time=00:00:55.00 bitrate=2718.2kbits/s
video:18249kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.005057%
[libx264 @ 04ef4a40] frame I:1 Avg QP:13.94 size:1564617
[libx264 @ 04ef4a40] frame P:12 Avg QP:13.68 size:1426766
[libx264 @ 04ef4a40] mb I I16..4: 2.6% 79.2% 18.2%
[libx264 @ 04ef4a40] mb P I16..4: 2.2% 82.9% 14.6% P16..4: 0.1% 0.0% 0.0% 0.0% 0.0% skip: 0.2%
[libx264 @ 04ef4a40] 8x8 transform intra:82.9% inter:79.9%
[libx264 @ 04ef4a40] coded y,uvDC,uvAC intra: 95.0% 80.5% 67.2% inter: 33.6% 27.6% 11.4%
[libx264 @ 04ef4a40] i16 v,h,dc,p: 16% 9% 5% 69%
[libx264 @ 04ef4a40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 20% 24% 6% 8% 6% 8% 6% 10%
[libx264 @ 04ef4a40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 22% 10% 8% 11% 8% 11% 6% 9%
[libx264 @ 04ef4a40] i8c dc,h,v,p: 52% 20% 20% 7%
[libx264 @ 04ef4a40] Weighted P-Frames: Y:8.3% UV:8.3%
[libx264 @ 04ef4a40] ref P L0: 64.6% 9.0% 11.8% 5.8% 8.8%
[libx264 @ 04ef4a40] kb/s:2299.79and a
output.mp4
. When I run this file, it ends immediately without showing any images. I don’t see any errors or problems in the code, so I’m not sure what I’m doing wrong. Do I need to increase the video framerate or something else ? -
FFmpeg : avconv and ffserver - connection reset by peer
5 mars 2016, par einsAI’m trying to stream a video via ffserver. My dev environment is a Raspberry Pi 2.
I’m getting an
av_interleaved_write_frame(): Connection reset by peer
with the following approach :pi@raspberrypi:/opt/livefeed $ avconv -f mjpeg -i movie.mjpg -r 20 -b 2000k -vcodec libx264 -preset ultrafast -f flv -metadata streamName="mjpeg_to_flv" -metadata title="converting mjpeg to flv via avconv" http://localhost:8090/feed1.ffm
avconv version 11.4-6:11.4-1~deb8u1+rpi1, Copyright (c) 2000-2014 the Libav developers
built on Jun 16 2015 05:32:34 with gcc 4.9.2 (Raspbian 4.9.2-10)
[mjpeg @ 0x20461e0] Estimating duration from bitrate, this may be inaccurate
Input #0, mjpeg, from 'movie.mjpg':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj422p, 768x512, 25 fps, 25 tbn
[tcp @ 0x2050bc0] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
[libx264 @ 0x20501a0] using cpu capabilities: none!
[libx264 @ 0x20501a0] profile Constrained Baseline, level 3.0
[libx264 @ 0x20501a0] 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=20 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, flv, to 'http://localhost:8090/feed1.ffm':
Metadata:
streamName : mjpeg_to_flv
title : converting mjpeg to flv via avconv
encoder : Lavf56.1.0
Stream #0.0: Video: libx264, yuv420p, 768x512, q=-1--1, 2000 kb/s, 20 fps, 1k tbn, 20 tbc
Metadata:
encoder : Lavc56.1.0 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press ctrl-c to stop encoding
av_interleaved_write_frame(): Connection reset by peer0000.00 bitrate= 0.0kbits/s
I am able to stream the file doing it step by step with the following settings and commands :
ffserver
ffserver config :
pi@raspberrypi:/opt/livefeed $ cat ffserver_flv.conf
# FLV live feed
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
<stream>
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</stream>
<feed>
File /tmp/feed_flv.ffm
FileMaxSize 1G
ACL allow 127.0.0.1
</feed>
<stream>
Format flv
Feed feed1.ffm
VideoCodec libx264
VideoFrameRate 30
VideoBitRate 800
VideoSize 720x576
AVOptionVideo crf 23
AVOptionVideo preset medium
AVOptionVideo me_range 16
AVOptionVideo qdiff 4
AVOptionVideo qmin 10
AVOptionVideo qmax 51
AVOptionVideo flags +global_header
NoAudio
</stream>starting the server with :
pi@raspberrypi:/opt/livefeed $ ffserver -v debug -f ffserver_flv.conf
ffserver version N-78909-gfb2f164 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfaac --enable-libmp3lame --enable-libfreetype
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 27.101 / 57. 27.101
libavformat 57. 28.100 / 57. 28.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 39.100 / 6. 39.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
ffserver_flv.conf:6: Port option is deprecated. Use HTTPPort instead.
ffserver_flv.conf:7: BindAddress option is deprecated. Use HTTPBindAddress instead.
ffserver_flv.conf:48: Setting default value for video bit rate tolerance = 200000. Use NoDefaults to disable it.
ffserver_flv.conf:48: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it.
ffserver_flv.conf:48: Setting default value for video max rate = 49537952. Use NoDefaults to disable it.
ffserver_flv.conf:48: Setting default value for video buffer size = 1600000. Use NoDefaults to disable it.
Sat Mar 5 13:29:46 2016 [file @ 0x2f3d0d0]Setting default whitelist 'file'
Sat Mar 5 13:29:46 2016 [ffm @ 0x2f40bc0]Format ffm probed with size=2048 and score=101
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'time_base' to value '1/30'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'b' to value '800000'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'video_size' to value '720x576'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'me_range' to value '16'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'qdiff' to value '4'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'qmin' to value '10'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'qmax' to value '51'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'flags' to value '+global_header'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'bt' to value '200000'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'rc_eq' to value 'tex^qComp'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'maxrate' to value '1600000'
Sat Mar 5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'bufsize' to value '1600000'
Sat Mar 5 13:29:46 2016 [AVIOContext @ 0x2f41450]Statistics: 32768 bytes read, 0 seeks
Sat Mar 5 13:29:46 2016 FFserver started.avconv
I’m converting a
mjpeg
movie (movie.mjpeg
) viaavconv
to flv (movie.flv
) :pi@raspberrypi:/opt/livefeed $ avconv -f mjpeg -i movie.mjpg -r 20 -b 2000k -vcodec libx264 -preset ultrafast -f flv -metadata streamName="mjpeg_to_flv" -metadata title="converting mjpeg to flv via avconv" movie.flv
avconv version 11.4-6:11.4-1~deb8u1+rpi1, Copyright (c) 2000-2014 the Libav developers
built on Jun 16 2015 05:32:34 with gcc 4.9.2 (Raspbian 4.9.2-10)
[mjpeg @ 0x34f1e0] Estimating duration from bitrate, this may be inaccurate
Input #0, mjpeg, from 'movie.mjpg':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj422p, 768x512, 25 fps, 25 tbn
[libx264 @ 0x3591a0] using cpu capabilities: none!
[libx264 @ 0x3591a0] profile Constrained Baseline, level 3.0
[libx264 @ 0x3591a0] 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=20 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, flv, to 'movie.flv':
Metadata:
streamName : mjpeg_to_flv
title : converting mjpeg to flv via avconv
encoder : Lavf56.1.0
Stream #0.0: Video: libx264, yuv420p, 768x512, q=-1--1, 2000 kb/s, 20 fps, 1k tbn, 20 tbc
Metadata:
encoder : Lavc56.1.0 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press ctrl-c to stop encoding
frame= 93 fps= 9 q=-1.0 Lsize= 1078kB time=4.60 bitrate=1919.3kbits/s ts/s
video:1076kB audio:0kB other streams:0kB global headers:0kB muxing overhead: 0.201471%
[libx264 @ 0x3591a0] frame I:1 Avg QP:19.00 size: 35978
[libx264 @ 0x3591a0] frame P:92 Avg QP:21.43 size: 11574
[libx264 @ 0x3591a0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x3591a0] mb P I16..4: 25.9% 0.0% 0.0% P16..4: 53.6% 0.0% 0.0% 0.0% 0.0% skip:20.5%
[libx264 @ 0x3591a0] final ratefactor: 20.82
[libx264 @ 0x3591a0] coded y,uvDC,uvAC intra: 28.9% 46.9% 18.2% inter: 33.7% 39.8% 2.8%
[libx264 @ 0x3591a0] i16 v,h,dc,p: 29% 30% 28% 14%
[libx264 @ 0x3591a0] i8c dc,h,v,p: 53% 26% 15% 7%
[libx264 @ 0x3591a0] kb/s:1893.82send flv to ffserver
pi@raspberrypi:/opt/livefeed $ ffmpeg -stream_loop -1 -i movie.flv http://localhost:8090/feed1.ffm
ffmpeg version N-78909-gfb2f164 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfaac --enable-libmp3lame --enable-libfreetype
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 27.101 / 57. 27.101
libavformat 57. 28.100 / 57. 28.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 39.100 / 6. 39.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, flv, from 'movie.flv':
Metadata:
streamName : mjpeg_to_flv
title : converting mjpeg to flv via avconv
encoder : Lavf56.1.0
Duration: 00:00:04.65, start: 0.000000, bitrate: 1898 kb/s
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 768x512, 2000 kb/s, 20 fps, 20 tbr, 1k tbn, 40 tbc
[tcp @ 0x30d2920] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
[tcp @ 0x329a080] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
[libx264 @ 0x325fb30] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x325fb30] profile High, level 3.1
[libx264 @ 0x325fb30] 264 - core 148 r2665 a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=10 qpmax=51 qpstep=4 vbv_maxrate=1600 vbv_bufsize=1600 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
Metadata:
streamName : mjpeg_to_flv
title : converting mjpeg to flv via avconv
creation_time : now
encoder : Lavf57.28.100
Stream #0:0: Video: h264 (libx264), yuv420p, 720x576, q=10-51, 800 kb/s, 20 fps, 1000k tbn, 30 tbc
Metadata:
encoder : Lavc57.27.101 libx264
Side data:
cpb: bitrate max/min/avg: 1600000/0/800000 buffer size: 1600000 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Past duration 0.999992 too large
Last message repeated 2 times
Past duration 0.999992 too large 4kB time=00:00:00.00 bitrate=N/A dup=5 drop=0 speed= 0x
Last message repeated 3 times
Past duration 0.999992 too large 4kB time=00:00:00.00 bitrate=N/A dup=9 drop=0 speed=
[croped]
video:968kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.719636%
[libx264 @ 0x325fb30] frame I:11 Avg QP:22.49 size: 13888
[libx264 @ 0x325fb30] frame P:487 Avg QP:16.10 size: 1382
[libx264 @ 0x325fb30] frame B:980 Avg QP:21.31 size: 168
[libx264 @ 0x325fb30] consecutive B-frames: 11.0% 1.8% 0.4% 86.9%
[libx264 @ 0x325fb30] mb I I16..4: 11.5% 81.2% 7.3%
[libx264 @ 0x325fb30] mb P I16..4: 1.6% 5.0% 0.2% P16..4: 12.0% 1.6% 0.7% 0.0% 0.0% skip:79.0%
[libx264 @ 0x325fb30] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 5.8% 0.1% 0.0% direct: 0.0% skip:94.1% L0:55.3% L1:44.4% BI: 0.3%
[libx264 @ 0x325fb30] 8x8 transform intra:75.4% inter:88.7%
[libx264 @ 0x325fb30] coded y,uvDC,uvAC intra: 38.6% 48.2% 14.9% inter: 1.5% 2.3% 0.0%
[libx264 @ 0x325fb30] i16 v,h,dc,p: 28% 32% 11% 28%
[libx264 @ 0x325fb30] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 21% 31% 3% 4% 4% 4% 4% 4%
[libx264 @ 0x325fb30] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 25% 23% 4% 7% 5% 7% 4% 3%
[libx264 @ 0x325fb30] i8c dc,h,v,p: 63% 20% 14% 4%
[libx264 @ 0x325fb30] Weighted P-Frames: Y:1.6% UV:1.2%
[libx264 @ 0x325fb30] ref P L0: 67.5% 11.6% 13.8% 6.8% 0.3%
[libx264 @ 0x325fb30] ref B L0: 58.7% 40.4% 0.9%
[libx264 @ 0x325fb30] ref B L1: 96.2% 3.8%
[libx264 @ 0x325fb30] kb/s:160.83
Exiting normally, received signal 2.On another machine I can open the flv-stream via VLC by opening the address
http://ip.running.ffserver:8090/live.flv
.So why does it works step by step via the movie.flv file and not directly ?
What is the difference between
-
avconv -f mjpeg -i movie.mjpg -r 20 -b 2000k -vcodec libx264 -preset ultrafast -f flv -metadata streamName="mjpeg_to_flv" -metadata title="converting mjpeg to flv via avconv" movie.flv
followed by
ffmpeg -stream_loop -1 -i movie.flv http://localhost:8090/feed1.ffm
and -
avconv -f mjpeg -i movie.mjpg -r 20 -b 2000k -vcodec libx264 -preset ultrafast -f flv -metadata streamName="mjpeg_to_flv" -metadata title="converting mjpeg to flv via avconv" http://localhost:8090/feed1.ffm
? Why ends this command with aav_interleaved_write_frame(): Connection reset by peer
?
Informations and logs
-
ffserver log (both times) :
Sat Mar 5 13:54:08 2016 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 4096
-
ffserver version
pi@raspberrypi:/opt/livefeed $ ffserver -version
ffserver version N-78909-gfb2f164 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfaac --enable-libmp3lame --enable-libfreetype
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 27.101 / 57. 27.101
libavformat 57. 28.100 / 57. 28.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 39.100 / 6. 39.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100 -
ffmpeg version
pi@raspberrypi:/opt/livefeed $ ffmpeg -version
ffmpeg version N-78909-gfb2f164 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfaac --enable-libmp3lame --enable-libfreetype
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 27.101 / 57. 27.101
libavformat 57. 28.100 / 57. 28.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 39.100 / 6. 39.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100 -
avconv version :
pi@raspberrypi:/opt/livefeed $ avconv -version
avconv version 11.4-6:11.4-1~deb8u1+rpi1, Copyright (c) 2000-2014 the Libav developers
built on Jun 16 2015 05:32:34 with gcc 4.9.2 (Raspbian 4.9.2-10)
avconv 11.4-6:11.4-1~deb8u1+rpi1
libavutil 54. 3. 0 / 54. 3. 0
libavcodec 56. 1. 0 / 56. 1. 0
libavformat 56. 1. 0 / 56. 1. 0
libavdevice 55. 0. 0 / 55. 0. 0
libavfilter 5. 0. 0 / 5. 0. 0
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0. 0 / 3. 0. 0
Thanks and cheers
Clemens
-
-
ffmpeg command not working from bash script but working from command line [duplicate]
6 octobre 2023, par SamTechI wrote a
bash
script that is generating command to encode video and create HLS playlist.

Here is the script. To make it short and clear, i fill variables with hard-coded values.


#!/bin/bash

# below variables are generated from some other script

basic="-hide_banner -y -i Sample.mp4 -profile:v main -crf 20 -sc_threshold 0 -g 50 -keyint_min 50 -hls_time 6"

renditions="-c:v:0 h264 -filter:v:0 scale=w=426:h=240:force_original_aspect_ratio=decrease -b:v:0 128k -maxrate:v:0 136k -bufsize:v:0 192k -c:v:1 h264 -filter:v:1 scale=w=640:h=360:force_original_aspect_ratio=decrease -b:v:1 256k -maxrate:v:1 273k -bufsize:v:1 384k -b:a 128k -c:a aac -ar 48000 -ac 2"

mapping="-map 0:v -map 0:v -map 0:a"
stream_map="-var_stream_map \"v:0,agroup:audio v:1,agroup:audio a:0,agroup:audio\""

hls="-hls_list_size 0 -f hls -hls_playlist_type vod -hls_segment_type mpegts -master_pl_name master.m3u8 -y %v_seg.m3u8"

# show final command
echo "Command:"
echo "ffmpeg ${basic} ${renditions} ${mapping} ${stream_map} ${hls}"

# execute command
ffmpeg ${basic} ${renditions} ${mapping} ${stream_map} ${hls}



Here is complete output from the script, along with the error it is giving.


[samtech@SAM tmp]$ ./hls-debug.sh 
Command:
ffmpeg -hide_banner -y -i Sample.mp4 -profile:v main -crf 20 -sc_threshold 0 -g 50 -keyint_min 50 -hls_time 10 -c:v:0 h264 -filter:v:0 scale=w=426:h=240:force_original_aspect_ratio=decrease -b:v:0 128k -maxrate:v:0 136k -bufsize:v:0 192k -c:v:1 h264 -filter:v:1 scale=w=640:h=360:force_original_aspect_ratio=decrease -b:v:1 256k -maxrate:v:1 273k -bufsize:v:1 384k -b:a 128k -c:a aac -ar 48000 -ac 2 -map 0:v -map 0:v -map 0:a -var_stream_map "v:0,agroup:audio v:1,agroup:audio a:0,agroup:audio" -hls_list_size 0 -f hls -hls_playlist_type vod -hls_segment_type mpegts -master_pl_name master.m3u8 -y %v_seg.m3u8
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x562fabc34480] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 640x480, 997 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Sample.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:31.00, start: 0.002000, bitrate: 1146 kb/s
 Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none, 640x480, 997 kb/s, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 12800 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
[NULL @ 0x562fabc69680] Unable to find a suitable output format for 'v:1,agroup:audio'
v:1,agroup:audio: Invalid argument



And here is output when i copy command and run in terminal


[samtech@SAM tmp]$ ffmpeg -hide_banner -y -i Sample.mp4 -profile:v main -crf 20 -sc_threshold 0 -g 50 -keyint_min 50 -hls_time 10 -c:v:0 h264 -filter:v:0 scale=w=426:h=240:force_original_aspect_ratio=decrease -b:v:0 128k -maxrate:v:0 136k -bufsize:v:0 192k -c:v:1 h264 -filter:v:1 scale=w=640:h=360:force_original_aspect_ratio=decrease -b:v:1 256k -maxrate:v:1 273k -bufsize:v:1 384k -b:a 128k -c:a aac -ar 48000 -ac 2 -map 0:v -map 0:v -map 0:a -var_stream_map "v:0,agroup:audio v:1,agroup:audio a:0,agroup:audio" -hls_list_size 0 -f hls -hls_playlist_type vod -hls_segment_type mpegts -master_pl_name master.m3u8 -y %v_seg.m3u8
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55eeed0c7500] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 640x480, 997 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Sample.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:31.00, start: 0.002000, bitrate: 1146 kb/s
 Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none, 640x480, 997 kb/s, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 12800 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:0 -> #0:1 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:2 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55eeed0ff5c0] using SAR=1/1
[libx264 @ 0x55eeed0ff5c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55eeed0ff5c0] profile Main, level 1.3, 4:2:0, 8-bit
[libx264 @ 0x55eeed0ff5c0] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=7 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=50 keyint_min=26 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=136 vbv_bufsize=192 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x55eeed106f40] using SAR=1/1
[libx264 @ 0x55eeed106f40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55eeed106f40] profile Main, level 2.1, 4:2:0, 8-bit
[libx264 @ 0x55eeed106f40] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=11 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=50 keyint_min=26 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=273 vbv_bufsize=384 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[mpegts @ 0x55eef094a180] frame size not set
Output #0, hls, to '%v_seg.m3u8':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Stream #0:0(und): Video: h264, yuv420p(tv, progressive), 320x240 [SAR 1:1 DAR 4:3], q=2-31, 128 kb/s, 25 fps, 90k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 136000/0/128000 buffer size: 192000 vbv_delay: N/A
 Stream #0:1(und): Video: h264, yuv420p(tv, progressive), 480x360 [SAR 1:1 DAR 4:3], q=2-31, 256 kb/s, 25 fps, 90k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 273000/0/256000 buffer size: 384000 vbv_delay: N/A
 Stream #0:2(und): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 aac
[hls @ 0x55eeed0fc700] Opening '0_seg0.ts' for writing10.98 bitrate=N/A dup=370 drop=0 speed=11.2x 
[hls @ 0x55eeed0fc700] Opening '1_seg0.ts' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg0.ts' for writing
[hls @ 0x55eeed0fc700] Opening '0_seg1.ts' for writing17.53 bitrate=N/A dup=370 drop=0 speed=11.8x 
[hls @ 0x55eeed0fc700] Opening '1_seg1.ts' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg1.ts' for writing
[hls @ 0x55eeed0fc700] Opening '0_seg2.ts' for writing28.75 bitrate=N/A dup=370 drop=0 speed=11.6x 
[hls @ 0x55eeed0fc700] Opening '1_seg2.ts' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg2.ts' for writing
[hls @ 0x55eeed0fc700] Opening '0_seg3.ts' for writing
[hls @ 0x55eeed0fc700] Opening '0_seg.m3u8' for writing
[hls @ 0x55eeed0fc700] Opening '1_seg3.ts' for writing
[hls @ 0x55eeed0fc700] Opening '1_seg.m3u8' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg3.ts' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg.m3u8' for writing
[hls @ 0x55eeed0fc700] Opening 'master.m3u8' for writing
frame= 775 fps=264 q=-1.0 Lq=-1.0 size=N/A time=00:00:30.97 bitrate=N/A dup=370 drop=0 speed=10.6x 
video:1227kB audio:489kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x55eeed0ff5c0] frame I:16 Avg QP:17.53 size: 9672
[libx264 @ 0x55eeed0ff5c0] frame P:328 Avg QP:20.42 size: 690
[libx264 @ 0x55eeed0ff5c0] frame B:431 Avg QP:18.51 size: 125
[libx264 @ 0x55eeed0ff5c0] consecutive B-frames: 20.6% 13.2% 7.4% 58.8%
[libx264 @ 0x55eeed0ff5c0] mb I I16..4: 33.1% 0.0% 66.9%
[libx264 @ 0x55eeed0ff5c0] mb P I16..4: 0.8% 0.0% 2.4% P16..4: 15.3% 7.5% 4.3% 0.0% 0.0% skip:69.7%
[libx264 @ 0x55eeed0ff5c0] mb B I16..4: 0.1% 0.0% 0.0% B16..8: 10.8% 1.7% 0.4% direct: 0.4% skip:86.6% L0:40.4% L1:51.0% BI: 8.7%
[libx264 @ 0x55eeed0ff5c0] coded y,uvDC,uvAC intra: 70.8% 80.4% 61.6% inter: 3.8% 4.7% 0.5%
[libx264 @ 0x55eeed0ff5c0] i16 v,h,dc,p: 17% 39% 23% 21%
[libx264 @ 0x55eeed0ff5c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 26% 18% 7% 7% 6% 7% 6% 7%
[libx264 @ 0x55eeed0ff5c0] i8c dc,h,v,p: 44% 31% 14% 11%
[libx264 @ 0x55eeed0ff5c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55eeed0ff5c0] ref P L0: 73.7% 16.3% 7.4% 2.6%
[libx264 @ 0x55eeed0ff5c0] ref B L0: 94.3% 4.9% 0.9%
[libx264 @ 0x55eeed0ff5c0] ref B L1: 98.3% 1.7%
[libx264 @ 0x55eeed0ff5c0] kb/s:112.27
[libx264 @ 0x55eeed106f40] frame I:16 Avg QP:15.14 size: 18394
[libx264 @ 0x55eeed106f40] frame P:260 Avg QP:19.00 size: 1507
[libx264 @ 0x55eeed106f40] frame B:499 Avg QP:18.80 size: 269
[libx264 @ 0x55eeed106f40] consecutive B-frames: 9.7% 11.4% 6.2% 72.8%
[libx264 @ 0x55eeed106f40] mb I I16..4: 36.5% 0.0% 63.5%
[libx264 @ 0x55eeed106f40] mb P I16..4: 1.2% 0.0% 3.1% P16..4: 15.5% 7.1% 3.2% 0.0% 0.0% skip:69.9%
[libx264 @ 0x55eeed106f40] mb B I16..4: 0.1% 0.0% 0.1% B16..8: 11.4% 1.6% 0.3% direct: 0.4% skip:86.2% L0:39.1% L1:53.5% BI: 7.4%
[libx264 @ 0x55eeed106f40] coded y,uvDC,uvAC intra: 65.1% 75.8% 54.1% inter: 3.1% 4.5% 0.3%
[libx264 @ 0x55eeed106f40] i16 v,h,dc,p: 35% 27% 12% 26%
[libx264 @ 0x55eeed106f40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 25% 15% 7% 8% 7% 8% 6% 6%
[libx264 @ 0x55eeed106f40] i8c dc,h,v,p: 46% 29% 14% 11%
[libx264 @ 0x55eeed106f40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55eeed106f40] ref P L0: 71.6% 15.9% 8.6% 3.9%
[libx264 @ 0x55eeed106f40] ref B L0: 93.9% 4.6% 1.5%
[libx264 @ 0x55eeed106f40] ref B L1: 98.3% 1.7%
[libx264 @ 0x55eeed106f40] kb/s:211.68
[aac @ 0x55eeed1009c0] Qavg: 401.380



What the wrong is going with that script ?


I am pulling my hairs from last few hours because of it, anyone help please.