Hello, On Thu, 08 Aug 2019, Carlos E. R. wrote:
On Thursday, 2019-08-08 at 09:27 +0200, David Haller wrote:
On Wed, 07 Aug 2019, Carlos E. R. wrote:
The last time I needed to generate a play list for an USB stick of mp3 files I used eyeD3. That package is now missing.
<https://eyed3.readthedocs.io/en/latest/>
What else can I use?
find ... -printf '%p\n' > foo.m3u
Perfect! :-)
find 2015-11/Piano/* -iname *.aac -type f -printf '%p\n'
I had no idea it was that easy. The lists I had all have two lines per file:
#EXTINF:486,02/ - Mauro Giuliani - Mostly Classical - 12 Landler for Flute and Guitar Classical\0001 -- Mauro Giuliani - 12 Landler for Flute and Guitar.mp3
Jep. The "extended info" may or may not be there and may or may not be used by the player (software). You could add that by piping the filenames into a script running mediainfo --Inform=... See mediainfo --Info-Parameters. You might want to start with: ==== find2m3u.sh ==== #!/bin/bash EXTINF='%Duration/String3%/ %Genre% - %Album/Performer% - %Album% - %Title% -- %Codec%/%BitRate/String%' # you could use e.g. %FolderName%\%FileName%.%FileExtension% too do_info() { f="$1" # mediainfo --Inform="General;#EXTINF:${EXTINF}\n%CompleteName%" "$f" mediainfo --Inform="General;#EXTINF:${EXTINF}" "$f" # [ do something to $f ] printf '%s\n' "$f" } for file; do do_info "$file" done while read -r file; do do_info "$file" done ==== find ... | find2m3u.sh For more control, I recommend using a perl-script with 'use File::Find;' and 'use MediaInfo;' (from package perl-Mediainfo). The File::Find module gives you very fine grained control over how to find files (start with 'find2perl'!) and Mediainfo gives you easy access to the metainfo that Mediainfo can read. See 'man 3pm Mediainfo'. Alternatively, you could use Exiftool instead of Mediainfo. See 'man Image::ExifTool'.
Although... I think I have to search and replace all "/" with "\".
$ find ... | tr '/' '\\' > foo.m3u HTH, -dnh --
I hate black text on a white background on CRTs. Too damned bright. You're right. Black text on a black background is so much more restful. -- J. Bowden and Tanuki
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org