Skip to main content
Topic: ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6 (Read 633 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6

I've been experimenting with the ffmpeg decoder wrapper and discovered some problems involving ReplayGain scanning.

When the ffmpeg decoder wrapper is configured to decode DTS files and save APE tags, the tags are saved normally when converting a file to DST (I'm using ffdcaenc) but if you later run a ReplayGain scan on the DTS file and save the data, there's no error message but no data is saved.

When the ffmpeg decoder wrapper is decoding AC3 files and configured to save APE tags, running a ReplayGain scan results in an "invalid data" error when the AC3 file in question already contains APE tags (whether they were written by the ffmpeg decoder wrapper or not). If it has no tags and the ffmpeg decoder wrapper is decoding (and configured to save APE tags), once again fb2k appears to save the ReplayGain data but nothing is saved.

For both DTS and AC3, if the ffmpeg decoder wrapper is not configured to write tags, when trying to save ReplayGain info, fb2k does offer an appropriate error message, explaining it can't save tags for the format in question, but while I haven't done further testing with other file types, it appears the ReplayGain scanner can't save ReplayGain info when the audio is being decoded by the ffmpeg decoder wrapper and it's configured to write the tags. Instead, the saving of ReplayGain info silently fails.

Thanks.

Re: ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6

Reply #1
Some additional info, at least for DST.

If the ffmpeg decoder wrapper is set to decode DTS, configured not to save tags, and the wrapper is higher than foo_input_dts in the Decoders list (foo_input_dts enabled), fb2k appears to use the wrapper for decoding DTS but the saving of ReplayGain info works as expected.

If I do the same as above but with the wrapper set to save APE tags, the saving of ReplayGain info silently fails.

I don't know how much of that is expected behaviour.

Cheers.

Re: ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6

Reply #2
I seem unable to reproduce this. ReplayGain tag writing works fine. But reading any written tags back requires me to force foobar2000 to reload info.

Re: ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6

Reply #3
It looks like you're correct.

The problem is, I was removing the DTS file from the playlist and loading it again, thinking that'd cause fb2k to reload the tag data, but it doesn't. In order to get it to see the ReplayGain data it's written, I have to Right Click/Properties, click on Tools, then Reload Info. Is there an easier way?

I assume fb2k must be doing some sort of caching of data, given even after reloading a file back into a playlist it still doesn't read the ReplayGain info until you manually tell it to reload the info. It seems a bit odd to me that it'd work that way.

Edit: I guess it must be doing some caching, or not rechecking, as if I remove the DTS file in question from the playlist, restart fb2k and then reload the DTS file, it sees the ReplayGain data without me having to do anything, aside from all of that. :)

How about the problem I mentioned with AC3? I can't run a ReplayGain scan on an AC3 file with the ffmpeg decoder wrapper decoding without it resulting in an invalid data error. I've tried two different versions of ffmpeg and ffprobe. As I run XP, the version of ffmpeg I've been using is the one dated 2018-02-04 from here.
https://sourceforge.net/projects/mplayer-win32/files/FFmpeg/
Edit.... Seems there's a newer version dated 2018-02-18. Tried it, but still the same problem with AC3 files.

Thanks.

Re: ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6

Reply #4
I can't run a ReplayGain scan on an AC3 file with the ffmpeg decoder wrapper decoding without it resulting in an invalid data error.
Try to add -loglevel 0 to "Additional arguments" for ffmpeg. If there is -i %s in "Additional arguments", -loglevel 0 should be specified before -i %s

Re: ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6

Reply #5
I can't run a ReplayGain scan on an AC3 file with the ffmpeg decoder wrapper decoding without it resulting in an invalid data error.
Try to add -loglevel 0 to "Additional arguments" for ffmpeg. If there is -i %s in "Additional arguments", -loglevel 0 should be specified before -i %s

That seemed to fix it. Thanks.

Not that I think I care for AC3 or DTS, but would this be a padding issue? I just picked a random FLAC file and converted to AC3 and DTS, then noted the number of samples reported by fb2k while switching decoders and restarting fb2k.

Original: 4:49.133 (12 750 757 samples)
AC3 decoded by foo_ac3: 4:49.228 (12 754 944 samples)
DTS decoded by foo_input_dts: 4:49.146 (12 751 360 samples)
AC3 decoded by ffmpeg: 4:49.161 (12 752 009 samples)
DTS Decoded by ffmpeg: 4:49.522 (12 767 899 samples)

Cheers.

Re: ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6

Reply #6
The tag reading issue is fixed in the latest version of the component.

 

Re: ffmpeg decoder wrapper, ReplayGain scanning, fb2k1.4 b6

Reply #7
Awesome!
Thank you!

Edit: I just gave the new version a try & it's definitely reading tags normally now.

Thanks again!

 
SimplePortal 1.0.0 RC1 © 2008-2019