IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Command-Line Decoder Wrapper, New official component
Peter
post Oct 11 2012, 10:01
Post #1


foobar2000 developer


Group: Admin
Posts: 3314
Joined: 30-September 01
Member No.: 84



Summary
This component allows you to comfortably play or convert any audio format with a standalone command-line decoder available, including various exotic formats that do not have native foobar2000 decoder components.
Check the documentation link below for more details.

Links
Home page
Documentation

Have fun.
Go to the top of the page
+Quote Post
Peter
post Oct 11 2012, 10:10
Post #2


foobar2000 developer


Group: Admin
Posts: 3314
Joined: 30-September 01
Member No.: 84



Attached: configuration file (work-in-progress), thanks to Case
Currently supported formats:
* LA
* LPAC

You can import this thru the preferences page.
Attached File(s)
Attached File  dec.xml ( 380bytes ) Number of downloads: 479
 
Go to the top of the page
+Quote Post
CoRoNe
post Oct 11 2012, 20:15
Post #3





Group: Members
Posts: 187
Joined: 31-May 05
From: Netherlands
Member No.: 22417



Thanks a lot. No problems playing LA-files.
BUT, I have this habit of putting the version number in the file name like this: la (Lossless Audio Compressor 0.4b).exe.
Where as la.exe -cout %s (with the binary renamed accordingly of course) works just fine, "la (Lossless Audio Compressor 0.4b).exe" -cout %s does not. Entering the full path of the binary, "D:\Storage\Media\Binaries\la (Lossless Audio Compressor 0.4b).exe" -cout %s seems to be the only way to get it working.


--------------------
DC-Bass Source Mod: http://reino.degeelebosch.nl
Go to the top of the page
+Quote Post
Peter
post Oct 11 2012, 21:58
Post #4


foobar2000 developer


Group: Admin
Posts: 3314
Joined: 30-September 01
Member No.: 84



New version out, misbehavior on space in exe file name fixed. Thanks for reporting.
Go to the top of the page
+Quote Post
Anakunda
post Oct 12 2012, 13:31
Post #5





Group: Members
Posts: 484
Joined: 24-November 08
Member No.: 63072



Hi!

Thank you for versatile decoder. Curious if this could be somehow helpful in direct playing of DTS-HD and TrueHD audio files?
The command line for piped decoding is eac3to input.dtshd stdout.wav
The command line for non-piped decoding is eac3to %s %d this i'm afraid however generates a HUGE temp file in the source folder (expectingly 10-20gb in size) which also takes quite a long time before playbak start depending on the drive throughput. I want to avoid this and rather play via pipe ie. no temp wav files creating ....any thoughts..............

This post has been edited by Anakunda: Oct 12 2012, 13:42
Go to the top of the page
+Quote Post
Rollin
post Oct 12 2012, 17:50
Post #6





Group: Members
Posts: 196
Joined: 5-March 08
Member No.: 51815



Thanks for this component! smile.gif
Is it possible to add option to write mp4 tags?

QUOTE (Anakunda @ Oct 12 2012, 16:31) *
The command line for non-piped decoding is eac3to %s %d this i'm afraid however generates a HUGE temp file in the source folder (expectingly 10-20gb in size) which also takes quite a long time before playbak start depending on the drive throughput. I want to avoid this and rather play via pipe ie. no temp wav files creating ....any thoughts..............

I have no problems using eac3to.exe %s stdout.wav for dtshd 24/96 playback.
Go to the top of the page
+Quote Post
Peter
post Oct 12 2012, 21:20
Post #7


foobar2000 developer


Group: Admin
Posts: 3314
Joined: 30-September 01
Member No.: 84



QUOTE (Rollin @ Oct 12 2012, 18:50) *
Is it possible to add option to write mp4 tags?

If there's a scenario where that makes sense (MP4 files that are not decoded by the native MP4 handler - what file type exactly?), sure why not.
Go to the top of the page
+Quote Post
Rollin
post Oct 13 2012, 15:47
Post #8





Group: Members
Posts: 196
Joined: 5-March 08
Member No.: 51815



QUOTE (Peter @ Oct 13 2012, 00:20) *
MP4 files that are not decoded by the native MP4 handler - what file type exactly?

MPEG-4 ALS in MP4 container.

