Difference between revisions of "Converting Amiga MODs to MP3s"

From Jay's Cafe' Wiki
(Created page with "They play well in VLC. ffmpeg -i <infile> <outfile>.mp3, that's it.")
 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
They play well in VLC.
They play well in VLC.
ffmpeg -i <infile> <outfile>.mp3, that's it.
ffmpeg -i <infile> <outfile>.mp3, that's it.
for a directory:
<pre>
while read server_name; do
echo "Restarting Server "$server_name
time lxc restart $server_name
done < /home/jay/temp/running_servers_.dat
</pre>
https://www.cyberciti.biz/faq/bash-loop-over-file/
Sample Shell Script To Loop Through All Files
<pre>
#!/bin/bash
FILES=/path/to/*
for f in $FILES
do
  echo "Processing $f file..."
  # take action on each file. $f store current file name
  cat $f
done
</pre>
Putting it all together, and doing a little customization, we have a script that will convert all files in a directory to mp3s, playable in many modern players.
<pre>
#!/bin/bash
FILES=./*
for f in $FILES
do
  echo "Processing $f file..."
  # take action on each file. $f store current file name
  ffmpeg -i $f $f.mp3
done
</pre>
Requirements are that you have ffmpeg installed and you are in the directory you wish to convert.

Latest revision as of 01:16, 25 December 2022

They play well in VLC. ffmpeg -i <infile> <outfile>.mp3, that's it.

for a directory:

while read server_name; do
	echo "Restarting Server "$server_name
	time lxc restart $server_name 
done < /home/jay/temp/running_servers_.dat 

https://www.cyberciti.biz/faq/bash-loop-over-file/

Sample Shell Script To Loop Through All Files

#!/bin/bash
FILES=/path/to/*
for f in $FILES
do
  echo "Processing $f file..."
  # take action on each file. $f store current file name
  cat $f
done

Putting it all together, and doing a little customization, we have a script that will convert all files in a directory to mp3s, playable in many modern players.

#!/bin/bash
FILES=./*
for f in $FILES
do
  echo "Processing $f file..."
  # take action on each file. $f store current file name
  ffmpeg -i $f $f.mp3
done

Requirements are that you have ffmpeg installed and you are in the directory you wish to convert.