USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

a poll for media server distribution
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Audio and Video Applications
View previous topic :: View next topic  
Author Message
hakova
New Member


Joined: 03 Feb 2024
Posts: 40
Location: Virginia

PostPosted: Tue Mar 31, 2024 2:46 am    Post subject: a poll for media server distribution Reply with quote

Hi everybody,

Let me start by declaring myself as not maybe a total newbie, but somehow close to it. I have no programming background, and everything I learned, I learned by personal dedication and experience, which mostly is composed of stupid mistakes. Therefore, if you encounter any stupid questions from my part, please be gentle to me as much as you can Smile.

I am lucky to have an extra PC at home, which I use as a media and back-up server. It is a Pentium 4-HT, with 2 HDDs of 250 GBs set up with RAID1 (via motherboard). It is connected to my wireless network via a PCI card using RaLink rt61 chip. It sits next to my desktop PC under my desk, there is a KVM switch which lets me to switch back and fort using the same monitor, keyboard and mouse. It runs on Mandriva 2024.0, which is very stable I think. What it actually does as a media server is streaming audio playlists (10 simultaneously) to the LAN as mp3 streams, which in turn can be played back via my receiver downstairs like different radio channels. The receiver has a nic and it is connected to the wireless router via an ethernet cable. I use vlc for streaming and overall it does a good job, although I have a Kalarm setting that kills all vlc processes every 3 days and restarts them. If I don't do this then vlc somehow gets bloated and its performance decreases significantly, creating hiccups and more in the streams. The reason I chose Mandriva at the first place was because it was easy to install, it had a good hardware support (wireless card worked out of the box) and it was easy to configure with numerous friendly tools.

Now as much as I love Mandriva 2024.0, it is getting old. I cannot upgrade vlc for example via rpms, because newer versions are simply not available for it. I am now considering to upgrade its OS, but I am not sure if I should chose Mandriva 2024.1. I will definitely wait until I see its perfomance on my desktop first. Now my server administrator experience is limited to those written above, therefore I thought I should get your valuable opinions about my questions. I don't think it is a good idea to install a desktop distribution on this box anymore. Its hardware will probably suffer from anything more than kde 3.5. I am also even questioning whether I should install WMs or not. OTH, I remember when I was trying to set up the vlc streams, I couldn't get cron do the "killall vlc, restart the script" routine every three days, Kalarm saved my life for that purpose. I am also not quite sure if I am capable yet for a WMless server administration role, although it feels exciting. I know there is a few people here who are fond of Arch linux, I don't know if it would be a good choice. I am open to suggestions really, but I think whatever is to be installed, it has to support wireless networking either out of the box or with a few simple configuration changes. It needs to be easy to install, very stable, with respectable amount of documentation/support and preferably an option for server installation instead of or in addition to desktop installation.

I certainly need your suggestions. Since I am coming from a desktop background, I am sure many server concepts are not quite familiar to me, so I will appreciate any key points that you can teach me or point me towards the right direction. After all this text, if I didn't provide some of the key information needed, I am ready to do so.

Kindest regards,

Hakan


Back to top
View user's profile Send private message
platinummonkey
Advanced Member


Joined: 01 Mar 2024
Posts: 732
Location: Texas

PostPosted: Tue Mar 31, 2024 12:38 pm    Post subject: Reply with quote

vlc restart thing could be handled by cron. I don't think you had your script setup right Wink
Code:
SHELL=/bin/bash
0 0 */3 * * killall vlc
1 0 */3 * * vlc &

should be all you need Wink Or whatever your vlc startup command is Razz just append a "&" to the end so it backgrounds it Razz
This will kill vlc at midnight every third day, and restart vlc at 12:01am every third day Razz
you'll have to crontab /path/to/that/file/thefile to add it Razz (a good place might be /etc/cron.d/ to put it so you don't forget Wink Razz

For any easy thing just intall a desktop, and when you are not using it, ssh into and stop the wm/de (gdm: /etc/init.d/gdm stop) or w/e it is for you Smile and start it when you want a desktop Razz It'll save you a little bit on resources Wink



_________________
desktop - FreeBSD 7.2
laptop & server - Archlinux i686 kernel26 2.6.32.10-1
- TAMULinux-2.0.2-ALPHA
USB Boot - Archlinux i686 kernel26 2.6.32.10-1 USB boot
Back to top
View user's profile Send private message Visit poster's website AIM Address
VHockey86
Advanced Member


