I need help with the scripting wiki, importing tracks from FLAC + .CUE sheets
I have followed the instructions as best I am able and this just does not seem to be working for me.
If I understand the instructions correctly I have edited the 3 different files, \home\user\.mediatomb\config.xml, \usr\share\mediatomb\js\import.js and common.js as described, (when transferring addAudio() function from import.js to common.js should I leave the addAudio() function in import.js or delete it?) Then I replaced the default copy of playlists.js with the one from the wiki.
Then there is the cryptic reference to "The transcoding script decoding the url for an external program is given in the transcoding section."
I went to the transcoding section and assumed that this was a reference to the flacNcue2wav.sh script described in the "Range from .flac file" section. There is no mention of setting the executable flag on this file so I didn't.
I do not seem to be able to see and navigate the individual track listings within the single FLAC file on my WD TV Live media renderer as I thought this was supposed to enable. I wish we could write some simple, concise instructions similar to the excellent "Comprehensive Multimedia & Video Howto" found on the Ubuntu Forums. I would be willing to help write such a "Howto" if someone could show me "Howto".
The .cue sheet containing an absolute path to the single .flac file was generated by RubyRipper.
The WD TV Live is able to play .flac files natively so transcoding should not be necessary.
I can play the full .flac file from the .cue sheet, I cannot navigate backwards and forwards between tracks or to a specific track within the single .flac file.
What have I done wrong?
Thanks in advance for any help anyone may be able to provide.
I never tried to reproduce the solution from the wiki, so I can't tell you any details. Maybe search the forums, if I recall correctly the one who submitted that also posted some information here, maybe you can find that guy and ask him for more details?
I confess to be the one to blame for the crappy instructions on the subject in the wiki. I just tried to document all the main steps I did to get the system working. Feel free to improve the instructions. But first, I'll try to answer your questions (but since the front-end device I was planning to used turned out to be quite lacking in the UI department, I haven't really used the system after the first experiments, so my memories may be a bit inaccurate).
You should delete the addAudio() from import.js after copying it to common.js. I don't know enough of the inner workings of the presedence in the scripting engine to say which would be used if there are two copies, so safer to remove the old version.
You guessed the correct transcoding script. However, it should have the excutable flag set. The script just parses the fake url to determine the full path to flac file and the time range to decode, and then calls the decoder with proper arguments. To be honest, I don't know how it could be done without decoding (in case your front-end can handle flac natively).
Have you tried if the individual tracks appear in the web-UI of MT? If not, then there's something wrong in the playlist parsing. If they appear, but you cannot play them, then there's something wrong in the transcoding or the flac path. (You say the .cue contains absolute path to the flac, but the assumption on which the scripts were written was that the .cue contains relative path to the flac, i.e., nothing if they are in the same directory.)
I have deleted the addAudio() from import.js, set the executable flag on the transcoding script and removed the path from a few test .cue sheets. It still does not work. I cannot see the individual tracks in the web-UI but if I click on the .cue sheet in the display on the WD TV Live renderer it plays the .flac file just fine, it just plays it as one big file with all the tracks combined. I believe I am using the playlists.js you provided. What should I try next?
It seems that there is something wrong in the playlist parsing. The cue sheet itself shouldn't appear in the listings, but the tracks instead. You could try to add some debug prints to the parsing functions to see that they are executed and that the track data are parsed correctly. The prints will appear in the MT log file if you print something in the scripts.
Other than that, I really can't help you. It's been so long when I did the script and I haven't used MT since, so my ability to help is very limited. Still, good luck in your experiments.
Ok, I know absolutely nothing about Java Script so I will need to find a good book if I am going to pursue this any further. Do you have any suggestions?
Thanks for your help. Can I ask why you abandoned MT and what you use now?
I didn't so much abandon MT, but the whole idea of a media server. At that point my hardware just wasn't up for the task (front-end, DBox2, couldn't decode anything but mp3s, not even pure wavs, and the back-end, NSLU2, had very limited resources for transcoding).
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.