[4.9] FFMPEG + transcoding/downsample and possible bug

Need help? Post your questions here.

Moderator: moderators

[4.9] FFMPEG + transcoding/downsample and possible bug

Postby gorman » Tue Sep 16, 2014 10:49 am

Hi everybody. I've been using Subsonic for a couple of years now and I've just recently updated to 4.9 (previously remained with 4.5 for compatibility reasons with iSub).

Now, I'm using D-Sub and I would like to understand the following:

1) Is anybody aware of how to use external libraries with FFMPEG? The reason I ask is that I stream Vorbis files to D-Sub, through transcoding, and I'd like to take advantage of Lancer versions of the library, which are faster. I'm suspecting that the answer will be "not if you don't compile your own version" but it was worth asking.

2) Is it possible to disable completely the handling of mp3 downsampling, managing everything through the transcoding settings? As things stand now (and it was not like this on 4.5), it appears impossible to totally exclude the downsampling thing. If you leave it blank it just uses the transcoding available but ends up creating .mp3 files (which work on D-Sub but not on other players on smartphone), the same happens if you put a different command line in there.
As an example, if I place in Downsample command the following:

ffmpeg -v 0 -i %s -f ogg -vn -acodec libvorbis -ar 44100 -aq 3 -ac 2 -map_metadata 0:0 -

I get Vorbis files which have an mp3 extension (-f ogg notwithstanding, which should force the file format output). I guess this could be considered a bug.
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am

Re: [4.9] FFMPEG + transcoding/downsample and possible bug

Postby gorman » Tue Sep 16, 2014 9:57 pm

Hmmm... going on experimenting and now point 2 seems solved. I'm fairly sure I did what I just did yesterday but, still, now it works.

Added mp3 in the convert from list and deleted completely the downsample command line. Now files are properly named with extension .ogg. It's still not very intuitive to understand, though. Why should mp3s be by default given "special treatment". It's not as if mp3 provides better results when transcoded to lower bitrates mp3. Actually, from all I know, below a certain level, say 96kbps, there should be more efficient codecs (Vorbis but not only Vorbis, clearly).

Question #1 remains. I see the ffmpeg that gets installed is a July, 28 2011 build. Surely there must be something better/faster around. Is the ffmpeg build just a regular build or has it been customized specifically for Subsonic. Meaning: can it be swapped out for a more recent version, built with different libraries (such as the Lancer vorbis library I was mentioning)?
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am

Re: [4.9] FFMPEG + transcoding/downsample and possible bug

Postby gorman » Wed Sep 17, 2014 12:54 am

Talked too soon. It seems totally erratic.

With the same command line sometimes an mp3 file gets converted to an ogg file with mp3 extension, sometimes to an ogg file without replaygain tags copied over, sometimes they get copied over to the ogg file.

All with the same line, even on the same files.

The line is this:

ffmpeg -v 0 -i %s -f ogg -vn -acodec libvorbis -ar 44100 -aq 3 -ac 2 -map_metadata 0:0 -
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am

Re: [4.9] FFMPEG + transcoding/downsample and possible bug

Postby daneren2005 » Wed Sep 17, 2014 3:58 am

That particular issue is a problem with DSub. DSub caches the listing so it doesn't need to be refreshed each time. The problem with this is part of the listing is what format to convert to. If you are changing formats you can just wipe everything out and start from scratch. Settings -> Cache > Clear Cache will clear out both the songs you have downloaded and the app's internal cache.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: [4.9] FFMPEG + transcoding/downsample and possible bug

Postby gorman » Wed Sep 17, 2014 12:03 pm

Wow daneren2005, am I glad to have bought your app. Thanks so much for helping me out. Yes, it appears that this was the problem.

As far as replaygain tags not getting copied properly, it was a problem of how they were written on some of my mp3s (fixed that before reading your answer here).

As far as I understand and see, the following line is enough to get everything converted to Ogg Vorbis, leaving blank the "Downsample command" line in transcoding settings:

Name: ogg audio
Convert from: ogg mp3 oga aac m4a flac wav wma aif aiff ape mpc shn
Convert to: ogg
Step 1: ffmpeg -v 0 -i %s -f ogg -vn -acodec libvorbis -ar 44100 -aq 2 -ac 2 -

There appears to be no need to use the map_metadata argument, at least not for mp3 and flac files. And this gets through the replaygain values stored in the original files (which, due to transcoding might not be 100% accurate but probably 99% yes, which is plenty enough in my book).

Now, daneren... when do you think DSub could support replaygain in playback? (I know there's a subforum devoted to your application, just asking since we're having this "conversation" here :) ).

Also, in (hopefully) closing, I point out this FFMPEG build that includes the latest aoTuV tunings: http://opensourcepack.blogspot.de/p/ffmpeg-aotuv.html
This solves my problem #1 as, although I mentioned Lancer, what I was really after was the full aoTuV tunings, considering I plan on streaming at 96kbps.
gorman
 
Posts: 27
Joined: Tue Sep 16, 2014 10:34 am


Return to Help

Who is online

Users browsing this forum: No registered users and 3 guests