YoLinux.com Tutorial: Video, DVD players, TV and Multimedia

This covers Linux video players, DVD players, TV, HDTV and Hauppauge WinTV PCI card use. Included in this tutorial are links to software, video formats and information pertaining to video multimedia on Linux. This page also includes a tutorial on the use of the Hauppauge WinTV PCI card, linux video conferencing, surveillance, capture and TV broadcast display under Linux.

Contents:

Also see:

Related YoLinux Tutorials:

°Burn DVD on Linux

°Real Video Streaming

°Systems Administration

°Network configuration

°Internet Security

°Firefox Configuration / Plug-ins

°Ripping MP3s

°Streaming MP3s

°Integrate Linux into MS/Windows environment

°YoLinux Tutorials Index




Free Information Technology Magazines and Document Downloads
TradePub link image


Linux Video and DVD Players:

There are plenty of Linux Video applications for playing and editing various video file formats, codecs and media (VCD, DVD). Trouble with a particular codec is often resolved by upgrading to a newer version of the player or choosing a different player. I find that the system default is NOT always the best choice.

DVD,-RAM provides 4.7 GB per side storage. The average DVD movie can hold up to 5GB of data. There are currently 6 forms of copy protection which apply to DVD's.

CSS: Content Scrambling System is used by the entertainment industry to provide copy protection. Each CSS licensee possesses one key (of an available 400) which is stored on the CSS encrypted DVD. Most DVD's are encoded with Macrovision copy protection. CSS can employ CPPM (Content Protection for Prerecorded Media). This adds the concept of renewability and revocation. CPRM (for recordable media) support is supported by all DVD recorders released after 1999. Each blank recordable DVD has a unique 64-bit id. When protected content is recorded onto the disk, in can be encrypted with a cypher derived from the disk ID. During playback, the disk ID is read and used to generate a key to decrypt the contents of the disk. If copied to another disk, the id will be absent or incorrect and thus not decrypted.

DTCP (Digital Transmission Copy Protection) allows for the exchange of keys between players, digital TV's and other devices.

How to burn a DVD - YoLinux Tutorial

For more on DVD encryption see:

Linux Video Media File and DVD Player Software:

  • MPlayer - General media player and plugin. Can play CSS encoded DVDs and supports subtitles.
    Awesome (best) software but may violate patents and intellectual property laws. Plays DIVX, DVD and VCD media as well as MPEG files.
    Documentation: Supports
    • codecs: mov, mp3, mpeg-1 (VCD), mpeg-2(SVCD/DVD/DVB), mpeg-4 (ASP/H264), OpenDivX (DivX4/5), Xvid, RealViddio (1/2/3/4), Sorenson, Intel Indeo 3/4, FLI/FLC. HuffYUV, ...
    • video: AVI, DVD, MPEG, ASF, QT, Real, Ogg, FLI, Plays Real media, wav, SGI, H264, Indeo3, Sorenson3, VP3, 3ivx, FFv1, ASV1, VCR1/2, QuickTime, DVB, Tivo, Windows Media Video 7/8, MS/Windows WMV, Open DivX, ...
    • audio: mp3, RealAudio, ogg, AC3, ACC, WMA, alaw, ...
    (MPlayer video codec list)

    To play DVD:
    • gmplayer dvd://1 -alang en
    • or gmplayer and right click on the display screen to pull up menu and select "DVD" + "Open disk...".
      You can also select audio options here too. I had to select "DVD" + "Audio Languages" + "English - Dolby Digital Stereo" to get sound to work properly and stop the horrible buzzing noise.
    • or select from the FC-3 desktop menu bar "Applications" + "Sound and Video" + "MPlayer"

  • VideoLan.org: VLC (Video Lan Client) - Plays encrypted DVD's directly from DVD-ROM. (MPEG 1/2, VCD and DVD player) Also plays MPEG and video streams.
    Supports:
    • codecs: ac3, mpeg-1, mpeg-2, mpeg-4, DivX, mp3, ogg, H.264, MKV, WebM, wmv, ...
    • video: AVI, ASF/WMV/WMA, Real, flv (Flash), x11, xmga, xvideo, multicast IPv4/6
    • audio: AAC, DTS, AC3/A52, alsa, arts, eds, oss, sdl, mp2, mp3

  • Ogle - Plays CSS encrypted DVD's directly from DVD-ROM. Supports DVD menus, navigation and subtitles. Plays DVD and VCD media as well as MPEG files.
    Downlowd packages (freshRPMs.net: i386, x86_64, ...): libdvdcss, libmad, a52dec, libdvdread, ogle, and (optionally) ogle_gui.
    YUM install:
    Install package "ogle":
    • yum -y install ogle
    • yum -y install ogle_gui

    (See YoLinux tutorial on YUM configuration and how to add the FreshRPM.net site to your download list.)
    Command line start: ogle -u gui /media/cdrecorder
    I never got Ogle to work properly.

  • InterVideo: LinDVD - Commercial DVD support for Linux (Used by IBM Thinkpad) Legally plays CSS encoded DVD's.
  • xine - DVD's, VCD's, CDA and MPEG video media player.
    Install packages: xine, xine-lib, xine-skins
    Supports:
    • codecs: avi, divx, mp3, mpeg-1, mpeg-2, quicktime, vorbis
    • video: aa, opengl, syncfb, x11, xv
    • audio: alsa, arts, esd, oss
  • Totem - GNOME xine-lib or GStreamer library based DVD movie player. Totem is the default player for Red Hat/Fedora and is compiled with GStreamer libraries. If you want to play DVDs you need to install totem-xine because GStreamer does not have working support for the playing of DVDs. Download from FreshRPMs.net.
  • Heroine Virtual: XMovie Quicktime (non-Sorenson codec), MPEG 1/2, DVD
  • OMS/OMI Linuxvideo - MPEG 1/2, DVD
  • Multimedia4Linux.de - DVD Links
  • xAnim - Simple and works great on low power computers. Plays various AVI, MJPEG and Quicktime Codecs. Plays limited list of media files, no DVDs.