This post has been edited by Rollin: Oct 13 2012, 15:48
Go to the top of the page
+Quote Post
Peter
post Nov 9 2012, 10:31
Post #9


foobar2000 developer


Group: Admin
Posts: 3314
Joined: 30-September 01
Member No.: 84



Split.
Go to the top of the page
+Quote Post
romor
post Jan 16 2013, 03:53
Post #10





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



I wanted to provide example for decoding two files simultaneously, hopefully as some sort of temporal solution to a thread asking for lossywav correction playback. Then noticed that this component, same as converter, doesn't allow using title formatting functions for input line. Because of that I created batch file (soxdec.cmd):

CODE
@echo off
set input=%~1
sox -m %1 "%input:lossy.flac=lwcdf.flac%" -t .wav -

and instruct decoder to: "soxdec.cmd %s"

It works fine but sox process isn't terminated on playback stop.

If I use sox directly in decoder input line: "sox %s -t .wav -" then decoder closes sox process as expected.


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
EpicForever
post Feb 2 2013, 18:28
Post #11





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



I'm not sure weather this issue is caused by foo_input_exe or foo_dsp_effect so I post it in both threads, maybe authors will find what can be wrong.
My DSP chain looks like this: Skip Silence - > convert 5.1 to stereo -> convert mono to stereo -> playback rate shift. Playback Rate Shift requires 2ch signal. So used DSP effects provide such signal.
When I play 6ch FLAC encoded from DVD-A everything works OK. Signal is downmixed and I can use PRS actively or just unused, but present in chain. But when I play audio from video files and I use foo_input_exe to wrap signal decompressed by FFMPEG.exe from that files, then 6ch audio decoded from .VOB file generates error: "Unrecoverable playback error: Illegal number of channels". It means that Playback Rate Shift gets 6ch audio instead of 2ch - like "convert 5.1 to stereo" wasn't working or something like this... Why? What can I do to avoid this error in such playback configuration?
Go to the top of the page
+Quote Post
Rollin
post Feb 2 2013, 18:53
Post #12





Group: Members
Posts: 196
Joined: 5-March 08
Member No.: 51815



The reason is ffmpeg. Not foo_input_exe, not foo_dsp_effect and not "convert 5.1 to stereo dsp".
You can downmix with ffmpeg itself using -ac 2 or -channel_layout downmix
E.g.: ffmpeg.exe -i %s -vn -ac 2 -f wav -
ffmpeg.exe -i %s -vn -channel_layout downmix -f wav -

This post has been edited by Rollin: Feb 2 2013, 19:12
Go to the top of the page
+Quote Post
EpicForever
post Feb 2 2013, 20:24
Post #13





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Hm... I thought that it goes like this:
1. foobar sends command to ffmpeg to simply create PCM wav on my HDD
2. ffmpeg decodes audio, creates wav and lets foobar open it (sends output file name and path to foobar)
3. foobar simply plays wav from my HDD - like every other file - eg 6ch FLAC from DVD-A.
4. this implies that file (to be exact - decoded bitstream with audio) goes through consecutive chain of DSPs - like every other file - eg 6ch FLAC from DVD-A.
5. this implies that before Playback Rate Shift DSP is used, decoded audio should be 2ch bistream (downmixed from 5.1)...

Then why I have to downmix to 2ch before wav is opened in foobar? Or maybe I am wrong and something works differently when ffmpeg or foo_input_exe is used?
Go to the top of the page
+Quote Post
lvqcl
post Feb 2 2013, 20:50
Post #14





Group: Developer
Posts: 3468
Joined: 2-December 07
Member No.: 49183



Looks like "Convert 5.1 to stereo" plugin doesn't recognize the audio as 5.1.

I created a file with "6: FL FR FC LFE SL SR" channel mask and indeed it wasn't downmixed. A file with "6: FL FR FC LFE BL BR" channel mask was recognized as 5.1.

So, "Convert 5.1 to stereo" plugin doesn't like 5.1 with side channels.
Go to the top of the page
+Quote Post
EpicForever
post Feb 2 2013, 23:53
Post #15





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Hm... Maybe ffmpeg uses that "wrong" channel masks in output wav file... Then I have to choose between loading PRS to chain each time I want to use it or remove multichannel functionality in audio from video files by "hardcoding" it with appropiate command line switch in ffmpeg... Or - maybe I should post another "Request post" on foobar forum smile.gif . "Convert 5.1 to stereo" is part of standard DSP array, isn't it ? smile.gif

