How To Fix ffmpeg

Tutorials, tips and tricks.

Moderator: moderators

How To Fix ffmpeg

Postby Commodore » Wed Apr 24, 2013 2:22 am

So, I've noticed in the last two versions at least (4.7 and 4.8 for sure; I don't recall if this was an issue in 4.6) that some FLAC files will not stream properly through the web interface. The file will transcode, but will not start playing until scrubbing past the first second of the track. This gets pretty obnoxious, but I figured out that it's a problem with the version of ffmpeg supplied with subsonic.

So, here's how I fixed it on my server, which is running Ubuntu 10.04, but this should work on any Ubuntu system certainly, likely any Debian system, and substituting the package manager commands for appropriate ones, likely any other Linux system as well.

This requires the "multiverse" repositories to be enabled on Ubuntu (in my case, lucid/multiverse, lucid-updates/multiverse and lucid-security/multiverse)

Code: Select all
sudo apt-get install ffmpeg libavcodec-extra-52 libavdevice-extra-52 libavfilter-extra-0 libavformat-extra-52 libavutil-extra-49 libpostproc-extra-51 libswscale-extra-0


now either remove or rename the shipped ffmpeg package:
Code: Select all
sudo mv /var/subsonic/transcode/ffmpeg /var/subsonic/transcode/ffmpeg-bak


and symlink in the system one:

Code: Select all
sudo ln -s `which ffmpeg` /var/subsonic/transcode/ffmpeg


and you're done!
Commodore
 
Posts: 3
Joined: Tue Nov 20, 2012 2:01 pm

Re: How To Fix ffmpeg

Postby Mawazi » Fri Jan 03, 2014 8:20 pm

I was experiencing the same issue with FLAC to MP3 transcoding. I did some research and experimenting and came up with the following ffmpeg command:

ffmpeg -i %s -ab 320k -id3v2_version 3 -map_metadata 0 -map 0:0 -ar 44100 -ac 2 -v 0 -f mp3 -

It seems the problem that I was experiencing had something to do with the ID3 tags. FFMPEG defaults to ID3v2.4 tags now.
Of course, the problem could have been something else that just happened to be fixed by something in that command sequence. :-)
Mawazi
 
Posts: 3
Joined: Wed Dec 15, 2010 12:43 am

Re: How To Fix ffmpeg

Postby Mawazi » Fri Jan 03, 2014 8:23 pm

Mawazi wrote:I was experiencing the same issue with FLAC to MP3 transcoding. I did some research and experimenting and came up with the following ffmpeg command:

ffmpeg -i %s -ab 320k -id3v2_version 3 -map_metadata 0 -map 0:0 -ar 44100 -ac 2 -v 0 -f mp3 -

It seems the problem that I was experiencing had something to do with the ID3 tags. FFMPEG defaults to ID3v2.4 tags now.
Of course, the problem could have been something else that just happened to be fixed by something in that command sequence. :-)


Oh, I forgot one other thing that this changed. It seemed that FFMPEG was encoding a very small video stream by default, so the -map 0:0 drops the video stream during the transcoding process.
Mawazi
 
Posts: 3
Joined: Wed Dec 15, 2010 12:43 am


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 17 guests