FFMPEG in Linux
It's a lot easier than having to compile your own from source.
#!/usr/bin/env bash
PATH_TO_FFMPEG=/path/to/ffmpeg
PRE_SWITCHES=""
POST_SWITCHES=""
INPUT_FOUND=false
COUNT=$#
for ((INDEX=0; INDEX<COUNT; ++INDEX)) ; do
# Input found
if [[ $1 == "-i" ]] ; then
# Raw input
INPUT="$2"
INPUT_FOUND=true
shift
# Post switch found
elif $INPUT_FOUND ; then
POST_SWITCHES="$POST_SWITCHES $1"
# Pre switch found
else
PRE_SWITCHES="$PRE_SWITCHES $1"
fi
shift
done
# RTMP stream
if [[ $INPUT =~ 'rtmp' ]] ; then
# Convert syntax to -rtmp_***
INPUT=`echo "$INPUT" | sed -E \
-e 's; ([a-zA-Z]+)=; -rtmp_\L\1 ;g'`
# Extract RTMP URL
FILENAME=`echo "$INPUT" | sed -E \
-e 's;(rtmp[^ ]+).+;\1;'`
# Extract RTMP switches
STREAM_SWITCHES=`echo "$INPUT" | sed -E \
-e 's;rtmp[^ ]+(.+);\1;'`
else
STREAM_SWITCHES=""
FILENAME="$INPUT"
fi
echo $PATH_TO_FFMPEG $PRE_SWITCHES $STREAM_SWITCHES -i \"$FILENAME\" $POST_SWITCHES
$PATH_TO_FFMPEG $PRE_SWITCHES $STREAM_SWITCHES -i "$FILENAME" $POST_SWITCHES
khurram23 wrote:Have you had success streaming from online sources using this?
I've had a problem in Ubuntu where if I compiled ffmpeg from ffmpeg.org (with librtmp), i would get errors in my serviio log stating rtmp protocol not found (or something similar) and would not stream online sources to my Xbox 360. But if I compiled the one from serviio download page, no errors showed up and everything worked fine.
khurram23 wrote:the "no ffmpeg" error is because the ffmpeg pkg in main Ubuntu repo is deprecated. When you compiled ffmpeg based on instructions in the WIKI, your ffmpeg was given a release/pkgnumber which turned out to be lower than what was in repo. Anytime you updated your system, ffmpeg depreciated version was installed.
I've updated the instructions in WIKI to account for this. If you follow the instructions now, it should not happen.
I use Ubuntu 12.10 64bit myself and everything seems to work fine. Only, i would suggest using ffmpeg source from serviio download page instead of ffmpeg.org.
Spadge wrote:In case you've suddenly found errors in your logs since upgrading to Serviio 1.1, complaining that ffmpeg cannot be found (even though "dkpg -l | grep ffmpeg" clearly shows it's installed), it's probably worth looking at this PPA and installing the ffmpeg in there: https://launchpad.net/~jon-severinsson/+archive/ffmpeg
It's a lot easier than having to compile your own from source.
abubin wrote:I am using this package as well. I too would rather use packages instead of self compilation. Compiling packages will have lots of potential side effects such as causing incompatibility with other software that uses it. One such problem that I had previously is the compiled ffmpeg have problem running zoneminder (some camera capture software).
So far this package has been running fine and I am using ubuntu 12.04.
zip wrote:Great, if you tell me what i have to do.
zip wrote:Great, if you tell me what i have to do.
khurram23 wrote:I can help as well, add me if you like.
Return to Serviio Support & Help
Users browsing this forum: Google [Bot] and 89 guests