Difference between revisions of "Ffmpeg"
Line 23: | Line 23: | ||
[[avconv -codecs]] | [[avconv -codecs]] | ||
+ | |||
+ | -f rtp — output the audio as an RTP stream. | ||
+ | |||
+ | rtp rtp://192.168.1.108:1234 — the destination for the stream and the port number at that destination. | ||
+ | |||
+ | change IP to whatever is your machine. | ||
+ | |||
+ | Port 1234 was chosen arbitrarily. | ||
+ | |||
+ | |||
+ | -- |
Revision as of 17:31, 11 July 2015
avconv
avconv -f alsa -ac 1 -i hw:1,0 -acodec pcm_s16le -ar 22050 -f rtp rtp://192.168.1.108:1234
-f alsa — This tells avconv what type of input audio device we are using.
Since the microphone is a hardware device, it is handled by ALSA.
If a streaming a file, put the format of the file here.
Look at other audio formats by running
-ac 1 — Number of audio channels in the input stream.
-i hw:1,0 — input audio device is at the hardware address hw:1,0, where 1 is the card number and 0 is the device number on that card.
-acodec pcm_s16le — output format for the stream. The s16le part indicates each audio sample is 16 bits in Little Endian format.
-f rtp — output the audio as an RTP stream.
rtp rtp://192.168.1.108:1234 — the destination for the stream and the port number at that destination.
change IP to whatever is your machine.
Port 1234 was chosen arbitrarily.
--