[FFmpeg-trac] #7142(undetermined:new): Not stable fps in delivery rtmp stream
FFmpeg
trac at avcodec.org
Tue Apr 17 16:06:26 EEST 2018
#7142: Not stable fps in delivery rtmp stream
-------------------------------------+-------------------------------------
Reporter: | Owner:
pavel.khilko | Status: new
Type: defect | Component:
Priority: normal | undetermined
Version: unspecified | Resolution:
Keywords: fps | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by pavel.khilko):
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --prefix=/home/pavlo/.linuxbrew/Cellar/ffmpeg/3.4.2
--enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-
tables --enable-avresample --cc=gcc-5 --host-cflags= --host-ldflags=
--disable-jack --enable-gpl --enable-ffplay --enable-frei0r --enable-
libass --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-
libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-
libx264 --enable-libx265 --enable-libxvid --disable-lzma --enable-
libopenjpeg --disable-decoder=jpeg2000 --extra-
cflags=-I/home/pavlo/.linuxbrew/Cellar/openjpeg/2.3.0/include/openjpeg-2.3
--enable-nonfree
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
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
outfile}...
I get the stream from webcam with ffmpeg and publish it to nginx-rtmp:
ffmpeg -f alsa -i default -f video4linux2 -i / dev / video0 -c: v libx264
-c: a aac -f flv rtmp: // localhost / myapp / myStream
After that, I get stream from nginx-rtmp to ffmpeg and transcode to the
required format:
ffmpeg -i rtmp: // localhost / myapp / myStream -s 1280x720 -aspect 16: 9
\
-c: a aac -b: a 64k -ac 2 -a 44100 -c: v libx264 -b: v 1500k -minate 1500k
\
-maxrate 1500k -bufsize 700k -profile: v main-level 4.0 -vf "fps = 30,
format = yuv420p" \
-x264opts "keyint = 60: min-keyint = 60: no-scenecut" -preset veryfast \
-tune zerolatency -threads 0 -f flv rtmp: // localhost / myapp / myStream1
Using the "video-quality-tools" module, I check the delivery time of the
frames.
If there is a problem with the incoming stream from the camera, ffmpeg
does not save the set value in fps = 30 when delivering the tape
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7142#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list