[FFmpeg-user] Capture and RTMP

Stefano Sabatini stefasab at gmail.com
Wed Jul 31 11:38:36 CEST 2013


On date Wednesday 2013-07-31 14:37:46 +0530, Yugant Khanna wrote:
> Hi  , i tried  to concat both the above commands to Encode and Stream RTMP
> at the same same but in vein .
> 
> ffmpeg   -f dshow -r 25 -i video="Decklink Video Capture":audio="Decklink
> Audio Capture" -vcodec dvvideo -pix_fmt yuv411p -vb 2M  -acodec pcm_s24le
> -f tee -map 0:v -map 0:a
> "[f=segment:segment_time=10:segment_list=test.m3u8:segment_format=mpegts]stream%05d.ts
> |[f=flv]rtmp://127.0.0.1/LIVE/STREAMNAME"
> 
> 
> ffmpeg version N-51433-g551f683 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Mar 28 2013 21:52:57 with gcc 4.8.0 (GCC)
>   configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-av
> isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
> --enab
> le-libass --enable-libbluray --enable-libcaca --enable-libfreetype
> --enable-libg
> sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libo
> pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
> --enable-li
> bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
> --enable-lib
> twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
> --enabl
> e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
>   libavutil      52. 22.101 / 52. 22.101
>   libavcodec     55.  2.100 / 55.  2.100
>   libavformat    55.  0.100 / 55.  0.100
>   libavdevice    55.  0.100 / 55.  0.100
>   libavfilter     3. 48.105 /  3. 48.105
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
>   libpostproc    52.  2.100 / 52.  2.100
> [dshow @ 0037bde0] Estimating duration from bitrate, this may be inaccurate
> Guessed Channel Layout for  Input Stream #0.1 : stereo
> Input #0, dshow, from 'video=Decklink Video Capture:audio=Decklink Audio
> Capture
> ':
>   Duration: N/A, start: 0.054090, bitrate: 1536 kb/s
>     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, 25
> tbr,
> 10000k tbn, 25 tbc
>     Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
> [segment @ 03e6cf80] Codec for stream 0 does not use global headers but
> containe
> r format requires global headers
> [segment @ 03e6cf80] Codec for stream 1 does not use global headers but
> containe
> r format requires global headers
> [flv @ 03e83a40] Codec for stream 0 does not use global headers but
> container fo
> rmat requires global headers
> [flv @ 03e83a40] Codec for stream 1 does not use global headers but
> container fo
> rmat requires global headers
> [flv @ 03e83a40] Video codec 'dvvideo' for stream 0 is not compatible with
> FLV

There are several issues here.
1. FLV does not support DVVIDEO, you should use H.264 or a compatible
codec.

2. you need to specify -flags +global_header for FLV. This is a bit
tricky since you're also using tee. One possible solution would be to
use the bitstream filter dump_extra, but you need a patch to apply
bitstream filters to tee outputs, which is currently work in progress
in -devel.

The short answer is that you can't do that in one pass at the moment,
unless you patch your ffmpeg, or wait a few weeks for the feature to
be integrated.


More information about the ffmpeg-user mailing list