FFmpeg and Azure Media Services

Today I was preparing some video material for upload onto the Azure Media Services portal. Since MXF format is not supported as source for Azure Media Services I did transcode it with ffmpeg. I uploaded the videos but every encode job would fail with this error

Encoding task
UserInput : File type or codec not supported.

I checked again and again:

  • mp4 container: supported
  • aac audio, various profiles: supported
  • h264 video, various profiles: supported

But every encode task would fail. It turns out that ffmpeg encodes video in a 4:2:2 bitplane format by default but Azure supports only 4:2:0. By adding the option
-pix_fmt yuv420p
the the ffmpeg command line Azure encodes the videos resulting without any issue

VMware Horizon View Linux Ubuntu LTSP Thinclient

Focus here is not how tho setup a LTSP infrastructure but how to build a LTSP image to be used as a thin client for VMware Horizon View. PXE, tftp NBD is not discussed here.

We use the standard LTSP setup process, since this is the fastest way to get up and running . You need also to download the vmware linux view client. Some steps could contain errors, but you can use this as a guideline. I used 12.04 LTS for the ltsp image and 14.04 for the server.

Many ideas and code borrowed here https://github.com/leschartreux/ltsp-vmview , thank you!

Download the latest x86 VMware View Client bundle for linux

ltsp-build-client --arch i386 --kiosk --skipimage --dist precise --chroot ltsp-vmview
chmod a+x VMware-Horizon-Client-xxxxx.x86.bundle
cp VMware-Horizon-Client-xxxxx.x86.bundle /opt/ltsp/ltsp-vmview/root/
ltsp-chroot --arch ltsp-vmview /root/VMware-Horizon-Client-xxxxx.x86.bundle

You should get an output similar to this one and I did choose those options:

Smart Card(The Smart Card component enables Smart Card device
redirection from your local computer to the remote desktop.) [yes]: no

Real-Time Audio-Video(The Real-Time Audio-Video component allows you
to use local computer's webcam or microphone on the remote desktop.)
[yes]: no

Client Drive Redirection (Tech Preview)(The Client Drive Redirection
component enables folder redirection from your local computer to the
remote desktop.) [no]:

USB Redirection(The USB component enables USB device redirection from
your local computer to the remote desktop.) [yes]:

Virtual Printing(The Virtual Printing component allows you to use
local or network printers from a remote desktop without requiring that
additional print drivers be installed in the remote desktop.) [yes]: no

The product is ready to be installed:
USB Redirection
Horizon Client

Proceed the with some additional packages and setup:

ltsp-chroot --arch ltsp-vmview apt-get install libxss1 openssl openssh-server hsetroot matchbox flashplugin-nonfree libv4l-0 libudev0 libv4l-0 libudev0 libudev0 dvsource libv4l-dev acpid --yes

ltsp-chroot --arch ltsp-vmview ln -s /usr/lib/vmware/view/usb/libssl.so.1.0.1 /lib/i386-linux-gnu/libssl.so.1.0.1
ltsp-chroot --arch ltsp-vmview ln -s /usr/lib/vmware/view/usb/libcrypto.so.1.0.1 /lib/i386-linux-gnu/libcrypto.so.1.0.1
ltsp-chroot --arch ltsp-vmview ln -s /lib/i386-linux-gnu/libexpat.so.1 /usr/local/lib
ltsp-chroot --arch ltsp-vmview adduser --disabled-password view
ltsp-chroot --arch ltsp-vmview adduser view audio
ltsp-chroot --arch ltsp-vmview adduser view pulse
ltsp-chroot --arch ltsp-vmview adduser view pulse-access

ltsp-chroot --arch ltsp-vmview mv /etc/rc2.d/S50vmware-USBArbitrator /etc/rc2.d/S90vmware-USBArbitrator
ltsp-chroot --arch ltsp-vmview mv /etc/rc2.d/S55vmware-view-USBD /etc/rc2.d/S99vmware-view-USBD

Now it’s time to create some files:

ltsp-chroot --arch ltsp-vmview vi /etc/vmware/.xinitrc

matchbox-window-manager &
xset s off         # don't activate screensaver
xset -dpms         # disable DPMS (Energy Star) features.
xset s noblank     # don't blank the video device
exec /usr/bin/vmware-view  --allmonitors -l -s https://brooker.fqdn -d LOGINDOMAIN
shutdown -h now

ltsp-chroot --arch ltsp-vmview vi /etc/lts.conf

KEEP_SYSTEM_SERVICES="acpid upstart-socket-bridge"

ltsp-chroot --arch ltsp-vmview vi /usr/share/ltsp/screen.d/vmview

# The following script works for LTSP5 and was tested in Ubuntu 9.10 (Karmic Koala) Linux.
# Original rdesktop script by James A. McQuillan,
# modified for LTSP5 by Colin Osterhout of SERRC (www.serrc.org).
# modified for VMWare View Open Client by
#   Mikael Fridh 
# This software is licensed under the Gnu General Public License.
# The full text of which can be found at http://www.LTSP.org/license.txt

PATH=/bin:$PATH; export PATH
. /usr/share/ltsp/screen-x-common

if [ -x /usr/share/ltsp/xinitrc ]; then

mkdir /home/view/
cp /etc/vmware/.xinitrc /home/view/
chown -R view  /home/view/
su - view -c "xinit" >/dev/null

ltsp-chroot --arch ltsp-vmview chmod a+x /usr/share/ltsp/screen.d/vmview

ltsp-chroot --arch ltsp-vmview vi /etc/vmware/view-mandatory-config


Now build the image
ltsp-update-image ltsp-vmview
And you are ready to deploy