DVD Tips:

  • Fedora: To auto play DVD upon insertion select from the desktop menu bar, "Applications" + "Preferences" + "Removable Storage". Specify the command to play the DVD:
    • gmplayer dvd://1 -alang en
    • xine --auto-play --auto-scan dvd


Nonlinear Video Editing Software:

Fully integrated video editing GUI suites are available for Linux. The integrated GUI environment tends to be developed independently of the libraries which support the various codecs. I find that choosing the library which is at the foundation of the application is ultimately what defines the experience.

  • OpenShot - Simple interface and easy to use. Integrates Blender for 3D animation support and Inkscape for titles. Supports Chroma-key (blue/green screen to remove a color), layer and composite, key frame animation, stop motion (importing of images), audio support. Python/Gtk GUI using MLT video editing framework. MLT gives OpenShot the ability to mix multiple formats, Frame Rates, Frame Sizes, Video Codecs and Video Containers. Powerful yet simple.
    Ubuntu installation: apt-get install openshot
    See our OpenShot video editor tutorial
  • Kdenlive - KDE4 based Non-Linear Video Editor which is fully featured and easy to use - Uses FFmpeg as the decoding engine, MLT as its frame server with EDL for the backbone. Configurable GUI. Handles regular DV and HD. Built-in effects. Supports video capture.
    Ubuntu installation: apt-get install kdenlive
    LJ review 10/01/07
  • Avidemux - very simple editor supporting filtering, encoding, simple cuts. Supports AVI, MP4. Scriptable mode as well. Not enough features to do many basic video editing tasks.
    Ubuntu installation: apt-get install avidemux
  • Heroine Virtual: Cinelerra [alt] - MPEG/Quicktime viewing/editing/development. Open source video editor Broadcast 2000, Cinelerra. No longer under development.
  • Kino - Record, create, save, edit and play movies from DV camcorder. Cuts only editor. Includes playback.
  • Lives: Linux Video Editing System. GTK+, cut/paste frames, capture/playback, time stretch, resizing, audio and effects.
  • LVE: Linux Video Editor - outputs PAL only. (Under development)
  • MainConcept - Commercial transcoding, encoding tools, codecs for Linux.
  • Matterial - non-linear editing and compositing for movies. Create sound effects, animations or 3-D graphics. (Alpha)
  • Novacut - Collaborative, cloud enabled and real time screencast, collaborative network editing software
    ppa.novacut.com/stable
  • Open Movie Editor - FLTK GUI, FFmpeg or libquicktime decoding engine support. Can run audio through JACK Audio Connection Kit for Linux pro audio tools connectivity. Supports video asset management. Titles using Inkscape. Can use multiple formats, Frame Rates, Frame Sizes, Video Codecs and Video Containers. Support for filters, color adjustment, effects and node based composting. Written in C++.
  • Pitivi - uses GStreamer Multimedia Framework for ingestion and output of video. Supports many formats (audio and video codecs) and aspect ratios. Supports clip insertion/moving/trimming, effects, transitions.
    Ubuntu installation: apt-get install pitivi
Support Tools: LJ video editor review 11/29/05

Commercial Linux Video and digital effects software

Note that the Kdenlive and OpenShot editors are GUI front-ends to the Media Lovin' Toolkit (MLT) Framework. Many other video tools are also based upon this framework.

For screen writing software see Celtx.

See our OpenShot video editor tutorial

[Potential Pitfall]: AVCHD MTS format video gets out of sound-video sync when output by the video editor even though the input MTS file was in sync. It also seems like many of the video players like vlc can't even play the MTS video format without the sound and video being out of sync. I find that mplayer will play the video and sound in sync but its related mencoder program does not seem to convert MTS to an output file and format which remains in sync. Luckily ffmpeg seems to do the trick.
Try: ffmpeg -i 00038.MTS -f avi -b:v 16000k -b:a 192k 00038.avi
This will result in a much smaller file size and there is some notable reduction in video quality.
Also: ffmpeg -i 00038.MTS -f avi -vcodec mpeg4 -b:v 17104k -b:a 384k 00038-ffmpeg-2.avi
(What I specified for my Sony Nex-5 MTS video format.)

  • -i = input file
  • -s = size eg "-s = 1280x760" Place after input file specification.
  • -f = format, appeared neccessary
  • -b:v = videobitrate A larger number inflates the file size. A low number decreases the file size but also reduces quality
  • -b:a = audiobitrate


