Social media

Monday, December 25, 2017

DLNA and UPnP and VLC

DLNA is an attempt to normalize media interoperability between devices. It comes from UPnP. It makes it easy to cast media (video, audio, images) content. Modern TVs are able to deal with this already, so you can stream from a DLNA server to you TV. But TVs aren't the only devices able to show video and audio streams. Among other media players the Video-LAN-Client (VLC) can also access the stream.

While on the Android version of VLC this is straight forward by just opening VLC itself and it will show the folder shared, for desktop versions there is some work required.

Luckily it's very easy, although hidden; I would had put it under "File -> open" instead of the playlist. Instead you just open the playlist (Show ->Playlist, or press CTRL-L) and there you select Local Network and there Universal Plug'n Play and you should see the shared folder(s) and inside the media files.

Happy streaming!

Saturday, August 8, 2015

How to create a playlist on VLC for Android devices

This information seems to be outdated by now since newer VideoLan (VLC) for Android versions have a working playlist function. This site explains it nicely. But I leave the old info here because the same method can be applied when editing a text file on the Android file system otherwise.

Searching the web for this topic today (August 2015) raises more questions than answers. Even the official Videolan documentation does not have an answer (August 2015 that is). Because when ever you created a playlist, the first time you play a different media file out of this list it scratches your playlist. More by accident I discovered a way to create a playlist which isn't lost. Unfortunately the procedure I describe needs you to log in to the Linux itself, running on every Android device, thus many people who have no knowledge about Linux (or have not Linux installed on the desktop or laptop computer) might not succeed.

As mentioned you need to have access to the Linux running on Android. You need to create a file there which contains a list of the files you want to have in the playlist on your device - one line for any song or video you want in this playlist.


You can either install ADB (Android Debug Bridge command line tool) (here an example for Debian, but other Linux distributions should have it too - use your package manager to find and install it) or the SDK suit which is also available for other platforms like Windows or Mac. You also need to connect your Android device with your computer via USB cable and activate USB debugging mode. This example is for Nexus, but shall work on any Android.

Further assuming you put this playlist file into the same directory where you have all media files you want in this playlist to ease this procedure, you need to create this playlist inside this directory.

Creation of the playlist from outside of Android

If you have an identical directory on your computer, because by chance you once copied the whole content from your computer to the Android device, and all files are media files without exception, you execute (for Linux)

cd where/your/directory/is

ls -1 >> playlist.mp3

Using Windows you might type

dir * >> playlist.mp3


Note that the playlist file has an extension *.mp3 which is technically incorrect because playlist files usually have something like *.m3u or *.pls and other. But as I mentioned I found this out by giving *.mp3 extension by accident.

Verify that the just created playlist file has one line your each media file.

Getting the playlist file to your Android device

On your computer execute

adb push playlist.mp3 /sdcard/where/your/media/files/are/playlist.mp3

where /sdcard/where/your/media/files/are is where your files are actually located on your Android. You're done. Start VLC on your Android, select Directories and find playlist.mp3. Select it and VLC should now play all the files.

Creation of the playlist from inside of Android (using Linux)

Log in to the Linux running on your Android device by executing

adb shell

Change the so called working directory to where your media files are located.

cd /sdcard/where/your/media/files/are


ls -1 > playlist.mp3

I am not sure if the "-1" works on all Android Linuxes. If it fails try without "-1" and hope it just creates this file with one line for every song without any other information. Verify this.

You're done. Start VLC on your Android, select Directories and find playlist.mp3. Select it and VLC should now play all the files.

I hope that works for you. Enjoy! Please post here if you found any errors or have comments.