Joined: 12 Dec 2024
Posts: 988
Location: Rochester

PostPosted: Tue Mar 31, 2024 8:28 pm    Post subject: Reply with quote

The xbox media center (the one for modded original xbox, not the xbox 360 stuff) is still the best media center application I've used. I know they have a port for linux/mac/windows now, but I haven't tried it myself.

Unfortunately an older P4 system like that probably isn't powerful enough for 1080p HD content.

--edit--
Ops, I guess I should have read the OP a little more thoroughly. I thought you were looking for something to be a media center/server for a living room (to play videos / TV / music / etc).

If you're just looking to stream audio with VLC than really just about any distro will be able to do it... If you're familiar with Mandriva you could keep using that, although it's really bulky and overkill for what you're doing probably.

Myself, I would probably just slap Ubuntu on it because it is easy to install and still relatively lightweight (1 CD, as opposed to multiple CDS and/or DVds like Fedora/Mandriva/OpenSuse). From there you can just install SSH / VLC and whatever else you need with their aptitude or apt-get or their GUI package manager.

You could simply set it up to not start GDM (the gnome desktop manager) on startup if you wanted it to operate more like a server.


Back to top
View user's profile Send private message
lberg
Sr. Member


Joined: 28 Jul 2024
Posts: 1289

PostPosted: Tue Mar 31, 2024 9:13 pm    Post subject: Reply with quote

Yeah, Ubuntu would be a good distro. 8.04 LTS will have updates/be supported for 3 years, so if you want something like that, it's there. If you do go with Ubuntu, one of the first things you want to do, since it'll be a media server, will be to install the ubuntu-restricted-extras package, which provides a lot of the common audio/video codecs.

As for Arch, it depends on how excited you are. I'm one of the guys that really likes Arch. If you're really excited to get it set up, then go for it! It'll be worth it Very Happy



_________________
2 Computers: Arch Linux, 64-bit
3 Computers: Arch Linux, 32-bit
Back to top
View user's profile Send private message
hakova
New Member


Joined: 03 Feb 2024
Posts: 40
Location: Virginia

PostPosted: Tue Mar 31, 2024 9:40 pm    Post subject: Reply with quote

Thanks for the replies.

Platinummonkey, when I did try cron to do the job you summarized, it killed all vlc sessions running simultaneously but just didn't restart them. At that time I spent some time reading and googling and eventually concluded that cron was made for relatively simple tasks and restarting an application like vlc might not be within its limits. Now, having said that, the command line I was using at that time was vlc, which was starting the GUI as well; that might be an explanation why not. Now I am doing it with a '-I dummy' option, which enables to run it without the GUI, therefore it may now be started via cron. I need to try and see perhaps.

VHockey86, I tried Ubuntu 7.something last year when I was first setting the box up. At that time Ubuntu not only failed to recognize the wireless card initially, but also failed to configure by any method I tried for wireless networking with the card I had. I am not even talking about WPA or anything, it is just connecting to the router without encryption. After reading quite a bit in Ubuntu forums, I concluded that RaLink cards were not within Ubuntu's supported hardware list. That was why I gave up on Ubuntu. There is a chance that they might have a better support now, but instead of switching to it from Mandriva, which I am quite familiar with, I may as well stop the dm as others suggested and gain some resources from there and save myself from the learning curve.

lberg, what would be the advantages of Arch over Mandriva you would say? According to their web site they are supporting RaLink cards although it seems like there would be a need for fine tuning for configuration. I guess I am trying to assess whether it would be worthwhile to spend some time on the learning curve. For that, I think I should also consider the disadvantages of Arch over Mandriva as well; would you mind brainstorming with me on that, too?

Regards,

Hakan


Back to top
View user's profile Send private message
Cope57
Sr. Member


Joined: 25 Jan 2024
Posts: 1602
Location: 34.638673, -98.384704

PostPosted: Tue Mar 31, 2024 10:05 pm    Post subject: Reply with quote

Three distribution which found my wireless on my laptop even from the liveCD were Dreamlinux, Crunchbang Linux, and open SUSE.

Not to say they will work with your hardware, but you can give them a try.

I also liked eAR OS for a multimedia distribution, but it did not find my wireless for my hardware. As for using it for a media distribution, I have not tested it for that purpose. It does however play all the media I have with no issues.



