Archived from the Transloadit support forum. Originally posted on January 18, 2011; details may be outdated, see our docs for current behavior. Original thread
…I have signed up for an account and am going to develop against Transloadit as it’s cheaper to get started with than Pandastream.
In the previous support discussion you mentioned ‘metadata’ as a to do. I will definitely need to be able to set metadata fields on the encoded files… I’m hoping it will be possible already via ffmpeg commands in the Assembly (http://multimedia.cx/eggs/supplying-ffmpeg-with-metadata/) and that the metadata to do at your end is more related with http://transloadit.com/docs/meta-data ?
I have had some difficulty getting ffmpeg to tag ID3 metadata in a way that is readable by Windows: https://roundup.ffmpeg.org/issue2562
Since I want to provide well-tagged downloads from my app this is important for me.
I suspect the only answer may be to use a dedicated ID3 tagging utility. I believe this would have to operate on the file before it was stored to s3 - does that mean there would need to be a ‘metadata’ robot that could be a front-end onto such tools?
In addition to mp3 I’d like to output a couple of other common formats (aac, flac and apple lossless, maybe ogg vorbis too)
I was just trying to get AAC to work but the problem I encountered is that (I think) Transloadit is not giving an output filename with an extension to ffmpeg. In which case ffmpeg seems to need a hint via the -f option.
‘-f mp3’ works for mp3s but I found testing on my local ffmpeg that neither ‘-f aac’ or ‘-f m4a’ work for AAC… they give the same error I get on Transloadit:
“Requested output format ‘m4a’/‘aac’ is not a suitable output format”
I’m just learning ffmpeg as I go so maybe there’s an easy way around this.
I get the same error as on Transloadit. When trying to encode to either mp3 or AAC if I don’t use the -f option I get an error like:
Unable to find a suitable output format for '/mnt/tmp/scratch/REDACTED'
With mp3 files I can get around that because ‘-f mp3’ works.
I have posted for support on the ffmpeg-users list. I don’t know if it’s the best way but maybe a simple solution would be if I could specify a file extension for the output path in my Assembly somehow.
(on the plus side - meta data for .m4a files output from ffmpeg shows up fine in Windows!)
bit confusing because in the ffmpeg -formats list there are also ‘aac’ and ‘m4a’ entries which match the codec name and file extension respectively, but in this case they are the wrong ones to use!
so I assume for every output format there is a valid -f option and the file extension thing isn’t an issue.
Coming back to the thing of file extensions - it looks like Transloadit tries to detect the file type and append an appropriate file extension when copying results to s3 (?)
Due to earlier errors I established that at the ffmpeg encoding stage there was no file extension, but in the s3 bucket my mp3 result file is called ‘originalname.mp3’, which is great.
My AAC file came out as ‘originalname.mp4’, which is not wrong though in my case I’d like to see a .m4a like iTunes uses. The assembly reports a mime of video/mp4 and type video. Seems like this should be ‘audio’, but I don’t know if the mp4 format is ambiguous or something.
I got FLAC working, but the output file is ‘originalname.wav’ …The assembly output shows [mime] => audio/flac so I guess you need more mappings of mime types to extensions.
Or… I think in the end being able to specify my own file extension in the assembly would be useful.
So at this point you still need us to fix the mime types of the files on S3? Or could you for the mean time make one export step for each file, and set the mime via the headers ‘Content-Type’ parameter?
Only the mp3s had their file extension detected when saving the output files, but as you say I can get around that by having individual export steps for each encoding in my assembly.
My only remaining issues are with metadata tagging in the files: Windows needs ID3v2.3 tags in mp3s but I can only output v2.4. Also I haven’t yet been able to write any metadata to the Ogg and the Flac only had partial data visible when played in VLC – Ogg and Flac both use Vorbis Comments format I think.
Both of these are issues with ffmpeg rather than Transloadit, but if no solution is possible on ffmpeg side it means I rely on Transloadit to provide other ways of adding metadata to the files before transfer to S3.
P.S.
it’s great what you guys have built here, impressed!
The stuff you are trying todo will require explicit audio meta data support on our end. If you know of any suitable linux tools for that, we’d be happy to hear about it.
For me Mutagen is not currently an option as it insists on saving ID3v2.4 tags for mp3s. I believe jAudioTagger can be made to save v2.3 tags.
Both are object-oriented libraries without any command-line interface so you’d have to do some work to wrap them up and expose a nice interface to the Assembly engine. If you’re on Node.js then jAudioTagger might integrate more easily as it’s Java.
The main things for me are:
- ability to set any tag in all the main formats (not just a subset of common tags) - ability to save ID3v2.3 tags in mp3s for Windows-compatible tagging
As a quick fix, it would be great if there way a way to use the metadata option of ffmpeg via an assembly. On the command-line you have to use the -metadata option several times… once for each tag you want to set.
This still has the problems of using ffmpeg for the metadata but it would allow setting tags in mp3s (albeit v2.4) and m4a files (doesn’t seem to do much for flac or ogg).