[FFmpeg-user] How to capture an RTMP stream
DopeLabs
dopelabs at dubstep.fm
Sat Jul 25 11:55:54 CEST 2015
rune:~ dopelabs$ ffmpeg -i "rtmp://cp258849.live.edgefcs.net/live/SonLife0616@327662" -c copy -f mp4 test.mp4
ffmpeg version N-66156-gb76d6eb Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 7 2014 07:54:06 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
configuration:
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
[flv @ 0x7f8fcb01a000] Stream discovered after head already parsed
Input #0, flv, from 'rtmp://cp258849.live.edgefcs.net/live/SonLife0616@327662':
Metadata:
copyright : ''
author : ''
description : ''
keywords : ''
rating : ''
title : 'SonLife'
presetname : 'Custom'
creationdate : '21/07/2015 11:21:13 GMT-5'
videodevice : 'SDI Capture Card'
videoframerate : 30
avclevel : 31.00
avcprofile : 88.00
videokey : 50.00
videoonly : 0
audioonly : 0
audiodevice : 'SDI Capture Card'
audioinputvolume: 50.00
encoder : 'C21 Live Encoder'
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2048 kb/s, 30.33 fps, 30 tbr, 1k tbn, 60 tbc
Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp, 93 kb/s
Stream #0:2: Data: none
Output #0, mp4, to 'test.mp4':
Metadata:
copyright : ''
author : ''
description : ''
keywords : ''
rating : ''
title : 'SonLife'
presetname : 'Custom'
creationdate : '21/07/2015 11:21:13 GMT-5'
videodevice : 'SDI Capture Card'
videoframerate : 30
avclevel : 31.00
avcprofile : 88.00
videokey : 50.00
videoonly : 0
audioonly : 0
audiodevice : 'SDI Capture Card'
audioinputvolume: 50.00
encoder : Lavf56.4.100
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2048 kb/s, 30.33 fps, 16k tbn, 1k tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 93 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 404 fps= 53 q=-1.0 Lsize= 3454kB time=00:00:10.68 bitrate=2648.0kbits/s
video:3317kB audio:125kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.360223%
rune:~ dopelabs$ ffprobe test.mp4
ffprobe version N-66156-gb76d6eb Copyright (c) 2007-2014 the FFmpeg developers
built on Sep 7 2014 07:54:06 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
configuration:
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 'SonLife'
encoder : Lavf56.4.100
copyright : ''
description : ''
Duration: 00:00:10.70, start: 0.000000, bitrate: 2644 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2539 kb/s, 37.76 fps, 30 tbr, 16k tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)
Metadata:
handler_name : SoundHandler
> On Jul 25, 2015, at 1:34 AM, Moritz Barsnick <barsnick at gmx.net> wrote:
>
> On Fri, Jul 24, 2015 at 18:09:13 -0600, Deron wrote:
>> Closing connection: NetStream.Play.StreamNotFound
>> rtmp://cp258849.live.edgefcs.net/live/SonLife0616@327662: Unknown error occurred
>
> Interesting, because mplayer too can dump it just fine:
> $ mplayer -v -dumpstream -dumpfile test.flv rtmp://cp258849.live.edgefcs.net/live/SonLife0616@327662
> (Audio and video of the dump are out of sync though.)
>
> I personally don't see why this shouldn't work with ffmpeg. *shrug*
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
More information about the ffmpeg-user
mailing list