_________________
This block is for DISTRO information ONLY, all other information will be removed by the Site Administrators.
Debian GNU/Linux testing - Linux 2.6.32-4-amd64
Back to top
View user's profile Send private message Visit poster's website
lberg
Sr. Member


Joined: 28 Jul 2024
Posts: 1289

PostPosted: Tue Mar 31, 2024 11:13 pm    Post subject: Reply with quote

Sure, hakova. The main advantage of Arch would be that once you get the base system set up, you would only install what you want/need. For example, Arch doesn't come with any sort of GUI--if you want one (which you mentioned that you might not), you have to install it. Mandriva, OTOH, comes with a ton of packages in its install that you won't ever need for a simple machine streaming audio through VLC. Another advantage is that Arch Linux is a very fast distro--one of the fastest out there. It'll be light on your resources, where something like Mandriva might tax them a little more to get the same job done. Another advantage of Arch is its rolling-release system. Basically, every time you update your system, you are running the most current form of the distribution. The installation CD's are just "snapshots" of the way Arch Linux was at the time. However, with distros like Mandriva and Ubuntu, they have individual releases, like 2024 vs 2024 or 8.04 vs 8.10 or 9.04. As you are discovering, once a new release is out with these types of distros, the old releases often aren't officially supported anymore, and you can't get updates for the packages without upgrading to a totally new release. The disadvantage of Arch, as you already sort of know, is the learning curve and effort it takes to get an up-and-running system. Another disadvantage that rarely will affect you will be occasional stability issues. Sometimes (as I said--very rarely) after an upgrade, stuff will break on your system. Usually, a new, fixed, version of the "bad" package will be posted within a matter of hours...but sometimes it takes a few days.

A good site to look at would be this one. The "Preface" section will be especially helpful to give you an idea about what Arch Linux is about. And a skim through this guide will be helpful to show you what the install process is like.

Crouse also wrote a helpful how-to, here. Of course, you won't need any of the KDE-related stuff if you don't want a GUI or don't want KDE.

The Archwiki site on the rt2x00 driver will provide a lot of information for your wireless setup. Your rt61 card is supported by the rt2x00 drivers. If you use WEP as your encryption, you won't need anything else, but if you use WPA, you'll have to do a little more work. This page will be helpful in getting your card associated with your AP.

If there's anything else I can answer, or anything I left out, say so. As for whether the learning curve is worth it, if you want to significantly improve your knowledge of Linux, then Arch is worth it. If all you want to do is get this server up and running, I actually would recommend installing Ubuntu/Mandriva, and leave it at that. You're right--the learning curve of Arch might not be what you're looking for right now. Wink



_________________
2 Computers: Arch Linux, 64-bit
3 Computers: Arch Linux, 32-bit
Back to top
View user's profile Send private message
hakova
New Member


Joined: 03 Feb 2024
Posts: 40
Location: Virginia

PostPosted: Wed Apr 01, 2024 12:27 am    Post subject: Reply with quote

platinummonkey wrote:
vlc restart thing could be handled by cron. I don't think you had your script setup right Wink
Code:
SHELL=/bin/bash
0 0 */3 * * killall vlc
1 0 */3 * * vlc &

should be all you need Wink Or whatever your vlc startup command is...

I tried cron again to fire up my vlc script (cvlc_onkyo) instead of your third line:
Code:
#!/bin/bash
vlc -vvv -I dummy /home/hako/Music/erkan_ogur.m3u --sout '#standard{access=http,mux=raw,dst=:8080}' --loop &
vlc -vvv -I dummy /home/hako/Music/oyun_havalari.m3u --sout '#standard{access=http,mux=raw,dst=:8081}' --loop &
vlc -vvv -I dummy /home/hako/Music/turk_folk.m3u --sout '#standard{access=http,mux=raw,dst=:8082}' --loop &
vlc -vvv -I dummy /home/hako/Music/gundogarken.m3u --sout '#standard{access=http,mux=raw,dst=:8083}' --loop &
vlc -vvv -I dummy /home/hako/Music/turkish_modern_folk.m3u --sout '#standard{access=http,mux=raw,dst=:8084}' --loop &
vlc -vvv -I dummy /home/hako/Music/protest.m3u --sout '#standard{access=http,mux=raw,dst=:8085}' --loop &
vlc -vvv -I dummy /home/hako/Music/turk_pop.m3u --sout '#standard{access=http,mux=raw,dst=:8086}' --loop &
vlc -vvv -I dummy /home/hako/Music/turkish_rock.m3u --sout '#standard{access=http,mux=raw,dst=:8087}' --loop &
vlc -vvv -I dummy /home/hako/Music/turkish_classic.m3u --sout '#standard{access=http,mux=raw,dst=:8088}' --loop &
vlc -vvv -I dummy /home/hako/Music/smv_thunder.m3u --sout '#standard{access=http,mux=raw,dst=:8089}' --loop &
vlc -vvv -I dummy /home/hako/Music/powerturk.m3u --sout '#standard{access=http,mux=raw,dst=:8090}' --loop &
vlc -vvv -I dummy http://xx.xx.xxx.x:8875/ --sout '#transcode{acodec=mp3,channels=2}:standard{access=http,mux=raw,dst=:8091}}' --loop &

