DLNA Servers on Fedora

Use Case

This Blog shows how you can view video content stored on your Android Phone  such as Samsung Galaxy Note 2 on your Computer running Linux Operating System such as Fedora 17. ( Android Phone -> Computer )

Later we reverse engineer to  view Video Content Stored on your Fedora Operating System on our Mobile Device  ( Computer -> Phone Android )

We will not be using USB cables for this exercise but use local Intranet

Disable firewall

On Fedora 18 We need disable firewall , On fedora you can use the following shell script to do that and run it as root. Please note if the firewall is ON we would not be able to stream content from Android to Linux or from Linux to Android

#!/bin/bash
echo "Stopping firewall "
/etc/init.d/iptables save
/etc/init.d/iptables stop
chkconfig iptables off
systemctl stop firewalld.service

Install DLNA

DLNA Server needs to be installed on Fedora to make it available for other Devices with in the same network

[root@james james]# yum install minidlna
....
Installed:
  minidlna.x86_64 0:1.0.26-1.fc18    
Dependency Installed:
  libid3tag.x86_64 0:0.15.1b-13.fc18

Configure a Folder on Linux Machine running DNLA Server so that other devices can access

sudo gedit /etc/minidlna.conf
...
media_dir=/home/james/mydnlafolders/media
friendly_name=James DLNA Server
..

Start DNLA Servers as root

systemctl start minidlna

Computer to phone

Select Settings -> More settings -> Nearby Devices -> Turn ON the File Sharing Option by clicking on the File Sharing Checkbox.

From Google Playstore Download and Install UPnPlay under Library select James DLNA Player you should be able to see

let us detect the DNLA Server in our case James DLNA Server , then we can browse for media files on the computer and play those files directly on to the Android Device . example we can browse for media files or image files and they will be rendered on the mobile device over the network

PHONE TO COMPUTER

It took me some time to understand how this would work, You would a device on which Media files on the android device can be played on computer , The Best Software i found was XBMC

On Computer

Install XBMC on fedora , Under System -> Settings select the following

  1. Allow control of XBMC via UPNP
  2. Share Video Via UPNP
  3. Allow Control of XBMC via HTTP

On Android Device Open Video Player, on the upper tab you should see nearby Devices , You should see both

  1. XBMC
  2. James DLNA Server

Click on the video file on top right , you see a share icon click on that the media file will be played on XBMC running on Linux

About Author

Author