FAQ  •  Register  •  Login

FFMPEG in Linux

<<

Spadge

Serviio lover

Posts: 58

Joined: Sun Sep 23, 2012 5:22 pm

Post Tue Jan 01, 2013 6:45 pm

FFMPEG in Linux

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.
<<

khurram23

Serviio lover

Posts: 76

Joined: Sun Jun 24, 2012 10:25 pm

Post Thu Jan 03, 2013 8:37 pm

Re: FFMPEG in Linux

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.
Dropbox - Get 500MB bonus space.

My pre-compiled FFMPEG, X264 packages for Linux/Ubuntu - Dropbox
<<

Xmantium

User avatar

DLNA master

Posts: 1396

Joined: Sat Jul 23, 2011 2:12 pm

Location: Manchester, UK

Post Thu Jan 03, 2013 8:57 pm

Re: FFMPEG in Linux

csholmq has made a wrapper for the latest ffmpeg v1.0 that now includes RTMPT protocol support without librtmp

May not work with all plugins but needs to be tested. From my tests it works with pre-compiled ffmpeg from here using the wrapper
  Code:
#!/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
Sony Bravia 2010 52NX803 - Sony PS3 - Xbox 360
Serviio running on QNAP NAS 639 Pro - 1.6 Intel Dual Core - 2GB RAM and QNAP NAS 121 - 2Ghz ARM Marvell - 1GB RAM
Console using ServiiDroid for Android, ServiiMetro and ServiiWP for Windows Phone and WebUI for iOS
<<

Spadge

Serviio lover

Posts: 58

Joined: Sun Sep 23, 2012 5:22 pm

Post Thu Jan 03, 2013 9:28 pm

Re: FFMPEG in Linux

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.


I don't know, I don't use it for online streaming. I just wanted the "no ffmpeg" error to go away from the logs.
<<

khurram23

Serviio lover

Posts: 76

Joined: Sun Jun 24, 2012 10:25 pm

Post Thu Jan 03, 2013 9:35 pm

Re: FFMPEG in Linux

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.
Dropbox - Get 500MB bonus space.

My pre-compiled FFMPEG, X264 packages for Linux/Ubuntu - Dropbox
<<

Spadge

Serviio lover

Posts: 58

Joined: Sun Sep 23, 2012 5:22 pm

Post Thu Jan 03, 2013 9:44 pm

Re: FFMPEG in Linux

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.


I'm using ffmpeg from the PPA I linked to above. I'm not compiling software from source, I gave all that up when I stopped using FreeBSD as my server.

I run 12.10 on my desktop, but the server is 12.04 still.

Serviio should put up a PPA for their own serviio-friendly ffmpeg, or at least package up a .DEB.
<<

khurram23

Serviio lover

Posts: 76

Joined: Sun Jun 24, 2012 10:25 pm

Post Thu Jan 03, 2013 10:27 pm

Re: FFMPEG in Linux

I suppose that is not a bad idea. I could provide my pkg files for those who are interested and don't feel like compiling. Could setup a repo too...
Dropbox - Get 500MB bonus space.

My pre-compiled FFMPEG, X264 packages for Linux/Ubuntu - Dropbox
<<

Spadge

Serviio lover

Posts: 58

Joined: Sun Sep 23, 2012 5:22 pm

Post Thu Jan 03, 2013 10:33 pm

Re: FFMPEG in Linux

I think it's worth it. Make once, use many.

I'm sure that if Zip wanted to set up something official-like over at launchpad then there's plenty of us who would happily help maintain it, for free, as a payback gift to the community.

That way we could keep on top of updates to Serviio and ffmpeg and ubuntu support would be just that bit better for everyone.

So that's two volunteers so far ...
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Jan 04, 2013 11:05 am

Re: FFMPEG in Linux

Great, if you tell me what i have to do.
<<

abubin

Serviio lover

Posts: 80

Joined: Tue Jul 26, 2011 3:54 pm

Post Fri Jan 04, 2013 3:06 pm

Re: FFMPEG in Linux

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.


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.
<<

khurram23

Serviio lover

Posts: 76

Joined: Sun Jun 24, 2012 10:25 pm

Post Fri Jan 04, 2013 7:29 pm

Re: FFMPEG in Linux

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.


You do realize, all packages are compiled by someone then uploaded to repo right?

I have always found the reverse to be true, but I suppose to each his own. That's not saying I compile every single thing, only when I need to.
Dropbox - Get 500MB bonus space.

My pre-compiled FFMPEG, X264 packages for Linux/Ubuntu - Dropbox
<<

Spadge

Serviio lover

Posts: 58

Joined: Sun Sep 23, 2012 5:22 pm

Post Fri Jan 04, 2013 9:23 pm

Re: FFMPEG in Linux

zip wrote:Great, if you tell me what i have to do.


I will look into it this weekend. I've never set up a PPA before :)
<<

Spadge

Serviio lover

Posts: 58

Joined: Sun Sep 23, 2012 5:22 pm

Post Sat Jan 05, 2013 4:42 pm

Re: FFMPEG in Linux

zip wrote:Great, if you tell me what i have to do.


I tried to PM you some instructions, but it won't let me send.

If you want a PPA for Ubuntu ffmpeg Serviio-style, go here: https://help.launchpad.net and create a login. Set up a team called something like Serviio-Extras or whatever. Add me to the team and I will pick it up from there.

That way you retain ownership of the whole thing and can add/remove your helpers as and when needs must.

Cheers
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Jan 05, 2013 7:28 pm

Re: FFMPEG in Linux

Done, hopefully I picked the right Spadge :-)
<<

Spadge

Serviio lover

Posts: 58

Joined: Sun Sep 23, 2012 5:22 pm

Post Sat Jan 05, 2013 9:31 pm

Re: FFMPEG in Linux

I think I'm sfromley on there ;)

https://launchpad.net/~sfromley
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Jan 06, 2013 12:26 am

Re: FFMPEG in Linux

done
<<

khurram23

Serviio lover

Posts: 76

Joined: Sun Jun 24, 2012 10:25 pm

Post Mon Jan 07, 2013 3:45 am

Re: FFMPEG in Linux

I can help as well, add me if you like.
Dropbox - Get 500MB bonus space.

My pre-compiled FFMPEG, X264 packages for Linux/Ubuntu - Dropbox
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Mon Jan 07, 2013 3:56 am

Re: FFMPEG in Linux

Look at this link it had a script that installs and updated ffmpeg.

viewtopic.php?t=8671
ubuntu FFMPEG X264 install / upgrade script

You might be able to use this as a base.

Sent from my DROID RAZR using Tapatalk 2
Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Jan 07, 2013 1:07 pm

Re: FFMPEG in Linux

khurram23 wrote:I can help as well, add me if you like.

Thaks, added
<<

thenamelessthing

User avatar

DLNA master

Posts: 126

Joined: Tue Dec 04, 2012 4:45 am

Location: Canada

Post Thu Jan 10, 2013 6:14 pm

Re: FFMPEG in Linux

hi! I'm really interested by an ubuntu repo. At least for the LTS version. If I can help, I will be glad to give an helping hand.
My Setup : BDT220 Panasonic Bluray player, TC-L55ET5 and TC-L42ET5 Panasonic TV. My home media server run Serviio 1.4.2 Pro under GNU/Linux Ubuntu 14.04 LTS server x64 and the hardware is Amd 1045t Phenom II X6, 6Gb DDR3 1333 mhz on SSD and data on soft raid 5 (3x1tb).
Next

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 89 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.