As foobar reads:
"Standard DSPs for foobar2000
© 2002-2012 Peter Pawlowski
Advanced limiter by MTRH
5.1 Downmix by Garf".
Go to the top of the page
+Quote Post
CoRoNe
post Feb 3 2013, 12:29
Post #16





Group: Members
Posts: 187
Joined: 31-May 05
From: Netherlands
Member No.: 22417



EpicForever: Although Rollin's suggestion works just fine for ffmpeg, you could give foo_channel_mixer a try as a permanent solution for Playback Rate Shift. Works in all cases; 6ch FLACs decoded by foobar itself and 6ch movie-clips by ffmpeg. I've been happily using foo_channel_mixer and Pitch Shift (foo_dsp_effect) for some time now myself.


--------------------
DC-Bass Source Mod: http://reino.degeelebosch.nl
Go to the top of the page
+Quote Post
Peter
post Feb 3 2013, 13:28
Post #17


foobar2000 developer


Group: Admin
Posts: 3314
Joined: 30-September 01
Member No.: 84



Channel order handling in downmix DSP changed in foobar2000 1.2.3.
Go to the top of the page
+Quote Post
EpicForever
post Feb 3 2013, 13:39
Post #18





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Peter - thank you for permanent (I hope smile.gif )workaround, CoRoNe - thank you for suggestion.

This post has been edited by EpicForever: Feb 3 2013, 13:40
Go to the top of the page
+Quote Post
mariner
post Jul 20 2014, 01:29
Post #19





Group: Members
Posts: 3
Joined: 20-July 14
Member No.: 116747



Good morning:

I have problems with packMP3 files (*.PMP): I can't seem to configure well the Command-Line Decoder Wraper, for I can't hear nothing when I open a .PMP. Here is my configuration:





(packMP3.exe is on the main folder of foobar)
A zero-bytes file is created when I try to play the archive. Also, I get this error within a pop-up window:

Unable to open item for playback (Unexpected decoding failure, no output file was created)

Can anybody help me? Excuse me if this is no place for this kind of questions!
Go to the top of the page
+Quote Post
lvqcl
post Jul 20 2014, 09:39
Post #20





Group: Developer
Posts: 3468
Joined: 2-December 07
Member No.: 49183



Try decode command:
CODE
packMP3.exe -
Go to the top of the page
+Quote Post
Case
post Jul 20 2014, 18:14
Post #21





Group: Developer (Donating)
Posts: 2296
Joined: 19-October 01
From: Finland
Member No.: 322



mariner, you need to create a simple wrapper batch file to be able to use packMP3. Put this command in the batch file (you can call it for example packmp3.cmd): @if not ."%~2" == ."" packmp3.exe -np - < "%~1" > "%~2"
and use this as Decode command: packmp3.cmd %s %d
Go to the top of the page
+Quote Post
mariner
post Jul 21 2014, 02:56
Post #22





Group: Members
Posts: 3
Joined: 20-July 14
Member No.: 116747



QUOTE (Case @ Jul 20 2014, 18:14) *
mariner, you need to create a simple wrapper batch file to be able to use packMP3. Put this command in the batch file (you can call it for example packmp3.cmd): @if not ."%~2" == ."" packmp3.exe -np - < "%~1" > "%~2"
and use this as Decode command: packmp3.cmd %s %d


Thanks for your responses, lvqcl & Case. And yes, that's how it finally works ok! I feel that it's very slow when processing songs (a big buffer timing helps a lot, but i refer to the whole process of decoding and the first song to play). But I suppose this is the fastest it can be, so there's nothing to worry about. I think I'm gonna compress most of my discography with packMP3, in order to save space.

Thank you very much, I was going mad with the syntax thing!
Go to the top of the page
+Quote Post
Skif_off
post Nov 8 2014, 12:33
Post #23





Group: Members
Posts: 14
Joined: 30-December 13
Member No.: 113654



How can I use folder foobar2000/encoders for decoders (for portable mode without full path)?
Go to the top of the page
+Quote Post
Skif_off
post Nov 30 2014, 16:29
Post #24





Group: Members
Posts: 14
Joined: 30-December 13
Member No.: 113654



I put ffmpeg.exe next to foobar2000.exe and it's solved the problem.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th December 2014 - 10:49