This should do it (I hope I got the braces right ):
Code:
find -iname '*.mp3' -exec id3 -Rl {} + |
awk -F: '/filename: / {
if (f) print fn
fn = $2; f = x
}
/^(((title|a(rtist|lbum)): *(|unknown|track.*))|track:) *$/ {
f++
}
END {
if (f) print fn
}' IGNORECASE=1
Could you post an example output from metaflac at least for two files: one to be printed and another one to be skipped?
---------- Post updated at 11:26 PM ---------- Previous update was at 11:20 PM ----------
Given your metaflac example above, the filename seems to be missing in the output, this means that we should process the files one by one, in order to get the name ...
Hi All,
Looking for an assistance on how to access the speakers of my machine and play audio files using C.
Any tutorials will be of great help.
Regards,
Sayantan. (1 Reply)
Hi, I would like to write a shell script that will:
-search the files of a specific user to find any audio files with a bandwidth iqual or greater than 192 kps
- on the results i should see the file name along with all the whole file route and each file's size
So I guess i should be using... (1 Reply)
I am having following folder structure.
/root/audios/pop
/root/audios/jazz
/root/audios/rock
Inside those pop, jazz, rock folders there are following files,
p1.ul, p2.ul, p3.ul, j1.ul, j2.ul, j3.ul, r1.ul, r2.ul, r3.ul
And I have a file named as "audio.txt" in the path /root/audios,... (11 Replies)
Hi All,
I have next to zero knowledge on what I am about to ask so I will just ask it in plain English :)
I am wondering how best to go about manipulating audio files server side. The manipulations required are join files one after the other, eg, audio1 + audio2 + audio3 + audio4 = audio5
... (0 Replies)
I'm trying to record audio using Audacity 2.0.5 installed from SlackBuilds. My system is 64-bit Slackware 14.1 and a sound card is Intel HD Audio. I didn't change my sound system to OSS. (Default sound system in Slackware 14.1 is ALSA, isn't it?) First, I set Internal Microphone slider in KMix... (2 Replies)
Hi All , I have seen a lot of code samples which suggest how to remove the junk data from and XML , I need a code in unix which removes the junk characters as well as the valid characters those are not in XML tags , for example my XML is as follows :
<?xml version="1.0"... (6 Replies)
I have a lot number audio files in the MP3 proprietary format, I want to convert them to 'opus' the free and higher quality format, with keep metadata also.
My selection command-line programs are SoX (Sound eXchange) for convert MP3 files to 'AIFF' format in order to keep quality and metadata*... (1 Reply)
Discussion started by: temp-usr
1 Replies
LEARN ABOUT PHP
id3_set_tag
ID3_SET_TAG(3) 1 ID3_SET_TAG(3)id3_set_tag - Update information stored in an ID3 tagSYNOPSIS
bool id3_set_tag (string $filename, array $tag, [int $version = ID3_V1_0])
DESCRIPTION id3_set_tag(3) is used to change the information stored of an ID3 tag. If no tag has been present, it will be added to the file.
PARAMETERS
o $filename
- The path to the MP3 file Instead of a filename you may also pass a valid stream resource
o $tag
- An associative array of tag keys and values The following keys may be used in the associative array:
Keys in the associative array
+--------+--------------------------------------+---+
| key | | |
| | | |
| | possible value | |
| | | |
| | available in version | |
| | | |
+--------+--------------------------------------+---+
| title | | |
| | | |
| | string with maximum of 30 characters | |
| | | |
| | v1.0, v1.1 | |
| | | |
|artist | | |
| | | |
| | string with maximum of 30 characters | |
| | | |
| | v1.0, v1.1 | |
| | | |
| album | | |
| | | |
| | string with maximum of 30 characters | |
| | | |
| | v1.0, v1.1 | |
| | | |
| year | | |
| | | |
| | 4 digits | |
| | | |
| | v1.0, v1.1 | |
| | | |
| genre | | |
| | | |
| | integer value between 0 and 147 | |
| | | |
| | v1.0, v1.1 | |
| | | |
|comment | | |
| | | |
| | string with maximum of 30 characters | |
| | (28 in v1.1) | |
| | | |
| | v1.0, v1.1 | |
| | | |
| track | | |
| | | |
| | integer between 0 and 255 | |
| | | |
| | v1.1 | |
| | | |
+--------+--------------------------------------+---+
o $version
- Allows you to specify the version of the tag as MP3 files may contain both, version 1.x and version 2.x tags
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
id3_set_tag(3) example
<?php
$data = array(
"title" => "Re:Start",
"artist" => "Re:Legion",
"comment" => "A nice track"
);
$result = id3_set_tag( "path/to/example.mp3", $data, ID3_V1_0 );
if ($result === true) {
echo "Tag successfully updated
";
}
?>
If the file is writable, this will output:
Tag successfully updated
NOTES
Note
Currently id3_set_tag(3) only supports version 1.0 and 1.1.
SEE ALSO id3_remove_tag(3), id3_get_tag(3), id3_get_version(3).
PHP Documentation Group ID3_SET_TAG(3)