avconv settings for replacing ffmpeg in Ubuntu

Need help? Post your questions here.

Moderator: moderators

avconv settings for replacing ffmpeg in Ubuntu

Postby jeremyh » Fri Nov 02, 2012 3:49 pm

I have not been following the issues with ffmpeg and avconv forking, but the ubuntu build seems to have deprecated ffmpeg in favor of avconv. So I decided to post the settings I am using for avconv in case anyone is having conversion issues.

Although the avconv syntax is almost the same as ffmpeg there are few changes (changed bitrate from -ab to -b, the quality from -v to -q. The default output for avconv seemed pretty verbose, so I added -loglevel error):

New Subsonic Settings:
Name: mp3 audio
Convert From: ogg oga aac m4a flac wav wma aif aiff ape mpc shn
Convert To: mp3
Step 1: avconv -i %s -b %bk -q 0 -loglevel error -f mp3 -
Step 2 is blank since its not needed.

Here is an explanation of the switches to help anyone understand:
-i %s (take the input from the file stream %s)
-b %bk (set the bitrate to the variable %b and add a k since the bitrate is in thousands, ie "128k")
-q 0 (set the quality to the best, this value varies from 0 to 31, with 31 being the worst. Could lower if your machine processor sucked)
-loglevel error (set the output logging level to errors only)
-f mp3 (set the output format to mp3)
- (direct the output to the pipe so that it can be streamed to the player)

NOTE: I noticed m4a transcoding was not working and was giving the error "Encoder (coded id 0) not found for output stream #0:0" error message in the log. This was due to the upgraded Ubuntu not having all the transcoders by default (because they are restricted by law without a license). In order to install those transcoders, one should install the "ubuntu-restricted-extras" package in the Ubuntu Software Center. This will load transcoders needed to do many of the audio format conversions you might have.
Posts: 49
Joined: Thu Feb 05, 2009 12:01 am
Location: Westminster, Colorado, United States

Re: avconv settings for replacing ffmpeg in Ubuntu

Postby delcroip » Sun Dec 22, 2013 10:40 am

Thank you for your post,

I tried to complete it with my config ( it look like it works ):

Transcoding flv/h264 Step 1 :
avconv -ss %o -i %s -async 1 -b %bk -s %wx%h -c:a libmp3lame -ar 44100 -ac 2 -v debug -f flv -c:v libx264 -preset superfast -threads 0 -

Downsample command
avconv -i %s -b %bk -v 0 -f mp3 -

HTTP live streaming command
avconv -ss %0 -t %d -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f mpegts -vcodec libx264 -preset superfast -acodec libmp3lame -threads 0 -

Posts: 1
Joined: Sun Dec 22, 2013 10:35 am

Return to Help

Who is online

Users browsing this forum: No registered users and 9 guests