FFmpeg basic operations on rtmp [go]

Source: Internet
Author: User

Ffplay and FFmpeg call the same library.
I just tried it, but I can play it.
Ffplay "Rtmp://tsl.s1979.cutv.com:1935/cutvchannellive/axefrth/live live=1"

FFmpeg Integration librtmp Implement RTMP related functions, sometimes librtmp default parameters will not fit, may need to attach some parameters. You can try this live stream like this:
Ffmpeg-i "rtmp://. Live=1 "-C copy dump.flv
Note that "Live" is preceded by a space that indicates that the stream is a live stream, and sometimes playpath parameters may be required. Refer to the parameters supported by librtmp

1. Send files to live as Live

    1. Ffmpeg-re-i localfile.mp4-c copy-f flv rtmp://server/live/streamname

2. Save the live media to a local file

    1. Ffmpeg-i rtmp://server/live/streamname-c Copy dump.flv

3, one of the live stream, video instead of H264 compression, audio unchanged, sent to another live streaming service

    1. Ffmpeg-i rtmp://server/live/originalstream-c:a copy-c:v libx264-vpre slow-f flv rtmp://server/live/h264stream

4, one of the live stream, video instead of H264 compression, audio instead of FAAC compression, sent to another live streaming service

    1. Ffmpeg-i rtmp://server/live/originalstream-c:a libfaac-ar 44100-ab 48k-c:v libx264-vpre slow-vpre baseline-f flv r Tmp://server/live/h264stream

5, one of the live stream, the video is unchanged, the audio instead of FAAC compression, sent to another live streaming service

    1. Ffmpeg-i rtmp://server/live/originalstream-acodec libfaac-ar 44100-ab 48k-vcodec copy-f flv rtmp://server/live/h264_ Aac_stream

6, will a high stream, copied to several different video definition of the flow re-release, where the audio does not change

    1. Ffmpeg-re-i rtmp://server/live/high_fmle_stream-acodec copy-vcodec x264lib-s 640x360-b 500k-vpre Medium-vpre Basel Ine Rtmp://server/live/baseline_500k-acodec copy-vcodec x264lib-s 480x272-b 300k-vpre medium-vpre Baseline rtmp://se Rver/live/baseline_300k-acodec copy-vcodec x264lib-s 320x200-b 150k-vpre medium-vpre Baseline Rtmp://server/live/bas Eline_150k-acodec Libfaac-vn-ab 48k rtmp://server/live/audio_only_aac_48k

7, the same function, just use the-x264opts option

    1. Ffmpeg-re-i rtmp://server/live/high_fmle_stream-c:a copy-c:v x264lib-s 640x360-x264opts Bitrate=500:profile=baselin E:preset=slow rtmp://server/live/baseline_500k-c:a copy-c:v x264lib-s 480x272-x264opts bitrate=300:profile=baseline :p reset=slow rtmp://server/live/baseline_300k-c:a copy-c:v x264lib-s 320x200-x264opts bitrate=150:profile=baseline: Preset=slow rtmp://server/live/baseline_150k-c:a libfaac-vn-b:a 48k rtmp://server/live/audio_only_aac_48k

8, the current camera and audio through Dsshow acquisition, video H264, audio FAAC compressed after release

    1. Ffmpeg-r 25-f dshow-s 640x480-i video= "video Source name": audio= "audio source name"-vcodec libx264-b 600k-vpre Slow -acodec libfaac-ab 128k-f flv rtmp://server/application/stream_name

9, a JPG image through the H264 compression cycle output to MP4 video

    1. Ffmpeg.exe-i input.jpg-an-vcodec libx264-coder 1-flags +loop-cmp +chroma-subq 10-qcomp 0.6-qmin 10-qmax 51-qdif F 4-flags2 +dct8x8-trellis 2-partitions +parti8x8+parti4x4-crf 24-threads 0-r 25-g 25-y OUTPUT.mp4

10, the normal stream video instead of H264 compression, audio unchanged, sent to the HD service (new version of FMS live=1)

        1. Ffmpeg-i rtmp://server/live/originalstream-c:a copy-c:v libx264-vpre slow-f flv "Rtmp://server/live/h264stream live=1 ″

FFmpeg basic operations on rtmp [go]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.