therealromster / flac2all Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/flac2all
Automatically exported from code.google.com/p/flac2all
Run flac2all (v3.38) with the option -t1
Traceback (most recent call last):
File "./flac2all_v3.38.py", line 758, in <module>
print "We are running %d simultaneous transcodes" % opts['threads']
TypeError: %d format: a number is required, not str
Add this line to fix it:
opts['threads'] = int(opts['threads'])
Original issue reported on code.google.com by nezvadovitz
on 23 Feb 2014 at 6:08
What steps will reproduce the problem?
1. using the program with flac files that have a : in the track title e.g.
./flac2all_v3.28.py mp3 flacdir/ -c -o MP3dir
2.
3.
What is the expected output? What do you see instead?
Track titles truncated at the first colon
What version of the product are you using? On what operating system?
v3.28 on Debian Wheezy
Please provide any additional information below.
The fix is in getflacmeta, by replacing:
datalist.append(string.split(data,":"))
with
datalist.append(string.split(data,":",1))
This will ensure the comment data parser only splits off up to the first colon.
Check out the track title in this metaflac dump, where the MP3 file title ended
up being "4" instead of "4:39am ...."
$ metaflac --list ../Music/Roger\ Waters/The\ Pros\ and\ Cons\ of\ Hitch\
Hiking/04.\ 4\:39am\ \(For\ The\ First\ Time\ Today\,\ Part\ 2\).flac
METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minimum blocksize: 4608 samples
maximum blocksize: 4608 samples
minimum framesize: 6453 bytes
maximum framesize: 15346 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 5404896
MD5 signature: f1bbdeb84c6991f240cf2e22df51a40e
METADATA block #1
type: 3 (SEEKTABLE)
is last: false
length: 216
seek points: 12
point 0: sample_number=0, stream_offset=0, frame_samples=4608
point 1: sample_number=446976, stream_offset=836197, frame_samples=4608
point 2: sample_number=898560, stream_offset=1635784, frame_samples=4608
point 3: sample_number=1350144, stream_offset=2647529, frame_samples=4608
point 4: sample_number=1797120, stream_offset=3856226, frame_samples=4608
point 5: sample_number=2248704, stream_offset=4978619, frame_samples=4608
point 6: sample_number=2700288, stream_offset=6210121, frame_samples=4608
point 7: sample_number=3151872, stream_offset=7483671, frame_samples=4608
point 8: sample_number=3598848, stream_offset=8439309, frame_samples=4608
point 9: sample_number=4050432, stream_offset=9423708, frame_samples=4608
point 10: sample_number=4502016, stream_offset=10441031, frame_samples=4608
point 11: sample_number=4953600, stream_offset=11447905, frame_samples=4608
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 225
vendor string: reference libFLAC 1.1.2 20050205
comments: 7
comment[0]: TITLE=4:39am (For The First Time Today, Part 2)
comment[1]: ARTIST=Roger Waters
comment[2]: ALBUM=The Pros and Cons of Hitch Hiking
comment[3]: DATE=1983
comment[4]: TRACKNUMBER=04
comment[5]: TRACKTOTAL=12
comment[6]: GENRE=Soundtrack
METADATA block #3
type: 1 (PADDING)
is last: true
length: 4078
Great program BTW! Very useful for making MP3s for the car stereo.
Original issue reported on code.google.com by [email protected]
on 24 Sep 2013 at 4:12
Investigate use of mutagen tagging library for better tag support (including
embedded graphics) in flac2all
* If good for our needs, to be implemented in v4
* http://mutagen.readthedocs.org/en/latest/
Original issue reported on code.google.com by [email protected]
on 13 Jan 2015 at 4:22
This is more of a feature request:
Can you include an option to skip defined files?
I can try to add this option myself, if I get somewhere I’ll upload the
script here.
Original issue reported on code.google.com by [email protected]
on 8 Nov 2012 at 7:27
Add support for the new IETF audio codec, opus, with encoder support from
opusenc.
Original issue reported on code.google.com by [email protected]
on 30 Oct 2012 at 2:02
I get an exception all the time, the files are fine though:
Exception in thread Thread-118:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 808, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 761, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/sbin/flac2all", line 595, in encode_thread
mp3Class.mp3convert(opts['lameopts'],current_file,outfile)
File "/usr/local/sbin/flac2all", line 509, in mp3convert
decoder.flush() #if there is any data left in the buffer, clear it
IOError: [Errno 9] Bad file descriptor
This can be fixed by changing
decoder = os.popen(flacpath + "flac -d -s -c " + shell().parseEscapechars(infile),'rb',1024)
to
decoder = os.popen(flacpath + "flac -d -s -c " + shell().parseEscapechars(infile),'w+b',1024)
Original issue reported on code.google.com by [email protected]
on 8 Feb 2014 at 4:06
What steps will reproduce the problem?
1. try to convert a flac file with tags in metadata block 1
2.
3.
What is the expected output? What do you see instead?
tags present in metadata block 1 should be copied in mp3 file
What version of the product are you using? On what operating system?
v3.38.py on fedora 19
Please provide any additional information below.
example of flac file with data on metadata block 1
[bernard@localhost Test]$ metaflac --list "01 - Track 1.flac"
METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minimum blocksize: 4608 samples
maximum blocksize: 4608 samples
minimum framesize: 14 bytes
maximum framesize: 10943 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 24784200
MD5 signature: 7d12bc221cef253fbfd9e750e5c75486
METADATA block #1
type: 4 (VORBIS_COMMENT)
is last: false
length: 568
vendor string: GStreamer encoded vorbiscomment
comments: 16
comment[0]: playcount:[email protected]=2
comment[1]: compilation=0
comment[2]: musicbrainz_discid=ZYzLf7n1gb9dJs3TbhvooCODBQk-
comment[3]: genre=Classical
comment[4]: replaygain_track_peak=0.000000
comment[5]: album=Daniel Barenboim 50 years of performance
comment[6]: replaygain_album_gain=0.000000
comment[7]: discid=8310af09
comment[8]: title=Piano Sonata No.8 "Pathétique" Grave: Allegro di molto e con brio
comment[9]: artist=Ludwig Van Beethoven
comment[10]: replaygain_track_gain=0.000000
comment[11]: artistsort=Beethoven Ludwig Van
comment[12]: replaygain_album_peak=0.000000
comment[13]: tracknumber=1
comment[14]: tracktotal=9
comment[15]: discnumber=2
METADATA block #2
type: 1 (PADDING)
is last: true
length: 4016
Original issue reported on code.google.com by [email protected]
on 24 Jun 2014 at 9:17
What steps will reproduce the problem?
1. using the program with certain (non-compliant?) flac files e.g.
./flac2all_v3.28.py mp3 flacdir/ -c -o MP3dir
2.
3.
What is the expected output? What do you see instead?
The output files have no tags other than LAME automatic setting the genre tag
to "Other".
What version of the product are you using? On what operating system?
v3.28 on Debian Wheezy
Please provide any additional information below.
The fix for me was to remove the "--block-number 2" argument to metaflac. It
doesn't seem to be causing any other problems that I can see.
Here is the metaflac output for 1 affected file:
$ metaflac --list ../Music/Midge\ Marsden/Burning\ Rain/01.\ Burning\ Rain.flac
METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minimum blocksize: 1152 samples
maximum blocksize: 1152 samples
minimum framesize: 14 bytes
maximum framesize: 4555 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 10054212
MD5 signature: af24d2c3f4afbd0802b723bb4302ed5c
METADATA block #1
type: 4 (VORBIS_COMMENT)
is last: false
length: 219
vendor string: reference libFLAC 1.2.1 20070917
comments: 9
comment[0]: TITLE=Burning Rain
comment[1]: ARTIST=Midge Marsden
comment[2]: ALBUM=Burning Rain
comment[3]: DATE=1991
comment[4]: TRACKNUMBER=01
comment[5]: TRACKTOTAL=18
comment[6]: GENRE=R&B
comment[7]: METADATAPROVIDER=User
comment[8]: graphic_front_cover+=
METADATA block #2
type: 1 (PADDING)
is last: true
length: 210
Original issue reported on code.google.com by [email protected]
on 24 Sep 2013 at 4:04
What steps will reproduce the problem?
1. Try to convert flac files with unsupported genre to mp3
What is the expected output? What do you see instead?
Expected: Flac file converted to mp3 with correct tagging (and "Other" for the
genre when it was not supported)
What happens:The flac files with unsupported genre are not tagged properly, all
fields are set to "unknown", except for genre, which is set to "Other".
What version of the product are you using? On what operating system?
3.38 on Ubuntu 14.04
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 9 Oct 2014 at 4:38
What steps will reproduce the problem?
1. Rip a CD using the excellent DBPowerAmp tool, including the cover art
2. Use flac2all v3.48 or older to convert to mp3
We would expect the mp3 file to contain the important flac tags, but they do
not. They only contain the "genre" tag, because it is set in the code. All
other tags are empty.
I was able to fix the problem by changing the block in which the metaflac
command has to look from 2 to 1. It appears that block 2 contains the coverart
jpg file...
So I replace line 104 in release 48 of the stable code:
flacdata = os.popen("%smetaflac --list --block-number 2 %s" %
with
flacdata = os.popen("%smetaflac --list --block-number 1 %s" %
This solved the problem for me, but I guess this fix will brake functionality
for files without embedded cover art. So a better fix is required for the
general public.
What version of the product are you using? On what operating system?
Release 48 (but problem also occurs on v28 and v38)
Ubuntu server 12.04.3 LTS
Original issue reported on code.google.com by [email protected]
on 26 Jun 2014 at 10:47
The script appears to struggle with files that contain the dollar symbol in
their name, for example:
- 3OH!3 feat. Ke$ha - My First Kiss.flac
When flac2all is given a folder that contains a track with this character in
the name, you get this:
- ERROR: Cannot open input file "/mnt/store/Music/3OH!3/Streets of Gold/03 3OH!3 feat. Ke - My First Kiss.flac": No such file or directory
Just to confirm, I gave it the folder to process, not that file specifically so
it won't be an issue with Bash parsing it from the command I gave it.
Original issue reported on code.google.com by [email protected]
on 7 Nov 2012 at 10:36
I think the best aac for linux is NOT faad but neroaacenc available from the
following link: http://www.nero.com/eng/technologies-aac-codec.html
Original issue reported on code.google.com by [email protected]
on 10 Mar 2012 at 7:19
See
http://superuser.com/questions/502500/preserve-embedded-album-art-when-convertin
g-from-flac-to-ogg for the problem.
Original issue reported on code.google.com by [email protected]
on 8 Nov 2012 at 7:20
Using -n gives
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/bin/flac2all", line 542, in encode_thread
outfile = os.path.join(outdirFinal,os.path.split(current_file_local)[1])
UnboundLocalError: local variable 'outdirFinal' referenced before assignment
Original issue reported on code.google.com by [email protected]
on 17 Dec 2013 at 9:03
I am trying to use less parallel threads than the reported number of
hyperthreads on my computer. Therefore, I call flac2all like this:
>python ~/Downloads/flac2all_v3.38.py vorbis . --outdir=../ogg --threads=3
My python version is 2.7 (Ubuntu 12.04). The command crashes and the output is:
==========
Flac2all python script, v3 . Copyright 2006-2012 Ziva-Vatra.com.
Licensed under the GPLv2 (http://www.ziva-vatra.com).
Project website: http://code.google.com/p/flac2all/
There are 4048 files, of which 4004 are convertable FLAC files
Traceback (most recent call last):
File "~/Downloads/flac2all_v3.38.py", line 758, in <module>
print "We are running %d simultaneous transcodes" % (opts['threads'])
TypeError: %d format: a number is required, not str
==========
I replaced "%d" by "%s" and it works now. But I am not a python person, so I
can't suggest a real fix.
Original issue reported on code.google.com by [email protected]
on 2 Feb 2014 at 7:28
Enhancement request.
Given the multithread logic is already in place, how about an option to run
miltithreaded testing of all FLAC files in a given directory structure?
Original issue reported on code.google.com by [email protected]
on 13 Jul 2014 at 5:18
I have files with colons (:) and questions marks which are valid on one file
system but not another (mainly fat/vfat).
It would be great if we could specify a substitute character or characters, eg
-s : - -s ? --
could substitute a colon with a dash and substitute a question mark with
nothing (-- symbolizes nothing in this case)
If the above makes things too complex then perhaps just a single substitution
character may be sufficient.
Original issue reported on code.google.com by [email protected]
on 7 Feb 2013 at 11:06
What steps will reproduce the problem?
1. Enable to copy non flac files
2. Have two btsync shares running both on the flac and the converted media
folder
3. The program then copies the .sync folder and ruins the share
Would it be possible for you to just to make it possible to define the
extensions that we want to have copied? For example, only copy .jpg files
(covers), so it does not mess with non-music related folders?
Original issue reported on code.google.com by [email protected]
on 19 Jan 2015 at 6:00
What steps will reproduce the problem?
1. flac2all -t 8
What is the expected output?
There are 19 files, of which 17 are convertable FLAC files
We are running 8 simultaneous transcodes
What do you see instead?
There are 19 files, of which 17 are convertable FLAC files
Traceback (most recent call last):
File "flac2all_v3.38.py", line 758, in <module>
print "We are running %d simultaneous transcodes" % opts['threads']
TypeError: %d format: a number is required, not str
What version of the product are you using? On what operating system?
3.38 from google code
Please provide any additional information below.
see attached patch
Original issue reported on code.google.com by [email protected]
on 11 Dec 2014 at 10:21
Attachments:
Enhancement request.
Right now flac2all copies the directory structure one level under input dir, I
would like it to also create the top-level directory itself.
When I:
1. Want to copy Artist/Album directory structure with multiple albums, I would
like it when de Artist directory is created in the output folder, with Album
directories underneath (with Artist as input dir)
2. Want to copy a single Album directory: create the Album dir, with files in
it.
I'm no programmer, but this modification of 3.71 seems to work for me.
606c606
< outdirFinal = opts['outdir'] + os.path.split(current_file_local)[0]
---
> outdirFinal = opts['outdir'] + os.path.split(opts['dirpath'])[1] +
os.path.split(current_file_local)[0]
PS.
Nice tool! Was searching for something like it for a while.
Original issue reported on code.google.com by [email protected]
on 4 Mar 2015 at 7:57
What steps will reproduce the problem?
1. Take file with a tag containing some accent (for example é)
2. convert it to mp3
What is the expected output? What do you see instead?
expected output: Tags preserved
real output: example: "Biréli Lagrène" becomes "Bir", "Gérard" becomes "G"
What version of the product are you using? On what operating system?
v3.51
Original issue reported on code.google.com by [email protected]
on 20 Feb 2015 at 6:26
What steps will reproduce the problem?
1. Convert flac file with lyrics to mp3
What is the expected output? What do you see instead?
Expected output: lyrics present in mp3 file.
Real output: lyrics not present in mp3 file
What version of the product are you using? On what operating system?
v3.51
Please provide any additional information below.
I added an example file as attachment, but really any flac file with lyrics
will do as far as I saw with my music.
Original issue reported on code.google.com by [email protected]
on 20 Feb 2015 at 6:21
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.