FFmpeg recording and online broadcast Construction

Source: Internet
Author: User

Applicable scenarios: Want to record or broadcastFMFM radio programs cannot find a solution for the moment.

Hardware conditions:

  • Sound Card:The sound card configured on a general multimedia computer can be competent,Including various motherboard integrated sound cards.

  • Radio:Normal radio is competent,As long as the broadcasting frequency modulation station can be stable and clear,No noise.

  • Dual-head audio cable : You can buy dual-headed audio/video channels at the relevant Audio/Video Products Store. , However, the interfaces must support both sound card and Radio earphone interfaces. Audio dual-headed line DIY Production : Truncate two discarded in-ear monitoring wires , Connect the two in-ear monitoring wires with a plug to connect the sound card and the radio. Interface .

Software conditions:

    • Recording software

    • Streaming Media Server

Here, I will write my own implementation process for your reference only.

Hardware environment:

    • Sound Card: built-in sound card for laptop

    • Radio:AndroidBuilt-in radio Software

    • Dual-head audio cable: purchased by the store

Software environment:

    • Operating System:Centos6.2 _ 64

    • Recording software:Ffmpeg0.6

    • Streaming Media Server:Darwin Streaming Server 6.0.3

Specific implementation:

Connect your phone to your computer with a dual-head audio cable. Specifically, you can connect the audio output (that is, the hole in the headset) of your phone to the audio input (that is, the hole in the microphone) of your computer, and turn on the radio.

1. LocalRecordingMP3

1, Recording

Run the following command:

$FFmpeg-f oss-I/dev/DSP 1.mp3

2, Playback Test

$VLC-VV 1.mp3

2. Set up online broadcast

1,GenerateSDPFile

$FFmpeg-f oss-I/dev/DSP-acodec libmp 3lame-F RTP: // 172.16.16.100: 20000> 1.sdp

2, SetSDPFile copy/Usr/local/moviesDirectory, and modifySDPFile: Delete the first line (SDP:)DSSCorrect identification.

3, Playback Test

UseVLCAnd other players, visit the address:

RTSP: // 172.16.16.100/1.sdp

Iii. Others

1,MknodRetrieval/Dev/DSP

In the kernelSource code directoryDocumentation/devices.txtFind/Dev/DSPRelated information:

14 char Open Sound System (OSS)

......

3 =/dev/DSP Digital Audio

Run the following command:

#Mknod/dev/dsp c 14 3

If a common user/Dev/DSPIf you do not have sufficient permissions, add them. For example

#Chmod 666/dev/DSP

This way/Dev/DSPIt will be back.

2Source code InstallationFFmpeg

ReferenceArticle:Http://www.cnblogs.com/MikeZhang/archive/2012/07/21/installFFmpegFromSourceCode.html

3,DSSInstallation

References:Http://www.cnblogs.com/MikeZhang/archive/2012/07/06/CentOS6InstallDarwin.html

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.