[FFmpeg-user] Is it possible to use ffmpeg as a rtmp downloader like rtmpdump?

DopeLabs dopelabs at dubstep.fm
Fri May 19 14:12:46 EEST 2017


Your command should work just fine. Is the file not playable when the stream completes or after you stop ffmpeg?


$ ffmpeg -i rtmp://stream.dsfm.tv/live/dubstepfm_720p -c copy -f flv output.flv
ffmpeg version N-86169-g55b56a8 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --enable-shared --disable-static --enable-version3 --enable-openal --enable-libxvid --enable-libx264 --enable-libwavpack --enable-libvpx --enable-libvorbis --enable-libtheora --enable-libssh --enable-librtmp --enable-libopenjpeg --enable-libmp3lame --enable-libfdk-aac --enable-libass --enable-avresample --enable-nonfree --enable-gpl --enable-libfreetype --enable-openssl --enable-fontconfig --enable-libzmq --enable-libfribidi --enable-libsoxr --enable-libcaca --enable-chromaprint --enable-avisynth --disable-txtpages --disable-podpages --disable-htmlpages --enable-libx265
  libavutil      55. 63.100 / 55. 63.100
  libavcodec     57. 96.101 / 57. 96.101
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 90.100 /  6. 90.100
  libavresample   3.  6.  0 /  3.  6.  0
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Metadata:
  duration              0.00
  width                 1280.00
  height                720.00
  videodatarate         19531.25
  framerate             60.00
  videocodecid          7.00
  audiodatarate         250.00
  audiosamplerate       44100.00
  audiosamplesize       16.00
  stereo                TRUE
  audiocodecid          10.00
  major_brand           dash
  minor_version         0
  compatible_brands     iso6avc1mp41
  encoder               Lavf57.28.100
  filesize              0.00
Input #0, flv, from 'rtmp://stream.dsfm.tv/live/dubstepfm_720p':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    encoder         : Lavf57.28.100
  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 20000 kb/s, 60 fps, 60 tbr, 1k tbn, 120 tbc
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 256 kb/s
Output #0, flv, to 'output.flv':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    encoder         : Lavf57.72.101
    Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 20000 kb/s, 60 fps, 60 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  328 fps= 61 q=-1.0 Lsize=   16525kB time=00:00:05.80 bitrate=23331.7kbits/s speed=1.08x
video:16332kB audio:181kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.066842%



$ ffprobe output.flv
ffprobe version N-86169-g55b56a8 Copyright (c) 2007-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --enable-shared --disable-static --enable-version3 --enable-openal --enable-libxvid --enable-libx264 --enable-libwavpack --enable-libvpx --enable-libvorbis --enable-libtheora --enable-libssh --enable-librtmp --enable-libopenjpeg --enable-libmp3lame --enable-libfdk-aac --enable-libass --enable-avresample --enable-nonfree --enable-gpl --enable-libfreetype --enable-openssl --enable-fontconfig --enable-libzmq --enable-libfribidi --enable-libsoxr --enable-libcaca --enable-chromaprint --enable-avisynth --disable-txtpages --disable-podpages --disable-htmlpages --enable-libx265
  libavutil      55. 63.100 / 55. 63.100
  libavcodec     57. 96.101 / 57. 96.101
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 90.100 /  6. 90.100
  libavresample   3.  6.  0 /  3.  6.  0
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, flv, from 'output.flv':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    encoder         : Lavf57.72.101
  Duration: 00:00:05.85, start: 0.000000, bitrate: 23140 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 20000 kb/s, 60 fps, 60 tbr, 1k tbn, 120 tbc
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 256 kb/s






> On May 19, 2017, at 3:20 36AM, Xu Pu Ti <rslovers at yandex.com> wrote:
> 
> A simple 'ffmpeg -i rtmp://url -c copy -f flv -' is not expected, since ffmpeg
> cares too much about the actual content of the stream and will complain about
> bad flv tags and ignore tags it doesn't understand.
> 
> Is it possible to make ffmpeg just download from rtmp and save it as a flv file
> and do not inspect what it contains?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list