How to Stream Movies or Music to Amazon Fire Stick, Mobile Phone, or Apple TV
If you are like me, you have a library of music or movies on your PC and would like to watch them on your TV. Why not create your very own media server that you can stream content from! Creating your own media server has a lot of advantages:
- You can watch or listen to content from anywhere
- You can easily transfer large files such as photos to friends or family
- You can organize and keep all your media in one place
In this example, I am using a Raspberry Pi as my server. I also have an external HDD plugged into my Pi which contains all the media files.
Download App that Supports Network Sharing
You will need to download an App that supports Network connections such as Archos or Kodi. Kodi is the gold standard of media players. Kodi, fka XBMC ("Xbox Media Center"), was originally created as a media center application for the first-generation Xbox game console (no longer supported), but is now officially available as a native application for Android, Linux, Mac OS X, iOS, and Windows operating systems. Unfortunately, at this moment, Amazon and Apple do not include Kodi as an official app in the store to download. However there are many guides that describe how you can download Kodi into your FireStick or Apple TV. A quick search will yield a plethora of tutorials.
Create Your Media Server
Now we finally get into it. You have lots of options and protocols to use for streaming your media. FTP, SFTP, or WebDav would all be good choices, but after using each of them, I have found that WebDav is the easiest to set up and streams the fastest. Below is an outline of the steps to set it up:
- Install an Apache HTTP Server
- Configure Apache to run WebDAV protocol
- Configure Port Forwarding on your router to point to your Raspberry Pi
- Setup Kodi to connect to your WebDAV server
- Enjoy all your music and movies from anywhere in the world!
1. Install an Apache HTTP Server
Update all available Packages:
$ sudo apt-get update
Install Apache2 Server
$ sudo apt-get install apache2 -y
2. Configure Apache to run WebDAV protocol
Open up httpd.conf located here: /etc/httpd/conf/httpd.conf
$ sudo nano /etc/httpd/conf/httpd.conf
Find and uncomment the following lines in httpd.conf. This tells Apache to load the modules needed for the WebDAV protocol.
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
Find the line: DocumentRoot "/srv/http".
Add the following below it. This defines the folder location where the WebDAV server will be and who has access to it. In our case, it is open to everyone. You can always password-restrict access later if you need to:
DAVLockDB /home/httpd/DAV/DAVLock
Alias /dav "/home/httpd/html/dav"
<Directory "/home/httpd/html/dav">
DAV On
AllowOverride None
Options Indexes FollowSymLinks
Require all granted
</Directory>
You are now done with httpd.conf. You can save and exit using Ctrl+O and Ctrl+X from the Nano editor.
From the terminal, create the directory and assign permissions to it:
$ mkdir -p /home/httpd/DAV
$ chown -R http:http /home/httpd/DAV
$ mkdir -p /home/httpd/html/dav
$ chown -R http:http /home/httpd/html/dav
Now you can restart the Apache server and test to see if it works:
$ sudo systemctl restart httpd
In my case I wanted to store all my media on an External HDD so I wouldn't take up precious disk space on my Raspberry Pi. To do this, simply bind your mountable drive to your new WebDAV folder.
Find your drive letter by running: sudo fdisk --list
For this example, our external drive is: /dev/sda
Mount the drive to /mnt/HDD
and then bind it to /home/httpd/html/dav/
$ sudo mkdir /mnt/HDD
$ sudo mount /dev/sda1 /mnt/HDD
$ sudo mount -o bind /mnt/HDD /home/httpd/html/dav/
So that you don't have to run the above commands every time you restart your Raspberry Pi, you can edit /etc/fstab
and it will automatically mount and bind whenever your Pi boots:
Add the below two lines to /etc/fstab
/dev/sda1 /mnt/IomegaHDD ext4 rw,user,exec 0 0
/mnt/IomegaHDD /home/httpd/html/dav/ none bind 0 0
Test if your Apache WebDAV server is running using Cadaver
$ sudo apt-get install cadaver
$ cadaver http://localhost/dav
If you are able to successfully connect to the WebDAV server, test if you can create a new directory using the below:
dav:/dav/> mkcol test
Creating `test': succeeded.
dav:/dav/> ls
Listing collection `/dav/': succeeded.
Coll: test
3. Configure Port forwarding on your router to point to your Raspberry Pi
Congratulations!!! You now have a working and running WebDAV server! Now you need to configure your router so you can access it from anywhere in the world.
Log into your router, usually by entering 192.168.1.1 (for Comcast it's 10.0.0.1) in your web browser.
If you have never logged into your router before, your Username and Password can be found on the router itself.
Once you have logged in, you need to find a section for "Port Forwarding." In this section, set Port 80 to route to your Raspberry Pi's IP address, which you can find by running ifconfig
in your Raspberry Pi. It will most likely come up next to the inet line and be something like: 192.168.1.xxx or for Comcast 10.0.0.xxx
To check if you set up your router correctly you can visit http://canyouseeme.org/ and check Port 80. If you receive a "success" message, you are all good to go! Take note of the Your IP" that is displayed because you will need to use that as your server when connecting Kodi.
4. Setup Kodi to connect to your WebDAV server
In Kodi, go to Video, TV, or Music depending on what you are streaming. In each section click "Add Files" and then "Browse" and "Add Network Location"
- Protocol: Web server directory (HTTP)
- Sever Address: (Your IP Address - get it from http://canyouseeme.org/)
- Remote Path: dav
- Port: 80
You can leave Username and Password blank if you didn't set them up in your WebDAV configuration.
Conclusion
If you made it this far, congratulations again!!! There are a lot of steps and pieces you need to get right, but you can do it. Read each step carefully and you can get it to work. It is not easy but doing this will teach you a lot about basic networking and how to use your Raspberry Pi as a WebDAV server.
Thank you! This is super helpful! I can’t wait to listen to all my downloaded music and watch all my downloaded movies through my FireStick!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you, I'm glad you found it useful!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @neogenesis! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
You published your First Post
You got a First Vote
Click on any badge to view your Board of Honor.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last announcement from @steemitboard!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @neogenesis! You have received a personal award!
1 Year on Steemit
Click on the badge to view your Board of Honor.
Do not miss the last post from @steemitboard:
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @neogenesis! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hello there. With over 70 million songs available to stream or download, there's something for everyone on the Amazon Music streaming service. Whether you love rock, pop, classical, hip-hop, jazz, or any other genre, Amazon Music has it all. Numerous reviews here https://amazon-music.pissedconsumer.com/review.html suggest that this level of selection and variety makes it an invaluable resource for music lovers who want to expand their horizons and discover new artists and sounds.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit