Become a Site Supporter and Never see Ads again!

Author Topic: FLAC Commandline Question  (Read 699 times)

0 Members and 1 Guest are viewing this topic.

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1580
  • 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

  • Archivist: Camper Van Beethoven & Cracker
  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 2409
  • Get in touch if you wanna record Cracker or CVB!
    • Soundscape Preservation Society
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).
Teams: Neumann, Bay Area Tapers, Multitrack, Pioneertown Tapers, Mac Geeks, Cassette Masters, Poster Collectors, Alumni of teams St Louis, Upper Midwest & Milwaukee / Southern Wisco

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1580
  • 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

  • Archivist: Camper Van Beethoven & Cracker
  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 2409
  • Get in touch if you wanna record Cracker or CVB!
    • Soundscape Preservation Society
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.
Teams: Neumann, Bay Area Tapers, Multitrack, Pioneertown Tapers, Mac Geeks, Cassette Masters, Poster Collectors, Alumni of teams St Louis, Upper Midwest & Milwaukee / Southern Wisco

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1580
  • 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: (15)
  • Needs to get out more...
  • *****
  • Posts: 10053
  • 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?
Mics: Neumann ak40 > Nick mod lc3 > Naiant PFA, km140, CA-11 Omni
Pres: Audioroot Femto, CA 9200
Recorders: Sony PCM-M10, Tascam DR-70D

http://www.archive.org/bookmarks/gordonlw

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1580
  • 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: (15)
  • Needs to get out more...
  • *****
  • Posts: 10053
  • 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 ;)
Mics: Neumann ak40 > Nick mod lc3 > Naiant PFA, km140, CA-11 Omni
Pres: Audioroot Femto, CA 9200
Recorders: Sony PCM-M10, Tascam DR-70D

http://www.archive.org/bookmarks/gordonlw

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1580
  • 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

  • Archivist: Camper Van Beethoven & Cracker
  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 2409
  • Get in touch if you wanna record Cracker or CVB!
    • Soundscape Preservation Society
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?
 :-\
Teams: Neumann, Bay Area Tapers, Multitrack, Pioneertown Tapers, Mac Geeks, Cassette Masters, Poster Collectors, Alumni of teams St Louis, Upper Midwest & Milwaukee / Southern Wisco

Offline admkrk

  • Trade Count: (0)
  • Taperssection All-Star
  • ****
  • Posts: 1580
  • 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.143 seconds with 33 queries.
© 2002-2017 Taperssection.com
Powered by SMF
Website Design by Foxtrot Media, Inc., a Baltimore Website Company