Become a Site Supporter and Never see Ads again!

Author Topic: FLAC Commandline Question  (Read 3904 times)

0 Members and 1 Guest are viewing this topic.

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1733
  • I'm an idiot
FLAC Commandline Question
« on: February 20, 2017, 02:05:03 PM »
I am probably overlooking something really simple, but...

flac *.wav outputs to the same directory, but I want to redirect the output to a different directory. The -o switch will do that, but it seems to only work on one file at a time. "Just use TLH" is not the solution I am looking for, before anyone suggests that.

Thanks
"the faster you go ahead, the behinder you get"

"If you can drink ram's piss, fuck, you can drink anything"

Offline morst

  • I think I found an error on the internet; #UnionStrong
  • Trade Count: (2)
  • Needs to get out more...
  • *****
  • Posts: 5944
Re: FLAC Commandline Question
« Reply #1 on: February 20, 2017, 02:37:49 PM »
I have never used it from the command line but the man page suggests this option?
https://linux.die.net/man/1/flac
Quote
--output-prefix=string
Prefix each output file name with the given string. This can be useful for encoding or decoding files to a different directory. Make sure if your string is a path name that it ends with a trailing '/' (slash).
https://toad.social/@morst spoutible.com/morst post.news/@acffhmorst

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1733
  • I'm an idiot
Re: FLAC Commandline Question
« Reply #2 on: February 20, 2017, 04:17:35 PM »
Thanks, not sure how I missed that, and it sounds like it should work. Unfortunately it is erroring out for me on the first file
Quote
devon2016-04-14t01.wav: ERROR initializing encoder
                        init_status = FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_E
RROR
                        state = FLAC__STREAM_ENCODER_IO_ERROR

An error occurred opening the output file; it is likely that the output
directory does not exist or is not writable, the output file already exists and
is not writable, or the disk is full.
I am going to have to look up the error code to get a better idea of what the problem is, because the suggestions are not true.

I have never used it from the command line but the man page suggests this option?
https://linux.die.net/man/1/flac
Quote
--output-prefix=string
Prefix each output file name with the given string. This can be useful for encoding or decoding files to a different directory. Make sure if your string is a path name that it ends with a trailing '/' (slash).
"the faster you go ahead, the behinder you get"

"If you can drink ram's piss, fuck, you can drink anything"

Offline morst

  • I think I found an error on the internet; #UnionStrong
  • Trade Count: (2)
  • Needs to get out more...
  • *****
  • Posts: 5944
Re: FLAC Commandline Question
« Reply #3 on: February 20, 2017, 05:15:37 PM »
Did you create the new directory first? And the target drive is not full?

An error occurred opening the output file; it is likely that the output directory does not exist or is not writable, the output file already exists and
is not writable, or the disk is full.
https://toad.social/@morst spoutible.com/morst post.news/@acffhmorst

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1733
  • I'm an idiot
Re: FLAC Commandline Question
« Reply #4 on: February 20, 2017, 05:47:24 PM »
Yes. It worked with
Quote
flac -o H:\temp\temp\devon2016-04-14t01.flac H:\temp\devon2016-04-14t01.wav
But I get the error with
Quote
flac H:\temp\*.wav --output-prefix=H:\temp\temp/
I tried with the trailing slash the other way, and without it. Putting the switch before the source did not work either.

And yes, I deleted first converted file before trying it. I just tried again with the -o switch and the wildcard, both worked as expected.


Did you create the new directory first? And the target drive is not full?

An error occurred opening the output file; it is likely that the output directory does not exist or is not writable, the output file already exists and
is not writable, or the disk is full.
"the faster you go ahead, the behinder you get"

"If you can drink ram's piss, fuck, you can drink anything"

Offline Gordon

  • Trade Count: (22)
  • Needs to get out more...
  • *****
  • Posts: 11780
  • Gender: Male
    • my list
Re: FLAC Commandline Question
« Reply #5 on: February 20, 2017, 08:34:02 PM »
If on windows why not use traders little helper?
Microtech Gefell M20 or M21 > Nbob actives > Naiant PFA > Sound Devices MixPre-6 II @ 32/48

https://archive.org/details/fav-gordonlw

https://archive.org/details/teamdirtysouth

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1733
  • I'm an idiot
Re: FLAC Commandline Question
« Reply #6 on: February 20, 2017, 09:34:19 PM »
The purpose of the project I am working on is to develop a front end to FLAC, or in other words, it is a programming project. This is an exercise, for me, to learn how to do something I have not done before, or at least not well (I made a simple IDE, for a school project, but it had problems). I could always move the files, after they are created, but that does not seem very efficient, if I can get FLAC to just do it originally. Looping through the -o switch would be better, but not by much. Because I have always used programs like TLH and Flacfrontend, I am not familiar with the command line arguments.   

If on windows why not use traders little helper?
"the faster you go ahead, the behinder you get"

"If you can drink ram's piss, fuck, you can drink anything"

Offline Gordon

  • Trade Count: (22)
  • Needs to get out more...
  • *****
  • Posts: 11780
  • Gender: Male
    • my list
Re: FLAC Commandline Question
« Reply #7 on: February 20, 2017, 11:08:31 PM »
"Just use TLH" is not the solution I am looking for, before anyone suggests that.

Thanks

Sorry missed that or I wouldn't have posted that ;)
Microtech Gefell M20 or M21 > Nbob actives > Naiant PFA > Sound Devices MixPre-6 II @ 32/48

https://archive.org/details/fav-gordonlw

https://archive.org/details/teamdirtysouth

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1733
  • I'm an idiot
Re: FLAC Commandline Question
« Reply #8 on: February 21, 2017, 01:15:14 AM »
No worries, I said that in order to avoid typing out my last response.  :banging head: :cheers:

"the faster you go ahead, the behinder you get"

"If you can drink ram's piss, fuck, you can drink anything"

Offline morst

  • I think I found an error on the internet; #UnionStrong
  • Trade Count: (2)
  • Needs to get out more...
  • *****
  • Posts: 5944
Re: FLAC Commandline Question
« Reply #9 on: February 21, 2017, 01:51:12 PM »
No worries, I said that in order to avoid typing out my last response.  :banging head: :cheers:
But you don't mind typing in a whole program to be a UI where they already exist?
 :-\
https://toad.social/@morst spoutible.com/morst post.news/@acffhmorst

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1733
  • I'm an idiot
Re: FLAC Commandline Question
« Reply #10 on: February 21, 2017, 03:56:49 PM »
Explaining my intent is not relevant to the question, and I am still looking for an answer. A short sentence stating I was aware of existing programs was cleaner than writing a whole paragraph of explanation. I also do not write code like this:
Code: [Select]
// Add a and b, then store the result in c
c = a + b;
"the faster you go ahead, the behinder you get"

"If you can drink ram's piss, fuck, you can drink anything"

 

RSS | Mobile
Page created in 0.063 seconds with 36 queries.
© 2002-2024 Taperssection.com
Powered by SMF