rvandaalen Posted March 10, 2011 Share Posted March 10, 2011 I recently installed Subsonic,and working great (thanks!!), I currently use it to watch my movies online. Most of my movies are Blu Ray rips MKV files. ffmpeg transcode this into ASF if I'm correct. I was wondering if its possible to transcode into MP4 H264+AAC or MP3. Since MP4 gives better quality then ASF (Blocky @2000kbps) I'm still a bit new to unRAID and Linux in general so I had a few questions hoping someone can answer. Is it possible to install VLC Slackware editionhttp://www.videolan.org/vlc/download-slackware.html onto unRAID or any other VLC version to use for transcoding? I was reading the following thread on the Subsonic forum and was wondering if it can be used on unRAID with VLC http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=5541 if VLC is not an option,is it possible to use ffmpeg to convert to MP4 H264+AAC or MP3? would this indeed give better results then ASF? Also would bitrate choosing and time seeking still be working with MP4? Thanks Can anyone help me with getting this to work with unraid version of subsonic: http://goo.gl/aqF7k is it possible? I tried: ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -threads 0 -vcodec libx264 -fpre .\presets\libx264-faster.ffpreset -f flv - Got presets from here: http://www.mediasoftpro.com/downloads/Presets.zip I'm not very technical but maybe its easy to get it working? I simply want better streaming? Maybe someone can tell me why not many people are very interested in this? Quote Link to comment
kapperz Posted March 10, 2011 Author Share Posted March 10, 2011 Thanks rvandaalen, I don't understand the problem. What do you mean better quality? Could you tell me a little about your setup? Subsonic turns videos into flash format and you can choose the bitrate from the dropdown while playing. It not going to be HD or even DVD quality, but close. I spent several hours looking into compiling my own ffmpeg to include support for libx264. I had an issue with no sound on some of my mp4 movies (all my movies are mp4 x264 q=20). It ended up being an issue with down-sampling multi-channel audio to stereo. Transcoding video uses a lot of CPU. Have you heard of htop? While streaming see how much work your CPU is doing. I have a quad-core 2.9Ghz. I usually see one core hover around 30% (with some spikes to 50-80%) while transcoding a movie. Also, check out iftop. That's a great tool to check bandwidth usage. When the movie is streaming, you can see it buffering with all the upload bandwidth you have. If you have a good router, you might want to configure QoS to prioritize data for Subsonic's port. Are streaming over Wi-Fi? When I was setting up my REVO3610 nettop to run XBMC, the census is that 720p (and 1080p) video can be choppy even over Wi-Fi 802.11g. Quote Link to comment
rvandaalen Posted March 10, 2011 Share Posted March 10, 2011 Thanks for your reply. I finally got x264 transcoding and streaming to work today with the following line: ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -threads 0 -vcodec libx264 -fpre /var/subsonic/data/transcode/libx264-fastfirstpass.ffpreset -f flv - I have an i3-540 processor and transcoding maxes it out pretty good. The x264 transcoding gives better results then the standard x263 transcoding. I currently am looking for the best ffpreset file. I used the preset and ffmpeg version from my Airvideo install. I'm very happy with the results comparring to the standard h263 blocky results. I hope someone can perfect my transcode line and ffpreset file. Quote Link to comment
joelones Posted March 16, 2011 Share Posted March 16, 2011 two things: 1) i got filenames that have accents in them (french language titles) and they refuse to play in subsonic. a search on the subsonic forum yielded this: http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=1121&highlight=accents. has something to do with locales, do we need to set it? 2) in subsonic_copy_from_memory.sh in regards to copying the the ehcache files, the parameter -n (--dry-run perform a trial run with no changes made) is present, so is this correct? are we never syncing the tmp files? thanks Quote Link to comment
kapperz Posted March 16, 2011 Author Share Posted March 16, 2011 Joelones, Ah, good catch on the (DRY RUN) switch in subsonic_copy_from_memory.sh. I have fixed this in the original post. The ehcache file are not critical to backup. It's just the folder index cache that will get recreated and the chat logs. As for the issue with displaying accents in titles. I see this problem discussed here and there on the Subsonic forums. The developer has been working to fix the issues (see his changelog). I have not had to change any locales setting in Subsonic, but do see a few titles in my collection that look wrong in Subsonic. Sorry I can't help more on that. Quote Link to comment
joelones Posted March 17, 2011 Share Posted March 17, 2011 Joelones, Ah, good catch on the (DRY RUN) switch in subsonic_copy_from_memory.sh. I have fixed this in the original post. The ehcache file are not critical to backup. It's just the folder index cache that will get recreated and the chat logs. As for the issue with displaying accents in titles. I see this problem discussed here and there on the Subsonic forums. The developer has been working to fix the issues (see his changelog). I have not had to change any locales setting in Subsonic, but do see a few titles in my collection that look wrong in Subsonic. Sorry I can't help more on that. thanks kapperz and great work getting this working btw the problem with the filenames also extends to directories as well, i've got a directory as an album name that contains an apostrophe and a period (Sgt. Pepper’s Lonely Hearts Club Band) that subsonic refuses to see too. judging by the posts on the subsonic forum, i blindly tried to add this to subsonic_RAM.sh (start up script for subsonice) to no avail: export LC_CTYPE LC_CTYPE=en_US.iso88591 LANG=en_US.UTF-8 LC_COLLATE=C not even sure if the stripped down version of slackware that's running unraid contains these, my knowledge of locales is unfortunately nonexistent edit: just notice the /etc/profile.d/lang.sh file containing UTF-8 locales commented out.. #export LANG=en_US.UTF-8 # Another option for en_US: #export LANG=en_US.ISO8859-1 and running locale -a gives me locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory C POSIX not sure what to make of this edit2: just saw this http://lime-technology.com/forum/index.php?topic=9868.0, not sure if the OP solved the issue or not Quote Link to comment
kapperz Posted March 18, 2011 Author Share Posted March 18, 2011 Not the best solution, but I just renamed my files that had special accents (eg. Ó = O, Ü = U). The ID3 tag still have the proper accented characters. Quote Link to comment
SCSI Posted March 20, 2011 Share Posted March 20, 2011 kapperz, Just letting you know that the "subsonic_copy_from_memory.sh" in your Subsonic4.4_unRaid.zip file is in DOS instead of unix format. Quote Link to comment
kapperz Posted March 20, 2011 Author Share Posted March 20, 2011 Thanks SCSI, I fixed it Quote Link to comment
jonlai9 Posted March 20, 2011 Share Posted March 20, 2011 (VERY IMPORTANT) All settings in Subsonic will be lost if the files are not copied back to flash before a reboot. It is vital the "subsonic_copy_from_memory.sh" script is run before a shutdown/reboot. A cron job was created in subsonic_start.sh to backup subsonic's files once a day at 7pm (for people who rarely shutdown their server). If you do not have unMenu installed (everyone should) with the Clean Powerdown package enabled then you should download the package to your flash "/packages_global/" folder and add a line to your go script to install it at the very top of your go script. (eg. installpkg /boot/packages_global/powerdown-1.02-noarch-unRAID.tgz). Just wondering, does this mean I should edit the Clean Powerdown script so that it runs "subsonic_copy_from_memory.sh" whenever it's executed? Edit: Got subsonic working. It doesn't seem like subsonic supports unicode... all my foreign titled songs don't show up is there a solution to this? Quote Link to comment
kapperz Posted March 20, 2011 Author Share Posted March 20, 2011 jonlai9, No need to edit any files. If the Clean Powerdown package is installed either by itself or using unMenu then the line /boot/scripts/shutdown_jobs_add.sh will add a line to the powerdown process for you. This line calls shutdown_jobs.sh to run subsonic_copy_from_memory.sh before the shutdown/reboot of the server happens. I did this so you can add other tasks to the shutdown_jobs.sh script if needed. If all is setup correctly, you should see a line in /etc/rc.d/rc.local_shutdown to call shutdown_jobs.sh. type: cat /etc/rc.d/rc.local_shutdown Quote Link to comment
jonlai9 Posted March 20, 2011 Share Posted March 20, 2011 jonlai9, No need to edit any files. If the Clean Powerdown package is installed either by itself or using unMenu then the line /boot/scripts/shutdown_jobs_add.sh will add a line to the powerdown process for you. This line calls shutdown_jobs.sh to run subsonic_copy_from_memory.sh before the shutdown/reboot of the server happens. I did this so you can add other tasks to the shutdown_jobs.sh script if needed. If all is setup correctly, you should see a line in /etc/rc.d/rc.local_shutdown to call shutdown_jobs.sh. type: cat /etc/rc.d/rc.local_shutdown You're right, thanks! Anyone got subsonic to work with unicode file names? None of my UTF-8 Chinese titled songs show up in subsonic Quote Link to comment
SCSI Posted March 20, 2011 Share Posted March 20, 2011 Thanks for your reply. I finally got x264 transcoding and streaming to work today with the following line: ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -threads 0 -vcodec libx264 -fpre /var/subsonic/data/transcode/libx264-fastfirstpass.ffpreset -f flv - I have an i3-540 processor and transcoding maxes it out pretty good. The x264 transcoding gives better results then the standard x263 transcoding. I currently am looking for the best ffpreset file. I used the preset and ffmpeg version from my Airvideo install. I'm very happy with the results comparring to the standard h263 blocky results. I hope someone can perfect my transcode line and ffpreset file. rvandaalen, Did you try the presets posted by here? I will try them later and see if there are any improvement. http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=5466 Quote Link to comment
jonlai9 Posted March 20, 2011 Share Posted March 20, 2011 Thanks for your reply. I finally got x264 transcoding and streaming to work today with the following line: ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -threads 0 -vcodec libx264 -fpre /var/subsonic/data/transcode/libx264-fastfirstpass.ffpreset -f flv - I have an i3-540 processor and transcoding maxes it out pretty good. The x264 transcoding gives better results then the standard x263 transcoding. I currently am looking for the best ffpreset file. I used the preset and ffmpeg version from my Airvideo install. I'm very happy with the results comparring to the standard h263 blocky results. I hope someone can perfect my transcode line and ffpreset file. You have to donate to get the license in order to stream videos through subsonic right? Quote Link to comment
joelones Posted March 20, 2011 Share Posted March 20, 2011 jonlai9, No need to edit any files. If the Clean Powerdown package is installed either by itself or using unMenu then the line /boot/scripts/shutdown_jobs_add.sh will add a line to the powerdown process for you. This line calls shutdown_jobs.sh to run subsonic_copy_from_memory.sh before the shutdown/reboot of the server happens. I did this so you can add other tasks to the shutdown_jobs.sh script if needed. If all is setup correctly, you should see a line in /etc/rc.d/rc.local_shutdown to call shutdown_jobs.sh. type: cat /etc/rc.d/rc.local_shutdown You're right, thanks! Anyone got subsonic to work with unicode file names? None of my UTF-8 Chinese titled songs show up in subsonic struggling with the same problem, unless there's a way to get the UTF8 locale working on 4.7, i'm not sure we'll get unicode working on another not, changing the cover art no longer works for me anymore, i only get back "No images found." from google image search, others experiencing the same? Quote Link to comment
jonlai9 Posted March 21, 2011 Share Posted March 21, 2011 jonlai9, No need to edit any files. If the Clean Powerdown package is installed either by itself or using unMenu then the line /boot/scripts/shutdown_jobs_add.sh will add a line to the powerdown process for you. This line calls shutdown_jobs.sh to run subsonic_copy_from_memory.sh before the shutdown/reboot of the server happens. I did this so you can add other tasks to the shutdown_jobs.sh script if needed. If all is setup correctly, you should see a line in /etc/rc.d/rc.local_shutdown to call shutdown_jobs.sh. type: cat /etc/rc.d/rc.local_shutdown You're right, thanks! Anyone got subsonic to work with unicode file names? None of my UTF-8 Chinese titled songs show up in subsonic struggling with the same problem, unless there's a way to get the UTF8 locale working on 4.7, i'm not sure we'll get unicode working on another not, changing the cover art no longer works for me anymore, i only get back "No images found." from google image search, others experiencing the same? Are you saying it's a problem with unRAID and not subsonic? Quote Link to comment
joelones Posted March 21, 2011 Share Posted March 21, 2011 Right, it's probably a locale problem with unraid, see here http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=1121&highlight=accents I believe it could be fixed in 5, but i'm still on 4.7 Quote Link to comment
jonlai9 Posted March 21, 2011 Share Posted March 21, 2011 Right, it's probably a locale problem with unraid, see here http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=1121&highlight=accents I believe it could be fixed in 5, but i'm still on 4.7 It's not possible to change it in 4.7 right? I want to use it now instead of waiting for 5.0 to go official Quote Link to comment
joelones Posted March 21, 2011 Share Posted March 21, 2011 Right, it's probably a locale problem with unraid, see here http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=1121&highlight=accents I believe it could be fixed in 5, but i'm still on 4.7 It's not possible to change it in 4.7 right? I want to use it now instead of waiting for 5.0 to go official I'm sure there's a way to do it on 4.7. I requested some help in a couple of other threads : http://lime-technology.com/forum/index.php?topic=9868.0 http://lime-technology.com/forum/index.php?topic=11220.msg112448#msg112448 Quote Link to comment
joelones Posted March 21, 2011 Share Posted March 21, 2011 Ok, the following process worked for me on 4.7, I can now see all filename and directories with accents both in subsonic and also in unRAID! It's basically a mix of various threads I found on the board. We must modify the original bzroot to incorporate the changes to /etc/profile.d/lang.sh and install the locale package. You must also install the cpio package with unMenu before beginning. Prerequisites: unraid 4.7, subsonic (working), unMenu, cpio package, locales package (see below), text editor, some time... Download 4.7 from here http://lime-technology.com/download/cat_view/49-unraid-server or cp the existing bzroot from /boot on a working unRAID system. Work in a temporary directory. Extract bzroot with: unzip *.zip bzroot Make a new directory: mkdir unraid Change directory and unpack bzroot in that directory (Reference: http://lime-technology.com/forum/index.php?topic=871.0): cd unraid zcat ../bzroot | cpio -i -d -H newc --no-absolute-filenames Modify lang.sh and lang.csh (Reference: http://lime-technology.com/forum/index.php?topic=11220.msg112448#msg112448) vi etc/profile.d/lang.sh Change the following: # en_US is the Slackware default locale: #export LANG=en_US export LANG=en_US.utf8 Rebuild: find . | cpio -o -H newc | gzip > ../bzroot_new sync You can add a new block to /boot/syslinux.cfg or just backup the old bzroot and copy in the new one, better to do the former, but I'm lazy: cd /boot mv bzroot bzroot.old cp (path to bzroot_new)/bzroot_new bzroot OR to modify the syslinux.cfg file. The original syslinux.cfg looks as follows: default menu.c32 menu title Lime Technology LLC prompt 0 timeout 50 label unRAID OS menu default kernel bzimage append initrd=bzroot label Memtest86+ kernel memtest All you have to do is copy the new bzroot in /boot (assuming you gave it a name bzroot_new), and add a new block in syslinux.cfg with a label like so: default menu.c32 menu title Lime Technology LLC prompt 0 timeout 50 label unRAID OS menu default kernel bzimage append initrd=bzroot label unRAID OS UTF8 kernel bzimage append initrd=bzroot_new label Memtest86+ kernel memtest The default action is to boot the original bzroot, so you must select the new bzroot on boot or set it to default (menu default). Install the locales package on boot (http://www.slackware.org.il/slackware/slackware-12.2/slackware/l/glibc-i18n-2.7-noarch-17.tgz) Reference: http://lime-technology.com/forum/index.php?topic=9868.0 Download package and copy into /boot/packages: cp glibc-i18n-2.7-noarch-17.tgz /boot/packages Create auto_install file in /boot/package with the following in: PACKAGE_DIRECTORY=/boot/packages SCRIPT_DIRECTORY=/boot/unmenu installpkg glibc-i18n-2.7-noarch-17.tgz vi /boot/packages/glibc-i18n-2.7-noarch-17.tgz.auto_install Add the above contents and save and quit and reboot. That's it. Upon reboot you can verify with: set | grep -i lang locale -a You should see: LANG=en_US.utf8 and many locales with the locale -a command. Before: After: Only one problem people, maybe someone can help, subsonic only picks up the locale upon a subsequent restart. Thus once I boot my server (with subsonic slated to start on boot), I must restart subsonic for the fix to work i.e.; ./subsonic_restart.sh It's as though on initial boot subsonic doesn't pick up the locale - only after a restart does it work. On my system the package for locales gets installed before I start subsonic, so I'm not sure. I hope this helps somebody. Quote Link to comment
jonlai9 Posted March 22, 2011 Share Posted March 22, 2011 Thanks for the guide joelones! There shouldn't be a problem doing this on a working unRAID server right? Or should this be done offline? Can you help me try if Chinese unicode works? '?' thanks. No idea if this might work but you mentioned two methods in one of the steps: have you tried adding a new block to /boot/syslinux.cfg instead? Quote Link to comment
bnevets27 Posted March 22, 2011 Share Posted March 22, 2011 I just wanted to thank you, kapperz, for the great work on putting this together and the write up. You made this installing this very easy and now I get to enjoy it. You have to donate to get the license in order to stream videos through subsonic right? For the first 30days you can do everything including video. After that then yeah you have to donate. Quote Link to comment
joelones Posted March 22, 2011 Share Posted March 22, 2011 Thanks for the guide joelones! There shouldn't be a problem doing this on a working unRAID server right? Or should this be done offline? Can you help me try if Chinese unicode works? '?' thanks. No idea if this might work but you mentioned two methods in one of the steps: have you tried adding a new block to /boot/syslinux.cfg instead? No problem doing it on a working unRAID, that's how i did it - you will have to reboot. The procedure should work with a different locale than the one in my guide. Yeah, I would recommend making the modification in syslinux.cfg instead the way i did it, much safer, in case something goes wrong. Quote Link to comment
jonlai9 Posted March 22, 2011 Share Posted March 22, 2011 Thanks for the guide joelones! There shouldn't be a problem doing this on a working unRAID server right? Or should this be done offline? Can you help me try if Chinese unicode works? '?' thanks. No idea if this might work but you mentioned two methods in one of the steps: have you tried adding a new block to /boot/syslinux.cfg instead? No problem doing it on a working unRAID, that's how i did it - you will have to reboot. The procedure should work with a different locale than the one in my guide. Yeah, I would recommend making the modification in syslinux.cfg instead the way i did it, much safer, in case something goes wrong. Sorry, I'm kind of a linux noob, can you show me how I would do that? Thanks. Quote Link to comment
joelones Posted March 23, 2011 Share Posted March 23, 2011 Thanks for the guide joelones! There shouldn't be a problem doing this on a working unRAID server right? Or should this be done offline? Can you help me try if Chinese unicode works? '?' thanks. No idea if this might work but you mentioned two methods in one of the steps: have you tried adding a new block to /boot/syslinux.cfg instead? No problem doing it on a working unRAID, that's how i did it - you will have to reboot. The procedure should work with a different locale than the one in my guide. Yeah, I would recommend making the modification in syslinux.cfg instead the way i did it, much safer, in case something goes wrong. Sorry, I'm kind of a linux noob, can you show me how I would do that? Thanks. My default syslinux.cfg looks like : default menu.c32 menu title Lime Technology LLC prompt 0 timeout 50 label unRAID OS menu default kernel bzimage append initrd=bzroot label Memtest86+ kernel memtest All you have to do is copy the new bzroot in /boot (assuming you gave it a name bzroot_new), and add a new block in syslinux.cfg with a label like so: default menu.c32 menu title Lime Technology LLC prompt 0 timeout 50 label unRAID OS menu default kernel bzimage append initrd=bzroot label unRAID OS UTF8 kernel bzimage append initrd=bzroot_new label Memtest86+ kernel memtest The default action is to boot the original bzroot, so you must select this on boot or set it to default (menu default). Hope this helps. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.