The result was very unpredictable, at times 3/10 vlc sessions would start, whereas at other times 5/10 vlc sessions would, but it was never 10/10. I don't know what interrupts cron from running the whole darn script and start the whole 10 sessions. My crontab is as follows:
Code:
...
0 0 */3 * * killall vlc
1 0 */3 * * su hako /home/hako/bin/cvlc_onkyo 2>&1

If I can't get this thing work, I will have to go back to kde and kalarm for this very purpose.


Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Wed Apr 01, 2024 12:46 am    Post subject: Reply with quote

have you looked into MPD/icecast as a setup for this? MPD has a rather small memory footprint and few if any memory leaks that I have found (and i've had it running nonstop for almost six months now).

last I checked it only supported streaming OGG style but MP3 support was in the works and well on its way to stable. It shouldn't be hard to set it up with multiple configs/instances to stream multiple channels from one computer.



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
platinummonkey
Advanced Member


Joined: 01 Mar 2024
Posts: 732
Location: Texas

PostPosted: Wed Apr 01, 2024 5:21 am    Post subject: Reply with quote

that bash script needs a:
Code:
wait


at the end Wink otherwise the script will exit and kill the launched processes Razz

also, the cron script shouldn't need a 'su' Razz

mpd/icecast really is quite lightweight and reliable, its just not the easiest imo to set up the first time you do it Razz after that first time its quite intuitive Razz Wink and I do prefer it Razz



_________________
desktop - FreeBSD 7.2
laptop & server - Archlinux i686 kernel26 2.6.32.10-1
- TAMULinux-2.0.2-ALPHA
USB Boot - Archlinux i686 kernel26 2.6.32.10-1 USB boot
Back to top
View user's profile Send private message Visit poster's website AIM Address
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Wed Apr 01, 2024 1:58 pm    Post subject: Reply with quote

the gentoo wiki actually has a really great page describing exactly how to set up MPD and they even have a page for icecast.

It hasn't been updated since the big wiki crash so it is slightly out of date, but still very accurate and easy to follow

www.gentoo-wiki.info/MPD
www.gentoo-wiki.info/Icecast



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
hakova
New Member


Joined: 03 Feb 2024
Posts: 40
Location: Virginia

PostPosted: Wed Apr 01, 2024 3:05 pm    Post subject: Reply with quote

Well I spent quite a bit of time last night to setup mpd/icecast. For the most part things went OK, but I just couldn't get the stream up and running. I was trying to multicast by defining as much as 10 entries for shoutcast in icecast.xml, I wonder if that was the right thing to do. I will work on this some more tonight, starting with one stream first. The icecast server indicated no connected sources (mpd) on its web interface.

Just to clarify things, my receiver cannot make requests for playlists or web pages. It can only connect to existing streams, like internet radio stations. Therefore I need continuously running audio streams each looping individual playlsits. Do you think this can be done by mpd/icecast or are they basically on-demand type of servers? Assuming this can be done, then the next question would be how to set up multicasting. It looked like mpd only served from one port, 6600. If there will be simultaneous streams, I would assume this is not adequate. Do you think I will need multiple instances of mpd, if this is even possible? And lastly, on mpd wiki, it is indicated that one could get a http stream by mpd, decode and serve it on the fly. I couldn't find any documentation on how to do this. I guess the link to the stream should somehow be listed in the mpd music database, but how is it going to get there? BTW, do I need an mpd client, since all I want to do is to stream? I thought not, but maybe I do.

Well, I apologize for my burst of questions. I will keep working on it and post some answers AND further questions most probably in near future.

Hakan




Last edited by hakova on Wed Apr 01, 2024 3:44 pm; edited 2 times in total
Back to top
View user's profile Send private message
hakova
New Member


Joined: 03 Feb 2024
Posts: 40
Location: Virginia

PostPosted: Wed Apr 01, 2024 3:38 pm    Post subject: Reply with quote

platinummonkey wrote:
that bash script needs a:
Code:
wait


at the end Wink otherwise the script will exit and kill the launched processes Razz


Thanks platinummonkey, I have never had to use that before, I will definitely do it now and let you know about the outcome.

Quote:
...also, the cron script shouldn't need a 'su' Razz


In that box, the regular user doesn't have cron privileges for some reason. Lazy me, instead of figuring why, I just defined that cron job as root and that was my attempt to run that particular line as the regular user Razz.


Back to top
View user's profile Send private message
hakova
New Member


Joined: 03 Feb 2024
Posts: 40
Location: Virginia

PostPosted: Thu Apr 02, 2024 4:17 am    Post subject: Reply with quote

Gentoo Wiki wrote:
MPD provides the most flexibility of input, it will be able to decode any audio file (for the most part) and then dump out an ogg vorbis stream. (...)
So the OGG format just won't work for you? Well there is a way to stream MP3 formatted streams using muse (...) Important: Muse is a gruff little bear to deal with. It doesn't like being detached from a TTY and has no built-in ability to migrate itself to the background. It refuses to accept playlist files with extensions different than .pls, claiming that such a file does not exist. It also does not have an option to write its logs to a file; it wants to write to standard error.

It is all because of the receiver's inability to read ogg streams Sad . I finally got mpd and icecast work in concert. I hadn't realized that there had to be an mdp client (in my case mpc) to serve the audio to the icecast Embarassed , once I figured that out, I didn't have much more trouble. That was when I realized the stream was ogg, not mp3, although it was named as x.m3u and x.mp3 respectively in the mdp.conf.
I don't feel like I should deal with the Muse. Its latest version was released in late 2024 according to the website. It sounds old and not too flexible IMHO. Besides it was not the one recommended here previously.
This why I went back to vlc and my little script. Tried putting the 'wait' command at the end of the script without any arguments, tested cron and still saw that the number of vlc sessions were still very variable and unreliable (3-5 instead of 11) Crying or Very sad . At least I have a working solution using kde and kalarm, but it is kind of a shame that I can't seem to do this without the WM.


Back to top
View user's profile Send private message
hakova
New Member


Joined: 03 Feb 2024
Posts: 40
Location: Virginia

PostPosted: Fri Apr 03, 2024 3:55 am    Post subject: Reply with quote

Well, I made it work without the WM with not so much of an elegant way Razz . I split my original script into 5 pieces with 2-3 vlc sessions per script, then summoned them via cron individually with the same time setting for each of them.
Code:
0 4 */3 * * /home/hako/bin/cvlc_cron1
0 4 */3 * * /home/hako/bin/cvlc_cron2
0 4 */3 * * /home/hako/bin/cvlc_cron3
0 4 */3 * * /home/hako/bin/cvlc_cron4
0 4 */3 * * /home/hako/bin/cvlc_cron5

It works now. Before doing this, I tried the 'wait' command again couple of more times, placed at the end of my original long script, but it didn't do what I wanted. I kept getting 3-4 sessions of vlc at every try.
I don't have any WM now, and I do have a working stream.
On switching to Arch linux Rolling Eyes ... While I was trying to set up MPD/icecast, I noticed how much I relied on the GUI tools Mandriva provided for system and user configuration, to add groups, priviledges, as well as tweaking the firewall; I realized how difficult it would be for me to set up a system without them (i.e. Arch linux). I guess I will stick with Mandriva at least for now, maybe switching to a lighter version of it, like One or free addition instead of powerpack. I am 41 and I don't do I.T. to make a living, so it is not only learning CLI that is hard for me, but also to keep what I learn, since I am not going to use them on a daily basis Laughing . Who knows, if I end up having a little bit more time on my hands, this will be an exciting challenge for me, no question about it. And if I decide doing that, you guys will definitely be aware of the situation by my not-so-smart questions Laughing .


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Audio and Video Applications All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse