Streaming from the input
Moderator: flatmax
Re: Streaming from the input
Hello Matt,
I would like to try to re-compile ffmpeg/ffplay to exclude the video part, just to see if there are differences on the CPU load of the PI.
Right now with the ffmpeg I got from the distribution package, the CPU load is 30%.
Can you kindly re-post the sequence to compile both?
Thanks!!
Andrea
I would like to try to re-compile ffmpeg/ffplay to exclude the video part, just to see if there are differences on the CPU load of the PI.
Right now with the ffmpeg I got from the distribution package, the CPU load is 30%.
Can you kindly re-post the sequence to compile both?
Thanks!!
Andrea
Re: Streaming from the input
I found that avconv has disabled support for avserver completely.
You will want to get the sources and compile ffmpeg to remove all video related stuff. So for example, assuming you want to build only the encoder for ffmpeg and ffserver, with only wav file encoding and muxing, then ...
First get the sources :
Then configure :
Then make and install :
Now if you want to do this and end up with debian packages, then you will need to do the following :
Get the source and edit the file debian/rules. Carefully change the 'CONFIG' variable to keep what is necessary in compile flags and dir detail, but switch out for your required configure flags.
Once that is done, you will want to run this to build the .deb files in the ".." directory :
Please update this thread once you have success with the steps you took !
Matt
You will want to get the sources and compile ffmpeg to remove all video related stuff. So for example, assuming you want to build only the encoder for ffmpeg and ffserver, with only wav file encoding and muxing, then ...
First get the sources :
Code: Select all
apt-get source ffmpeg
Code: Select all
./configure \
--disable-filters \
--disable-postproc \
--disable-swscale \
--disable-everything \
--disable-decoder=pcm_bluray,pcm_dvd \
--disable-ffplay --disable-ffprobe \
--disable-demuxers \
--disable-decoders \
--disable-avresample \
--enable-encoder=pcm_* \
--enable-decoder=pcm_* \
--enable-libwavpack \
--enable-encoder=wav \
--enable-decoder=wav \
--enable-muxer=wav \
--enable-demuxer=wav \
--enable-protocol=file \
--enable-filter=aresample \
--enable-indev=alsa \
--enable-ffserver --enable-ffmpeg \
Code: Select all
make
Code: Select all
make install
Get the source and edit the file debian/rules. Carefully change the 'CONFIG' variable to keep what is necessary in compile flags and dir detail, but switch out for your required configure flags.
Once that is done, you will want to run this to build the .deb files in the ".." directory :
Code: Select all
dpkg-buildpackage -us -uc -b
Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Re: Streaming from the input
Oh by the way, if you want most of the audio stuff built in, then here is what you should do ... current problem with this configuration is that it doesn't produce ffplay and ffmpeg only ffprobe and ffserver
Set your configure flags to disable mostly everything :
Then enable the following audio decoders, demuxers and parsers :
Audio decoders :
demuxers :
audio parsers :
audio protocols :
Set your configure flags to disable mostly everything :
Code: Select all
--disable-programs \
--disable-avfilter \
--disable-postproc \
--disable-swresample \
--disable-swscale \
--disable-everything \
--disable-decoder=pcm_bluray,pcm_dvd \
Code: Select all
--enable-libspeex --enable-decoder=libspeex \
--enable-ffserver --enable-ffmpeg --enable-ffplay \
Code: Select all
--enable-decoder=aac \
--enable-decoder=aac_latm \
--enable-decoder=ac3 \
--enable-decoder=adpcm_* \
--enable-decoder=alac \
--enable-decoder=amrnb \
--enable-decoder=amrwb \
--enable-decoder=ape \
--enable-decoder=atrac3 \
--enable-decoder=flac \
--enable-decoder=mp2 \
--enable-decoder=mp3* \
--enable-decoder=mpc7 \
--enable-decoder=mpc8 \
--enable-decoder=opus \
--enable-decoder=pcm_* \
--enable-decoder=vorbis \
--enable-decoder=wavpack \
--enable-decoder=wmav1 \
--enable-decoder=wmav2 \
--enable-decoder=wmalossless \
--enable-decoder=wmapro \
--enable-decoder=zlib \
Code: Select all
--enable-demuxer=aac \
--enable-demuxer=ac3 \
--enable-demuxer=aiff \
--enable-demuxer=amr \
--enable-demuxer=ape \
--enable-demuxer=avi \
--enable-demuxer=flac \
--enable-demuxer=ffm \
--enable-demuxer=matroska \
--enable-demuxer=mp3 \
--enable-demuxer=mov \
--enable-demuxer=mpc \
--enable-demuxer=mpc8 \
--enable-demuxer=mpegts \
--enable-demuxer=ogg \
--enable-demuxer=rm \
--enable-demuxer=rtsp \
--enable-demuxer=rtp \
--enable-demuxer=sdp \
--enable-demuxer=wav \
--enable-demuxer=wv \
Code: Select all
--enable-parser=aac \
--enable-parser=aac_latm \
--enable-parser=ac3 \
--enable-parser=flac \
--enable-parser=mpegaudio \
--enable-parser=opus \
Code: Select all
--enable-protocol=file \
--enable-protocol=http \
--enable-protocol=icecast \
--enable-protocol=rtp \
--enable-protocol=tcp \
--enable-protocol=udp \
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Re: Streaming from the input
Thank you!
Thats exactly what I am trying to do, so far I just run into one issue after the other.
I will follow your steps and post my progress, thanks!
Update:
Step 1: compiling only for wav
I added the
to the flags.
The ./configure complained about libwavpack.
Installed libwavpack-dev.
./configure ended up with warning
--enable-encoder(decoder)=wav did not match anything
This is not good as we probably will not be able to encode/decode wav.
Step 2 trying to ./configure <flag_list_for_all_the_audio_codecs>
and I get the error
speex not found using pkg-config
which it looks like has to do with the x264 libraries.
More digging to do...
Thats exactly what I am trying to do, so far I just run into one issue after the other.
I will follow your steps and post my progress, thanks!
Update:
Step 1: compiling only for wav
I added the
Code: Select all
enable-protocol=http
The ./configure complained about libwavpack.
Installed libwavpack-dev.
./configure ended up with warning
--enable-encoder(decoder)=wav did not match anything
This is not good as we probably will not be able to encode/decode wav.
Step 2 trying to ./configure <flag_list_for_all_the_audio_codecs>
and I get the error
speex not found using pkg-config
which it looks like has to do with the x264 libraries.
More digging to do...
Re: Streaming from the input
Hello,
I managed to get some configuration working and after trying lot of combinations server-client, I am still not able to stream the audio input with less than 1 second of latency.
I am wondering if the card itself introduces some latency and if this is not the case, what are the parameters to look at in order to minimize the audio latency?
Thanks a lot in advance for your help!
I managed to get some configuration working and after trying lot of combinations server-client, I am still not able to stream the audio input with less than 1 second of latency.
I am wondering if the card itself introduces some latency and if this is not the case, what are the parameters to look at in order to minimize the audio latency?
Thanks a lot in advance for your help!
Re: Streaming from the input
Hi there,
You should be able to get ultra low latencies with this card. The problem most likely lies in the buffering for the stream.
The RTP will give the lowest latency, but for that I don't think you use the ffserver - perhaps you can ? I would be interested in finding out if you can !
Matt
You should be able to get ultra low latencies with this card. The problem most likely lies in the buffering for the stream.
The RTP will give the lowest latency, but for that I don't think you use the ffserver - perhaps you can ? I would be interested in finding out if you can !
Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Re: Streaming from the input
Thank you !
I will try some combinations ffserver and other things and will let you know my findings.
Cheers,
Andrea
I will try some combinations ffserver and other things and will let you know my findings.
Cheers,
Andrea
Re: Streaming from the input
This initial part of the thread talks a little about rtp :
viewtopic.php?f=5&t=64#p176
But that doesn't implement it using the ffserver.
Matt
viewtopic.php?f=5&t=64#p176
But that doesn't implement it using the ffserver.
Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Re: Streaming from the input
Yes, thanks..
Ok, my problem is to stream music wit the lowest latency possible.
ffmpeg is one of the solution, but at this point i don't think it is the only solution.
RTP is needed for low latency.
I managed to measure the card latency with the ecasound command and I noticed a very low latency, about 20 ms.
The latency measured is the chain AD/DA plus the latency introduced by the ecasound command itself.
I want to find the magic combination of commands that let us to stream music almost in real-time
If anyone can chime in, would be really appreciated!!!
The command is:
Ok, my problem is to stream music wit the lowest latency possible.
ffmpeg is one of the solution, but at this point i don't think it is the only solution.
RTP is needed for low latency.
I managed to measure the card latency with the ecasound command and I noticed a very low latency, about 20 ms.
The latency measured is the chain AD/DA plus the latency introduced by the ecasound command itself.
I want to find the magic combination of commands that let us to stream music almost in real-time
If anyone can chime in, would be really appreciated!!!
The command is:
Code: Select all
ecasound -B:rtlowlatency -b:256 -f:s16_le,2,44100 -i:alsahw,1,0 -o:alsahw,1,0
Re: Streaming from the input
Any updates on this? I'm looking for a sonos play 5 like line-in alternative to stream to multi-room with squeezelite. I haven't found one yet. This post could help me do what I'm looking to do.
Who is online
Users browsing this forum: No registered users and 4 guests