Reputation: 2986
I'm using avconv
in the following way in order to grab ID3 data from audio files on remote servers:
avconv -i http://myserver.com/my_music.mp3
This command will output all the info I need, which I then parse.
The problem is, it always exits with a non-zero exit status, due to the fact that no output file is specified (since I don't want to actually download the full audio file and convert it in any way).
Is there any way I can run avconv so that it
0
if it was able to get this farUpvotes: 1
Views: 203
Reputation: 40
How about actually downloading the file only as a temp to work on, and then automatically delete it after the work's been done?
avconv -i http://myserver.com/my_music.mp3 -y /temp/temp.mp3 -f ffmetadata meta.ini
# delete temp file after it's been worked on
wait
echo "Done."
rm /temp/temp.mp3
Keep in mind that I wrote all the above from top of my head so it may contain some errors.
In order to extract the metadata of the provided audio file, you could also use a python script.
>>> from pydub.utils import mediainfo
>>> mediainfo("/temp/temp.mp3")
and add some bash snippets inside.
Upvotes: 0