HydrogenAudio

Lossless Audio Compression => WavPack => Topic started by: BearcatSandor on 2020-03-18 19:26:46

Title: Converting with FFMPEG, parallel, and allowing huge files
Post by: BearcatSandor on 2020-03-18 19:26:46
I tried @DaemonFC 's solution (Topic: Is there an easy way to do FLAC<>WavPack on Linux? (https://hydrogenaud.io/index.php?topic=117602.0)) to batch convert flac files to wavpack and that works well, so thank you for that! However, I need wavpack files that have the --allow-huge-tags option.  Is there any way to pass that encoder option to ffmpeg?  I know I can just do a wavpack --allow-huge-files [...] on the files after the fact, but that's extra processing.

Secondly, when using the --bar option with parallel, if I don't pass --loglevel info (the default) to ffmpeg it seems to hang on me. As well I get a lot of extra, well, info that i don't want. I don't assume there is a way to get ffmpeg to go quiet and get a progress from parallel? It almost seems that parallel is reading it's progress based on the ffmpeg output, which doesn't make any sense to me.
Title: Re: Converting with FFMPEG, parallel, and allowing huge files
Post by: bryant on 2020-03-21 02:37:10
I tried @DaemonFC 's solution (Topic: Is there an easy way to do FLAC<>WavPack on Linux? (https://hydrogenaud.io/index.php?topic=117602.0)) to batch convert flac files to wavpack and that works well, so thank you for that! However, I need wavpack files that have the --allow-huge-tags option.  Is there any way to pass that encoder option to ffmpeg?  I know I can just do a wavpack --allow-huge-files [...] on the files after the fact, but that's extra processing.
The --allow-huge-tags option is not really a characteristic of WavPack files per se, so it's not something that can be set or unset. It's just a one time flag saying it's okay to create or edit a tag right now that contains more than 1 MB of data.

I experimented (and searched a little online) and figured out that FFmpeg cannot put cover art on WavPack files at all, so that option is a little meaningless with FFmpeg. So you'll need to append the cover art with the wvtag command-line (using --allow-huge-tags if the files are big) or use Foobar2000 perhaps (not sure what size limitations it forces).

As for the second part of your question, I really don't have any experience with using FFmpeg in scripts. Sorry!
Title: Re: Converting with FFMPEG, parallel, and allowing huge files
Post by: smok3 on 2020-03-22 14:00:40
Secondly, when using the --bar option with parallel, if I don't pass --loglevel info (the default) to ffmpeg it seems to hang on me. As well I get a lot of extra, well, info that i don't want. I don't assume there is a way to get ffmpeg to go quiet and get a progress from parallel? It almost seems that parallel is reading it's progress based on the ffmpeg output, which doesn't make any sense to me.
Add something like
Code: [Select]
-nostats -loglevel 0
to ffmpeg cli. Also looking at some scripts I seem to have this at the ffmpeg end
Code: [Select]
</dev/null 
# </dev/null is some sort of null input, so that script will work when in bg as well
Title: Re: Converting with FFMPEG, parallel, and allowing huge files
Post by: BearcatSandor on 2020-03-29 19:41:40
Thank  you both @smok3  and @bryant.  That was both informative and very helpful. I appreciate it! I have beets handling the cover art so I'm all set for that. 

I'll play with the loglevel, but again, messing with that seemed to make 'progress' hang.  I bet the redirect to /dev/null will do it.