Nástroje používateľa

Nástoje správy stránok


linux:rtl-sdr-streaming

Rozdiely

Tu môžete vidieť rozdiely medzi vybranou verziou a aktuálnou verziou danej stránky.

Odkaz na tento prehľad zmien

Both sides previous revision Predchádzajúca revízia
Posledná revízia Both sides next revision
linux:rtl-sdr-streaming [2018/02/18 20:43]
ma3x
linux:rtl-sdr-streaming [2018/02/21 21:14]
ma3x Add mp3 streaming with ffstream
Riadok 1: Riadok 1:
-**RTL SDR streaming**+====== ​RTL SDR streaming ​====== 
 + 
 +===== RTP stream =====
  
 when is -M modulation set to fm, -s means width of modulation and it has to be the same as first -ar which measn sample rate of source.  ​ when is -M modulation set to fm, -s means width of modulation and it has to be the same as first -ar which measn sample rate of source.  ​
Riadok 8: Riadok 10:
  
 rtp usable for streaming inside of network. rtp usable for streaming inside of network.
 +
 +===== mp3 stream =====
 +
 +For mp3 streaming is required ffstream. Example of ffstream configuration (/​etc/​ffserver.conf):​
 +<​code>​
 +# Port on which the server is listening. You must select a different
 +# port from your standard HTTP web server if it is running on the same
 +# computer.
 +HTTPPort 8090
 +
 +# Address on which the server is bound. Only useful if you have
 +# several network interfaces.
 +HTTPBindAddress 0.0.0.0
 +
 +# Number of simultaneous HTTP connections that can be handled. It has
 +# to be defined *before* the MaxClients parameter, since it defines the
 +# MaxClients maximum limit.
 +MaxHTTPConnections 2000
 +
 +# Number of simultaneous requests that can be handled. Since FFServer
 +# is very fast, it is more likely that you will want to leave this high
 +# and use MaxBandwidth,​ below.
 +MaxClients 1000
 +
 +# This the maximum amount of kbit/sec that you are prepared to
 +# consume when streaming to clients.
 +MaxBandwidth 1000
 +
 +# Access log file (uses standard Apache log file format)
 +# '​-'​ is the standard output.
 +CustomLog -
 +
 +##################################################################​
 +# Definition of the live feeds. Each live feed contains one video
 +# and/or audio sequence coming from an ffmpeg encoder or another
 +# ffserver. This sequence may be encoded simultaneously with several
 +# codecs at several resolutions.
 +
 +<Feed feed1.ffm>​
 +
 +# You must use '​ffmpeg'​ to send a live feed to ffserver. In this
 +# example, you can type:
 +#
 +# ffmpeg http://​localhost:​8090/​feed1.ffm
 +
 +# ffserver can also do time shifting. It means that it can stream any
 +# previously recorded live stream. The request should contain:
 +# "​http://​xxxx?​date=[YYYY-MM-DDT][[HH:​]MM:​]SS[.m...]"​.You must specify
 +# a path where the feed is stored on disk. You also specify the
 +# maximum size of the feed, where zero means unlimited. Default:
 +# File=/​tmp/​feed_name.ffm FileMaxSize=5M
 +File /​tmp/​feed1.ffm
 +FileMaxSize 200K
 +
 +# You could specify
 +# ReadOnlyFile /​saved/​specialvideo.ffm
 +# This marks the file as readonly and it will not be deleted or updated.
 +
 +# Specify launch in order to start ffmpeg automatically.
 +# First ffmpeg must be defined with an appropriate path if needed,
 +# after that options can follow, but avoid adding the http:// field
 +#Launch ffmpeg
 +
 +# Only allow connections from localhost to the feed.
 +ACL allow 127.0.0.1
 +
 +</​Feed>​
 +
 +# MP3 audio
 +
 +<Stream test.mp3>​
 +Feed feed1.ffm
 +Format mp2
 +AudioCodec libmp3lame
 +AudioBitRate 512
 +AudioChannels 1
 +AudioSampleRate 44100
 +NoVideo
 +</​Stream>​
 +
 +# Ogg Vorbis audio
 +
 +#<Stream test.ogg>​
 +#Feed feed1.ffm
 +#Metadata title "​Stream title"
 +#​AudioBitRate 64
 +#​AudioChannels 2
 +#​AudioSampleRate 44100
 +#NoVideo
 +#</​Stream>​
 +
 +##################################################################​
 +# Special streams
 +
 +# Server status
 +
 +<Stream stat.html>​
 +Format status
 +
 +# Only allow local people to get the status
 +ACL allow localhost
 +ACL allow 192.168.0.0 192.168.255.255
 +
 +#FaviconURL http://​pond1.gladstonefamily.net:​8080/​favicon.ico
 +</​Stream>​
 +
 +
 +# Redirect index.html to the appropriate site
 +
 +<​Redirect index.html>​
 +URL http://​www.ffmpeg.org/​
 +</​Redirect>​
 +</​code>​
 +
 +Strat server:
 +<​code>​
 +ffserver
 +</​code>​
 +
 +Start rtl_sdr and stream mp3 to feed1:
 +<​code>​
 + ​rtl_fm -f 96.5M -M fm -s 170k -A std -l 0 | ffmpeg -f s16le -ac 1 -ar 170000 -i pipe:0 -acodec libmp3lame -ar 44100 http://​localhost:​8090/​feed1.ffm
 +</​code>​
  
 http://​kmkeen.com/​rtl-demod-guide/​ http://​kmkeen.com/​rtl-demod-guide/​
 https://​medium.com/​@luigifcruz/​listening-live-fm-radio-over-the-network-with-rtl-sdr-2349c5abe878 https://​medium.com/​@luigifcruz/​listening-live-fm-radio-over-the-network-with-rtl-sdr-2349c5abe878
 https://​lansley.com/​2014/​09/​27/​using-rtl_fm-and-ffmpeg-to-stream-radio-audio-over-network/​ https://​lansley.com/​2014/​09/​27/​using-rtl_fm-and-ffmpeg-to-stream-radio-audio-over-network/​
 +https://​ffmpeg.org/​ffserver.html#​Configuration-file-syntax
 +https://​www.ffmpeg.org/​sample.html
linux/rtl-sdr-streaming.txt · Posledná úprava: 2018/02/21 21:20 od ma3x