Video Libraries:

  • a52dec: [Home Page] Library for decoding ATSC A/52 (aka AC-3) audio streams (required by ffmpeg)
  • faad2: [Home Page] Library and frontend for decoding MPEG2/4 AAC (required by ffmpeg)
  • faac: [Home Page] Reference encoder and encoding library for MPEG2/4 AAC audio strams (required by ffmpeg)
  • ffmpeg: [Home Page]
  • id3lib: [Home Page]
  • imlib2: [Enlightenment]
  • lame: [Home Page] MP3 Encoder
  • libquicktime: [Home Page]
  • libsamplerate: (SRC - Secret rabiit code) [Home Page]
  • libsndfile: [Home Page] (required by libsamplerate):
  • xvidcore: [Home Page] OpenDivX video codec (required by ffmpeg)


Command Line Video Manipulation And Editing:

mplayer:

(Download RPM from the MPlayer website: http://www.mplayerhq.hu/)
  • Extract audio stream from a video: mplayer -dumpaudio video-file.mpg -dumpfile audio-file.mp3
  • Enhance video sharpness: mplayer video-file.avi -vf smartblur=.6:-.5:0,unsharp=l5x5:.8:c5x5:.4
  • Convert a video file of arbitrary format to a sequence of images:
    • JPEG: mplayer -nosound -vo jpeg video-file
    • PNG: mplayer -nosound -vo png:z=[0-9] video-file
    • Animated GIF to PNGs: mplayer -nosound -vo png animated.gif
  • Play at 4x speed and 50% more brightness: mplayer -speed 4 -brightness 50 -fs video-file.avi

mencoder:

(Download RPM from the MPlayer website: http://www.mplayerhq.hu/)
  • Rotate Video:
    mencoder -vf rotate=1 -ovc lavc -oac copy mvi_Carolee.avi -o CaroleeVideo.avi
    Rotate:
    • 0 Rotate by 90 degrees clockwise and flip (default).
    • 1 Rotate by 90 degrees clockwise.
    • 2 Rotate by 90 degrees counterclockwise.
    • 3 Rotate by 90 degrees counterclockwise and flip.

  • Concatenate video clips: mencoder -oac copy -ovc copy -o outputfile inputfiles*
    • Works great on AVI files: mencoder -oac copy -ovc copy -o file-name-out.avi inputfiles*.avi
      I found that audio messes up on MOV files. Thus if you want to maintain sound synchronization with MOV files, first convert to AVI, concatenate the AVI files, than convert back to MOV.
    • Force a common framerate, codec and aspect: mencoder -noodml -oac copy -ovc lavc -of avi -ofps 30 -aspect 16:9 -o fileAB.avi fileA.avi fileB.avi
    • If videos are not identical: mencoder -noodml -oac lavc -ovc lavc -of avi -ofps 30 -aspect 16:9 -o fileAB.avi fileA.avi fileB.avi
      (If the video codecs of the clips you wish to concatenated vary slightly then a "copy" will not work, thus specify a common codec)
    Mencoder Options:
    • -ovc copy: Video Codec - instructs that you want to leave the video as it is and simply copy it into the new video file that uses the audio track you specified - no encoding, just streamcopy.
    • -oac copy: Audio Codec - no encoding, just streamcopy

  • Lay down audio track: mencoder -audiofile new-audio-track.wav -oac mp3lame -ovc copy file-name-in.avi -o file-name-out.avi
    • -oac mp3lame: Audio Codec - Encode to MP3 (using LAME)
    • -oac pcm: Audio Codec - Encode to uncompressed PCM
    • -oac lavc: Audio Codec - Encode with a libavcodec codec
    If this does not work for you because the release you are using did not compile in support for your codec of interest, try ffmpeg (see below).

    See the YoLinux.com list of Public Domain Music sources

  • Create video from image file sequences (JPEG to AVI): mencoder -ovc lavc -mf fps=25:type=jpg 'mf://*.jpg' -vf harddup -ofps 25 -noskip -o file-name-out.avi
    To read JPEG image list from a file specify the following: -mf fps=25:type=jpg "mf://@temp.txt"

  • Create video from a single image (JPEG to AVI):
    1. First use one file to generate many unique images for use in video frames. The image resolution must match your target video resolution (eg: NTSC 720x480, PAL 720x576, HD720 1280x720, etc). Use a symbolic link so that it does not fill up your hard drive.
      File: img2video
      #!/bin/bash
      for i in {1..100}
      do
         counter=$(printf %03d $i);
         ln -s $1 img"$counter".jpg
      done
                       
      Useage: img2video file-name.jpg
      This generates one hundred files (actually all symbolic links to the original file file-name.jpg with names from img001.jpg to img100.jpg
    2. Aggregate the images into a video: mencoder -ovc lavc -mf fps=25:type=jpg 'mf://img*.jpg' -vf harddup -ofps 25 -noskip -o file-name-out.avi
      Can also add "lavc" encoding options and HDTV aspect ratio: mencoder -ovc lavc -mf fps=30:type=jpg 'mf://img*.jpg' -vf harddup -ofps 30 -noskip -aspect 16:9 -lavcopts vcodec=mjpeg -o file-name-out.avi
      This generated about 4 seconds of video.

    Complete script:
    #!/bin/bash
    
    for jpgfile in $@
    do
    PDIR=`echo $jpgfile | awk -F"." '{print $1}' `
    mkdir $PDIR
    
    for i in {1..100}
    do
       counter=$(printf %03d $i);
       ln -s $jpgfile $PDIR/img"$counter".jpg
    done
    
    cp $jpgfile $PDIR
    
    cd $PDIR
    /usr/bin/mencoder -ovc lavc -mf fps=30:type=jpg 'mf://img*.jpg' -vf harddup -ofps 30 \
                      -noskip -aspect 16:9 -lavcopts vcodec=mjpeg -o ../$PDIR.avi 
    
    cd ../
    # rm -Rf $PDIR
    done
                     
    Usage: img2video fileA.jpg fileB.jpg
    This will generate two video clips fileA.avi and fileB.avi
    Note that the images in this example are of a resolution 1280 x 720 and result in a HD aspect video. When done remove the working directory.

mencoder man page - movie encoder

ffmpeg:

  • Convert Video File Formats:
    • MOV to AVI: ffmpeg -i file-name-in.mov -sameq -vcodec msmpeg4v2 -acodec pcm_u8 file-name-out.avi
      Note this will maintain audio during the video translation.
    • MPG to AVI: ffmpeg -i file-name-in.mpg file-name-out.avi
    • FLV to AVI: ffmpeg -i file-name-in.flv file-name-out.avi
    • AVI to FLV: ffmpeg -i file-name-in.avi file-name-out.flv
      or: ffmpeg -i file-name-in.avi -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv file-name-out.flv

  • Add sound to a video and convert AVI to MPEG: ffmpeg -i sound-file.wav -i file-name-in.avi file-name-out.mpg

    See the YoLinux.com list of Public Domain Music sources

  • Extract audio track from a video: ffmpeg -i video-file-in.avi audio-file-out.mp3

  • Create a snaphshot of a flash video: ffmpeg -i file-name-in.flv -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320×240 snapshot.jpg

  • Create a jpeg snapshot every 12.5 seconds (1/0.08) from video: ffmpeg -i file-name-in -r 0.08 -s 320x240 f%06d.jpg

  • Overlay an image (eg a logo) over an entire video: ffmpeg -i video-in.avi -sameq -vhook '/usr/lib/vhook/watermark.so -f transparent-frame-logo.gif' -an video-out.avi
    Note: /usr/lib/vhook/*.so is part of package ffmpeg.
    Also, use a transparent image the size of the frame with logo in corner of frame.

ffmpeg man page - video converter

Video File Discovery/Interrogation:

  • ffmpeg -i file-name.avi
  • mplayer -vo null -vc null -ao null -identify file-name.avi
    Will print video information before playing.


View HDTV on Linux:

HD-5500 Hi Definition Television card:

This pcHDTV card works with Xine. The pcHDTV HD-5500 supports ATSC/NTSC TV reception and accelerated motion compression support with NVidia GeForce4 and Quadro 4 cards. Also supports MPEG-1/2/4 video capture.

Note:

  • pcHDTV includes a patched version of Xine which supports this card.
  • This card supports the receiving of HDTV airwave broadcasts. See Antennaweb.org top select an HDTV antenna manufacturer and HDTV broadcast stations in your area.
  • HDTV resolution can be as high as 1920x1080.
  • Data capture of HDTV is about 20Mbps. (1hr = 7.2Gb)

Links:


View TV/Listen to FM radio on Linux: (w/ Hauppauge WinTV PCI)

icon
Hauppauge model 447 WinTV PCI card: This PCI card integrates a cable ready (also aerial, satelite, video, S-video) television tuner (125 channels), video capture and an FM radio tuner. The product includes an infrared remote and a color video camera. (Newer versions also ship with headphones with mic and volume control) It is based on the bt 878 Brooktree chip-set.

Hardware:

I installed a Hauppauge model 447 WinTV PCI card and Kudzu detected it upon system boot and made the appropriate system configuration changes. No further system configuration changes were required. Kudzu added the following line to the file /etc/modules.conf:
alias char-major-81 bttv

The following devices are supported by the WinTV card:

  • /dev/radio - FM radio
  • /dev/vbi - TV call sign data
  • /dev/video0 - TV

How to generate devices if they did not get generated properly:

[root prompt]# mknod /dev/video0 c 81 0
[root prompt]# mknod /dev/video1 c 81 1
[root prompt]# mknod /dev/video2 c 81 2
[root prompt]# [root prompt]# ln -s /dev/video0 /dev/video

The following modules are loaded:

  • videodev.o: The video4linux device module
  • bttv.o: Driver for the Hauppauge card.
  • i2c.o: Interface for bus to framegrabber.
  • tuner.o: Tuner module to switch chanels.
  • msp3400.o: Stereo

I then installed speakers on the audio output of the WinTV card and the cable TV coax to the cable TV/antenna input.

Audio may be configured one of three ways:

  1. Connect speakers directly to the WinTV "Line Out" connector. (Use amplified speakers.)
  2. Connect the WinTV "Line Out" to your sound card "Line In" connector on the rear of your computer.
  3. Use the "internal" connector provided to internally connect the WinTV card to the internal "Aux In" on the sound card. This connector looks like the connector which connects the CD to the sound card internally. When using this method use the sound controls provided in KwinTV.

Note: The graphics card displays the image generated by the WinTV card. Thus they must communicate together. The graphics card must support "Primary Surface Mode" (write to graphics card display memory. Modern video cards do.) or your computer must have loads of memory to hold the video image.


Video capture/encoding using Real Producer:

YoLinux Real media tutorial: Real Producer video capture/encoding - Using the Hauppauge WinTV PCI card

TV Viewing Software:

Tested on Red Hat 7.1. My preference is KwinTV. I have read that deficiencies in the i2c.o driver necessitate that only one application access the Hauppauge card at a time or risk eeprom damage.

  • KwinTV:

    I installed Red Hat (7.1) RPM kwintv-0.8.5-5
    Using kwintv: (The following directions are USA broadcast specific. Other broadcast standards are supported by KwinTV)

    • KwinTV home page
    • Start kwintv: /usr/bin/kwintv
    • Scan stations: (Not necessary)
      • "Program" + "Widard" (Next)
      • Select "NTSC" (Next)
      • Unselect "Scan whole frequency band" and select "USA cable" (Next). If using an antenna select "broadcast".
      • Select "Start". After scan is complete select Next.
      • Select "Finish"
    • Configure channel selection:
      • "Program" + "Browser"
      • Select leftmost icon which is "Add new program"
        • Select a channel
        • Set "recieving region" to "USA [cable]" (USA residents)
        • Set "input video format" to "NTSC" (USA residents)
        • Set "input source" to "Television"
          (Note: Set to S-Video to view input from color video camera which comes with the Hauppauge WinTV PCI card or S-Video camcorder. )
        • Assign it a "program name" (i.e. NBC, CNN, etc)
        • Select "OK"
      • Keep adding new programs till your viewing selections are complete.
    That is all there was to it! It was so simple. KwinTV can perform image file "streaming" capture to a series of PPM image files (View with xv), video capture to an AVI file (View with xanim) and capture snapshots to a JPEG, PNM or PNG file.

    KwinTV Notes:

    • Up/Down arrows change channels.
    • KwinTV channel configuration file: $HOME/.kwintvrc/default.ch
    • Use your camcorder as your video source and then you can use KwinTV to video capture (channel 3/4) the analog input to AVI.
    • TV viewing software uses /dev/video0
    • To exit the application type the letter "q" for Quit.
    • The BT848 chipset converts the input from the TV tuner to a digital YUV 4:2:2 sampling (24 bit RGB) for display by the VGA graphics card.
    • Peripherals:
      • Want to play your console video game and display on your computer? Plug the output of the game console into the Composite Plug on the TV card. Radio Shack can sell you an adaptor for Left/Right audio of the console to the Line-in plug of the sound card.
      • VCR's and camcorder will also be able to feed the TV card.

    [Potential Pitfall]: KwinTV supports infrared remote controls but I could not get it to work. See: Linux Infrared Remote Control (LIRC) Project
    [Potential Pitfall]: While playing with XawTV I messed it all up and the screen setting was too dark. To fix this condition, launch KwinTV and select "Program" + "Browser..." (or the program browser icon). Select the channel and select the edit icon. Then select the options tab and reset the contrast/hue/brightness/color.

  • Zapping: (Easier to use but less capable than KwinTV. Unfortunately it is also more buggy.)

    It's that simple. The advertised video capture and image capture did not work for me. The closed captioned text worked well.
    Obtains station call sign info/id from device: /dev/vbi0 (cool feature)

    [Potential Pitfall]: Over time it tends to operate slower and slower if attempting video capture. (Bug) It will eventually hog the full resources of your computer.
    [Potential Pitfall]: Often exits poorly leaving processes running. Kill processes before restarting.

  • XawTV: (NOT recommended)
    • XawTV Home Page
    • Download: XawTV
      Includes the /usr/bin/radio console program which works with the Hauppauge WinTV/radio card.
    • Configuration:
      • Start program: /usr/bin/xawtv
      • Press "Enter" (Enter/Carraige Return)
      • Press right mouse button to bring up menu. Do it again to toggle it off.
      • Select "TV Norm" and select option "NTSC". If the screen scrolls out of frame do this again to correct the picture.
      • Select "Frequency table" and select option "us-cable"
      • Select "Channel Editor" (or press letter "e")
        • Change channels by selecting the UP or Down arrow.
          Note: Cursor MUST be in the "Channel" data entry field or in TV viewing screen.
        • Give the channel a name (i.e. Fox-TV) and select the "Add" button.
    Not pretty (in fact it's ugly) but it is complete. I found that it was not very reliable and behaved flakey at times as it responded strangely to the controls. i.e. contrast/hue/brightness settings would suddenly and randomly go to zero upon a channel change and I would loose the picture, tuning would be inacurate and fuzzy, the window would scroll etc.
    I do NOT recommend this TV viewer!!
    Configuration file: $HOME/.xawtv

Video capture file sizes:

Image Size Frames/Sec Bytes/Sec One Min video
160x120 15 425 Kb/sec 26 Mb
320x240 15 850 Kb/sec 52 Mb
320x240 30 1.7 Mb/sec 104 Mb

Video Notes:

  • NTSC frame ratio: 4:3 or 640x480 resolution at 30 full frames/sec (60 half frames/sec interlaced).
  • NTSC displays 480 horizontal scan lines (The NTSC standard refers to 525 total including non-visual data such as closed caption text and 511-525 blank. Theoretical resolution: 720x525. Theoretical bandwidth: 27 Mb/s uncompressed.)
  • Video devices often degrade the 480 scan lines to:
    • VHS video tape: 240
    • S-VHS: 420
    • Broadcast Cable: 330
    • Satelite: ~400
    • DVD: 500
    • Laserdisc: 420
    • PC quality video: (typically)
      • NTSC: 352x240
      • PAL: 352x288
  • Movie Theater frame ratio: 16x9 at 24 frames/sec
  • HDTV: 1080 horizontal lines x 1920 vertical lines (1920x1080)
  • PAL/SECAM: 4x3 frame, (x625 theoretical total), 25 frames/sec, 50Hz, 50 half frames/sec interlaced.
  • Broadcast NTSC MPEG-2: 720x486, 15Mbits/s
  • Hauppauge video capture 320x240 (Want to do better, go HD digital and firewire)


FM radio software:

Applications for TV cards with an FM tuner onboard:

  • DengerinRadioFM: Simple, allows station presets.


    • http://oss.mdamt.net/radiofm/ - DengerinRadioFM Home Page
    • Execute: /usr/bin/radiofm
    • Configuration file for preset stations: $HOME/.radiofm

  • radio: Part of xawtv-3.34-1 TV viewing RPM. Text console program. It works. See radio man page.

  • Gnomeradio: Gnome desktop radio

Did not try these:

  • fmtools - programs for Video for Linux radio cards
  • gTuner - GNOME radio controller


The Hauppauge XC77B/44x Webcam:

The webcam which ships with the Hauppauge model 447 connects to the cature card with an S-Video connection. This should be superior in bandwidth to a USB attached webcam.

Test the webcam: I used kwintv and Zapping.

  • kwintv:
    1. Select from the tool bar "Program" + "New".
    2. Select from the pull-down menu "Input source" - "S-Video"
    3. Watch yourself on kwintv.
  • Zapping: Change the pull-down selection on the tool bar from "Television" to "S-Video".
This test will allow one to view video from the webcam on the desktop.

For capturing video for Real Media streaming see the YoLinux tutorial on Real Producer.

If trying to find a power connector which is compatable with the Hauppauge VCM77 video camera, use the Radio Shack TA-910-5272. (DC inline jack OD 5.5mm x 2.5mm) This is a special order part. I found that my computer would not boot properly when the Hauppauge power cable was used in-line with the PS/2 connectors. Beware of the little "universal" power supplies which can provide multiple voltages. Use a volt meter on any voltage supply first!!! I fried a camera believing the voltage setting on one of these cheap power supplies. It was putting out twice the displayed voltage!!! The only voltage I trust is the PC power supply. It can supply 3.3, 5 and 12 volts. The Hauppauge video camera requires 5 volts. The outer cylinder is negative while the center post is a positive 5 volts. The red wires from a PC power supply are typically 5 volt lines.

Newer versions of the model 447 ship with the Pixera PXG-100 (N-NTSC or P-PAL) which uses a different power connector.

For compatible Video cameras see the YoLinux Harware Hauppauge compatible Video Cameras.


Links:


Video Webcams:

Software:

  • WebCamProShop.com
  • OpenMASH - Toolkit for collaboration and streaming applications. Uses multicast so don't expect it to work across the internet.
    Includes multi-user video conferencing tool, "vic": vic hostname/port-number
  • camE - rewrite of the xawtv webcam app
  • CamStream - C++/Qt based GUI tools for webcams and other video-devices
  • Gqcam - QuickCam/QuickPict clone (Video4Linux/GTK+)
  • Gspy - A Gnome security camera
  • Linux Motion Detection - watches a video device for activity


Video Conferencing:

Ekiga (once known as GnomeMeeting) is an open source SoftPhone, Video Conferencing and Instant Messenger Gtk application.
Home page: Ekiga.org

Ekiga supports SIP and H.323 telephony standards, audio & video, SMS to cell, text chat and audio only conferencing over the internet. It requires connecting to a server (SIP, PBX, ...) to allow each video conference user to locate each other and negotiate acceptable protocols. ( default is provided.)

Installation:

Debian/Ubuntu/Mint: apt-get install ekiga
Installs the following packages (Ubuntu natty): ekiga libopal3.6.8 libpt2.6.7 libsrtp0


GnomeMeeting: This tutorial covers Gnome Meeting 0.85.1 on Red Hat Linux 7.2. Gnome meeting is compatable with Microsoft NetMeeting.

GnomeMeeting supports audio, video, text chat and audio only conferencing over the internet. It requires connecting to an ILS server to allow each video conference user to locate each other and negotiate acceptable protocols. (A default is provided.)

Installation:

Red Hat/CentOS/Fedora: (Four RPM's were installed)
  • gnomemeeting-0.85.1-3.i386.rpm
  • GConf-1.0.8-4.i386.rpm
  • openh323-1.8.0-2.i386.rpm
  • pwlib-1.2.12-2.i386.rpm

GnomeMeeting Useage:

  1. Use Kwin TV to set the defaults on your video card. Gnome meeting does not do this well. You may end up transmitting CNN by mistake instead of your own video. The Hauppauge card seems to use the last setting. Using KWinTV, you need to set the S-video input as a channel - the lowest channel. Do this by first tuning to the lowest channel and then add a new channel set to be the S-video input. This will set channel 1 to be the S-video. (KWinTV: "Program" + "Browser...". Select the "Add new program" icon. Select "Input video format"=NTSC, "Input source"="S-Video" and assign it a "Program name" i.e. "Camera". Then select "OK".) Exit/Quit KWinTV and then set Gnome meeting to channel 1. ("Edit" + "Settings" + "Device Settings" and set "Video Channel" to "1".)
  2. Configure Gnome Meeting: "Edit" + "Settings":
    • Configure "Personal Data": Select ("Edit" + "Settings") + "Personal Data" Enter data and select "Update".
    • Configure "Directory Settings": I used the default ILS Directory argo.dyndns.org then select "Update" to notify the LDAP server. (Alternate ILS: gm.uk.linux.org)
    • The default in Gnome Meeting is video turned off. To turn it on select: ("Edit" + "Settings") + "Codecs Settings". Select the tab "General Settings". Depress the button "Video Transmisson" before connecting to the LDAP video server.
    • "Device Settings": Set "Video Format" to "NTSC" for the USA crowd. PAL for the Europeans. The "Video Channel" should be set to that matching your S-Video chanel set in KWinTV as described above.
  3. Select the Gnome Meeting "Book" icon to bring up the LDAP server browser - select the pull-down menu and select the ILS server argo.dyndns.org and select "Refresh".
  4. Right click to pick the person to connect to.

GnomeMeeting screen shot

Potential Pitfalls:

  • Audio mixer must have the mic un-muted. (/usr/bin/gmix)
  • My headset also has a microphone mute button on the cord - check it.
  • Slow networks will require one to reduce the number of frames sent per second (i.e. 1 or 2) or reduce video quality in order to preserve audio rates.
  • Firewalls are said to be a potential problem according to the GnomeMeeting FAQ.

Links:

Note for Microsoft Windows XP users: Start Netmeeting: "Start" + "Run" + conf.exe


Other Linux video conferencing options:


MythTV: Digital Video Recorder (DVR)

Linux has become popular as a DVR device OS. Three custom MythTV Linux distributions are available:

MythTV plugins: (included with the above distributions)

Links:


Video File Formats:

Digital Video Formats

MPEG:

Quicktime:

AVI: (Audio/Video Interleaved)

MWV: (Windows Media Video)


YouTube Video tips:

The typical YouTube video is embedded as an "iframe" or as an embedded "object":

IFrame:
<iframe width="520" height="293" src="http://www.youtube.com/embed/Ya5FbVhWNa0" frameborder="0" allowfullscreen></iframe>
Where "Ya5FbVhWNa0" is an example of a Video-ID

Embedded object:
<object width="640" height="360">
<param name="movie" value="http://www.youtube.com/watch_popup?v=Ya5FbVhWNa0&vq=large&aamp;utoplay=1&mamp;odestbranding=1&ramp;el=0"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="http://www.youtube.com/watch_popup?v=Ya5FbVhWNa0&vamp;q=large&aamp;utoplay=1&mamp;odestbranding=1&ramp;el=0" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="360"></embed>
</object>

YouTube iframe vs embedded object: The embedded object is delivered in Adobe Flash format which is not readily available on iPad and iPhone products and is only available on other platforms with a plugin. The iframe delivery mechanism compensates for the platform and if the platform does not support Flash format then and HTML5 compliant video format is used. On Android platforms the plugin is usually not installed by default and has to be downloaded.
For more on Flash support detection and video format selection see swfobject

YouTube video URL options:

OptionDescription and choices
video id Use full browser window: http://www.youtube.com/v/Video-ID
Typical: http://www.youtube.com/embed/Video-ID
autoplay 0: default. Do not start video play when player is loaded.
1: Start playing video when player is loaded.
Auto start the video: http://www.youtube.com/v/Video-ID?autoplay=1
loop 0: Default. Do not replay video or playlist over again
1: Continuously replay video or playlist
Loop the video: http://www.youtube.com/v/Video-ID?loop=1
modestbranding 0: Default. Show YouTube brand logo
1: Do not show YouTube brand logo
Example: http://www.youtube.com/v/Video-ID?modestbranding=1
autohide 0: Default. Show controls for play, sound control, progress etc
1: Auto hide controls when cursor leaves the video play screen.
Example: http://www.youtube.com/v/Video-ID?autohide=1
rel 0: Do not show related videos at end of video and do not show serach function.
1: Default. Show related videos
Turn off recomended videos: http://www.youtube.com/v/Video-ID?rel=0
#t Skip ahead 1 minute and 10 seconds of video: http://www.youtube.com/watch_popup?v=Video-ID#t=1m10s
Also see the "start" option.
start Specify the number of seconds time offset for start of video (Next video frame is the actual start)
iv_load_policy 1: Default. Show annotations
1: Do not show annotations.
Annotations can be added to your video while logged into YouTube. This feature not availabel on the HTML5 version of the player.
color red: Default color for the video progress bar
white:
theme dark: Dark theme controls. Dark control bar.
light: Light control bar
controls 0: Default. Do not enable the YouTube Javascript API
1: Enable the Javascript API
enablejsapi 0: Do not show player controls
1: Default. Show player controls
Requires use of the "playerapiid" option.
fs 0: Do not enable the full screen button
1: Default. Enable the full screen button
Not supported in the HTML5 API
showinfo 0: Do not show into.
1: Default. Show video title and rating before video starts.
Not supported in the HTML5 API
Note that some features are not yet available in the pure HTML5 video player.

Full list of YouTube embedded player parameters
YouTube Javascript API

Digital Video Hardware / Software:

Overview of making movies with Linux. - Overview from Production to Distribution - by Ben Moore

Hardware:

Video Software:

  • mjpegtools - MPEG2 encoder and MPEG tools.
  • Multimedia4Linux.de - Links and info
  • Blender - Mostly a 3-D modeler but it contains some editing features.
  • VideoLan.org - MPEG 1/2, VCD and DVD player/tools
  • GNU: VCDImager - VCD generation tools.
  • Jahshaka video and film compositing and special fx system. Computer Graphics, paint and image processing modules.
  • Coriander - GUI for IEEE-1394, IIDC-Compliant Digital Cameras. Control, save and stream video (Beta)
  • GStreamer - Streaming video by applying filters to media and streaming. (Under development)
  • dv2jpg - converts an "avi dv2" format video stream into an "mjpeg-encoded" video stream, for later converion into a mpeg/video cd.
  • Qarbon Viewlet Builder authoring tool - JAVA Web based Video applet viewer [FAQ]
  • Video software from Schirmacher:
    • DVgrab - Convert to AVI. Digital video (DV) capture and other command line tools.
      (part of the Kino project)
    • Kino - Nonlinear video editing
      Note: While a 333 Mhz system will work, the pleasure of use of this software is dependant on the speed of your computer.
  • Video Conferencing:

API/Tools:

  • Khronos.org - API for Embedded Media Authoring and Acceleration - Industry consortium
    • OpenMAX - MPEG 4 streaming API (nVidia GPU codec support)
    • OpenML - Standard for Dynamic Media Authoring
  • Linux 1394 AV/C Library - libavc1394 is a programming interface for the 1394 Trade Association AV/C (Audio/Video Control) Digital Interface Command Set.


Links:

Development Libraries:


Books:

Broadcast 2000 : A Free Digital Moviemaking Kit
by Curtis Lee Fulton
ISBN #1886411700, No Starch Press

If you want to learn how to use the Broadcast 2000 video editor for Linux from HeroineWarrior.com, you will need this book.

The Official Blender 2.3 Guide
by Ton Roosendaal, Stefano Selleri
ISBN #1593270410, No Starch Press

Manual to the 3-D graphics and animation program Blender.

Amazon.com
The Blender Book
by Carsten Wartmann
ISBN #1886411441, No Starch Press

Manual to the 3-D graphics and animation program Blender. This helps decipher the Blender interface.

Amazon.com
Mbone: Interactive Multimedia on the Internet
by Vinay Kumar
ISBN #1562053973, New Rider Publishing

What it is and how to use the MBone multicast video conferencing system.

Amazon.com
No image available Digital Video Camcorders: Open source programmers guide
by Tewell
ISBN #0750677619, Newnes

For programmers and embedded systems engineers and professionals.

Amazon.com
   

    Bookmark and Share


Advertisements




Copyright © 2001 - 2014 by Greg Ippolito