The PlayStation 3 uses standard 3GPP tags and does not understand iTunes style tags so every song I imported do not show the correct information, so instead of fixing them on the PS3 (something that does not changes the file, only on the internal database) I wrote a script with the help of AtomicParsley:
#!/bin/sh
addTag() {
line=`mp4info "$file" | grep "$2"`
if [ "$?" -eq "0" ]
then
command="$command $1 \"`echo $line | sed -e "s/$2: //"`\""
fi
}
for file in *.m4a; do
command="AtomicParsley \"$file\""
addTag --3gp-title "Metadata Name"
addTag --3gp-performer "Metadata Artist"
addTag --3gp-album "Metadata Album"
addTag --3gp-genre "Metadata Genre"
exec 3<>"$file"
read -n 8 <&3
echo -n 3gp6 >&3
exec 3>&-
eval "$command" -W
exec 3<>"$file"
read -n 8 <&3
echo -n mp42 >&3
exec 3>&-
done
It add a few 3GPP style tags taken from the original iTunes style tags. As AtomicParsley rejects to add that kind of tags on non 3GPP files, the script changes the ftyp field on the file temporaly to 3gp6. The script process all files with the extension m4a on the current directory.










Trackbacks (0)