julian-klode / dir2ogg Goto Github PK
View Code? Open in Web Editor NEWOfficial repository of dir2ogg
Home Page: https://jak-linux.org/projects/dir2ogg/
License: GNU General Public License v2.0
Official repository of dir2ogg
Home Page: https://jak-linux.org/projects/dir2ogg/
License: GNU General Public License v2.0
Whe the current directory FS (disk/partition) where dir2ogg is called from differs from the destination directory FS (disk/partition) of final files, then dir2ogg will fail like:
File "/usr/bin/dir2ogg", line 398, in decode
os.rename(tempwav, self.songwav)
OSError: [Errno 18] Invalid cross-device link
The following patch prevents such failure:
diff -Naur fastoggenc-old/fastoggenc fastoggenc/fastoggenc
--- fastoggenc-old/fastoggenc 2017-04-15 15:29:34.400646642 -0600
+++ fastoggenc/fastoggenc 2017-04-15 15:30:28.471085075 -0600
@@ -39,6 +39,7 @@
import sys
import gettext
import os, os.path
+import shutil
import re
import multiprocessing
import threading
@@ -546,7 +547,7 @@
if self.decoder == 'mplayer':
# Move the file for mplayer (which uses tempwav), so it works
# for --preserve-wav.
- os.rename(tempwav, self.songwav)
+ shutil.move(tempwav, self.songwav)
if retcode != 0:
return (False, None)
else:
I imagine there's another way around the issue, and it's making sure the temporal files are generated in the final destination rather than current directory, but in the end using shutil.move is a good easy solution, :-) See:
What are your thoughts on adding support for encoding to opus?
There's a fork of dir2ogg, dir2opus, that does this, but I think it'd be better integrated into this tool.
Hi,
i tried to use dir2ogg to convert my FLAC library to OGG, so i can use my music on my phone more efficiently. My music library is quite large, so the process took a while and after my ssh connection was unfortunately closed, i needed to restart dir2ogg just to notice, it started to re-convert every file it already has converted.
I think this is wrong. I wanted to use dir2ogg as a cronjob to automatically convert all new FLAC files.
Link in readme for Mutagen returns 410 Gone. Could this be an appropriate new link?
you need to add options to change the sample rate of the songs, who will want a 96kHz ogg?
dir2ogg is written for python 2. As python 2 is soon to cease support, it should be migrated to python 3.
If installed as a python 3 sw, just executing dir2ogg
one gets the following error:
File "/usr/bin/dir2ogg", line 145
print 'INFO: %s' % msg
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('INFO: %s' % msg)?
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.