Translate

Saturday, 22 June 2013

Streaming mp4 videos from an Android device to gmediarender on a UPNP-enabled remote device

gmediarender is a resource efficient UPNP-compatible media renderer suitable for lower specification devices such as the Raspberry pi.

Skifta can be used as both media server and control point (i.e. the remote) but in my experience mp4 files can't be streamed from the Skifta server on the phone (HTC One V in this case) to gmediarender. This results is an error "media unable to perform play".

One solution is to use BubbleUPnP as the control point with the setting Mime-type check unchecked (this setting can be found under "UPNP tweaks"). Within BubbleUPnP on the Android device either Skifta or BubbleUPnP  can be used as the media server.  

Another app which works well with gmediarender is MediaHouse which plays back mp4s without any need to configure the app.   

The UPnP Play app seems to have the same issue with mp4's being streamed to gmediarender, it returns "unsupported format video/mp4"

Sunday, 16 June 2013

How to create create karaoke videos in Linux from midi files created in the nted score editor

The pykaraoke utility can be used to generate karaoke videos in Linux from original midi files created using the nted score editor. Other score editors in Linux that I have tested do not appear to work (Denemo, Musescore, Rosegarden) as they don't produce a midi file with lyrics in a form which can be  processed by pykaraoke. Another solution is to use Noteworthy composer under wine. Noteworthy is an excellent score editor with a very user-friendly interface although not open source. Noteworthy produces tidier output because hyphens used to separate syllables in the lyrics do not show in the final video. In Noteworthy, midi files must be created a type 0 (there is a pick list in the midi export dialog). nted is a good solution for Linux. It has more advanced functionality in some areas than Noteworthy.


First create a midi file with lyrics using nted as explained in the documentation. Make sure the midi score  doesn't start with rests as this causes music/video synchronisation issues. Export the nted score you have created in midi format.

Download and unpack this script into your folder which contains the pykaraoke scripts and make the script executable. Run the script with the first argument as the midi file and the second argument as the soundfont e.g.:

karaoke /midi_files/my_midi_file.mid /my_soundfonts/soundfont.SF2

The script produces a standard video in mp4 format. You can also run the nted midi file directly using a progam such as kmid but the music won't be synchronised accurately with the lyrics in my experience and the output is not so easily shared as an mp4 video.  

The script assumes:

  • python 2, mjpegtools, mplayer, ffmpeg and fluidsynth are installed
  • you are running the script from the same folder into which you have downloaded the pykaraoke scripts (pykaraoke also has its own dependencies)
  • a soundfont is available on your system (such as FluidR3_GM.sf2)  

Any further information needed, please leave a comment.
Alert icon