User Tools

Site Tools


cross_platform:temporal

  

The USB video device class (also USB video class or UVC) is a USB device class that describes devices capable of streaming video like webcams, digital camcorders, transcoders, analog video converters and still-image cameras.

MPlayer

It provides a nicely minimal video player. You have to get the hang of the keyboard shortcuts.

http://en.wikipedia.org/wiki/MPlayer > a command line application which has different optional GUI front-ends for each of the operating systems on which it runs… MPlayer interprets most video and audio formats natively through the libavcodec library of the FFmpeg project. For those formats where no open source decoder has been made yet MPlayer relies on binary codecs. It can use Windows DLLs directly with the help of a DLL loader forked from avifile (which itself forked its loader from the Wine project).

the Wikibook

https://en.wikibooks.org/wiki/Mplayer

MPlayer is a multi-platform media player. It handles many file formats, and can play CDs, VCDs and DVDs. MPlayer also includes Mencoder which is a powerful video conversion program. Both MPlayer and Mencoder can be used from the command line (shell). MPlayer has one official graphical interface (GMplayer), however there are several third party graphic interfaces that allow access to some of Mencoder's functionality.
If you experience problems, just launch mplayer via Windows CMD to get good feedback as to what the trouble is. Dragging and dropping files into a windows command line will print the name, to avoid having to type names/directories. This works with every functionality of mplayer.
Keyboard shortcuts for MPlayer include:
  • q = quit
  • r = sub position -
  • t = sub position +y
  • T = enable/disable stay on top mode
  • y = sub delay reset to 0
  • o/O = toggle on-screen display (enabled, disabled, time lapsed, time lapsed/remaining)
  • p = play/pause
  • [ = speed -10%
  • ] = speed +10%
  • { = speed x 1/2
  • } = speed x 2
  • a = sub alignment
  • d = toggle framedropping (on, hard, off)
  • f = toggle full-screen
  • j = toggle subtitle (off, language 1, language 2, etc…)
  • l = load file to playlist (GUI only)
  • z = sub delay -
  • x = sub delay +
  • c = skin browser
  • v = enable/disable subtitles
  • b = toggle subtitle (off, language 1, language 2, etc…)
  • m = mute on/off
  • / = volume down,
  • 0 = play
  • . = frame advance
  • 1 = contrast -
  • 2 = contrast +
  • 3 = brightness -
  • 4 = brightness +
  • 5 = tint - (green)
  • 6 = tint + (red)
  • 7 = color -
  • 8 = color +
  • / = volume -
  • * = volume +
  • - = audio-video delay -
  • + = audio-video delay +
  • up = forward 1 minute
  • down = back 1 minute
  • left = rewind
  • right = fast forward
  • home = beginning
  • end = end
  • pg up = forward 10 mins
  • pg dn = back 10 mins
  • # = toggle audio
OSD Menu

MediaInfo

MediaInfo

a GUI for viewing the information on Microsoft Windows and Mac OS X is provided.

mp4 recorded in portrait mode on my GT-S7560: mediainfo video_file_name.mp4 reports Rotation : 90°.

What is MediaInfo?

a convenient unified display of the most relevant technical and tag data for video and audio files

GUI

For my old netbook, I prefer to get the 32 bit only without installer version, un-7z it (taking care, it's a decompression bomb), and run MediaInfo.exe once to get it integrated into Explorer. After doing that, I can right-click on a media file to invoke it.

Preferences > Output > HTML - is most useful way to read it.

Video

Demuxing / demultiplexing basically means, when speaking of video formats, splitting the file that contains both audio and video data (and possible other data streams as well, like subtitles), into separate files, each containing one element of the original file.

Image change rate

There are several standard image-change rates (or frame rates) used today: 24 Hz, 25 Hz, 30 Hz, 50 Hz, and 60 Hz. Technical details related to the backwards-compatible addition of color to the NTSC signal caused other variants to appear: 24/1.001 Hz, 30/1.001 Hz, and 60/1.001 Hz.

Video compression - explained!

Display resolutions

1080p = High-definition video

generally any video image with more than 480 horizontal lines (North America) or 576 lines (Europe)

720p (aka HD) is a progressive HDTV signal format with 720 horizontal lines and an aspect ratio (AR) of 16:9 (1.78:1). All major HDTV broadcasting standards (such as SMPTE 292M) include a 720p format which has a resolution of 1280×720

480p's a size that plays well on my under-powered netbook.

The 480 denotes a vertical resolution of 480 pixel high vertically scanning lines, usually with a horizontal resolution of 640 pixels and 4:3 aspect ratio

The p common in today's resolutions refers to Progressive scan.

Wide 360p: 360p 640×360 16:9, is another good format for low-powered playback.

Encoding

AVC (Advanced Video Codec) Levels

Anamorphic Widescreen Video

a process by which a widescreen image is compressed horizontally to fit into a storage medium with a narrower aspect ratio. Compatible playback equipment can then re-expand the horizontal dimension to show the original widescreen image. This is typically used to allow one to store widescreen images on a medium that was original intended for a narrower ratio, while using as much of the frame - and therefore recording as much detail - as possible.

x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format, and is released under the terms of the GNU GPL.

VLC Player

  • MSWin port notes, including 'Keyboard shortcuts in the Windows (DirectX) video output'.
  • Settings are in /home/$USER/.config/vlc/vlcrc (%userprofile%\AppData\Roaming\vlc\vlcrc).

Keyboard Shortcuts:

  • - slows down by .1x ([ key on N130)
  • + speeds up by .1x for each press (] key on N130)
  • = returns speed to normal
  • A to Change Aspect ratio
  • b to rotate through Audio tracks
  • v to rotate through Subtitles

snags:

http://www.videolan.org/ - is my preferred video player on MSWin and Linux. It can play DVDs (and ripped VOBs) with subtitles, ogg, Xvid, Apple's mov's, and has excellent shortcut keys. You can drag and drop a video onto it to play. And it keeps itself up-to-date nicely.

persistent Equalizer Settings

Just follow Stuart Finnis' guide.


For my low-frequency hearing loss, I need to pull down the high frequencies, which seem too loud to me:

60Hz 170Hz 310Hz 600Hz  1kHz  3kHz  6kHz 12kHz 14kHz 16kHz
 0     0     0     0   -3.6  -3.6  -7.1  -7.1  -7.1  -9.6

So I put this into Bands gain: 0 0 0 0 -3.6 -3.6 -7.1 -7.1 -7.1 -9.6.

Audio

Digital:

  • Audio bit depth “Compact Disc Digital Audio … uses 16 bits per sample”
  • TechTerms has a concise definition of Bitrate.

Audacity

a free open source digital audio editor and recording application, available for Windows, Mac OS X, Linux and other operating systems

Effect > Low Pass Filter at the default settings (Rolloff 6dB/octave, Cutoff 1000Hz) does a fairly good hiss reduction for videos from my Nikon CoolPix P7700 (and less good for my Samsung GT-S7560).

Installation

http://audacity.sourceforge.net/download/windows

VST Effects plugins

On Windows, the two shipped LADPSA plug-ins (hard_limiter_1413.dll and sc4_1882.dll) will be listed, as will any optional LADSPA DLL plug-ins you may have installed. These LADSPA plug-ins will load whether you enable them in the dialog or not.

MIDI

Steinberg Cubase https://en.wikipedia.org/wiki/Steinberg_Cubase

Cubase creates projects, which allow the operator to edit MIDI files, raw audio tracks, and other associated information like lyrics, and to present them in a range of formats including musical scores, editing console, event lists, etc. The operator can also mix the various tracks down into a stereo .wav file ready to be burned to a compact disc (CD) in Red Book format, or .mp3 burned to CD or DVD as files, or to be published on the Web.

at Wikipedia

MIDI https://en.wikipedia.org/wiki/MIDI

(/ˈmɪdi/; short for Musical Instrument Digital Interface) is a technical standard that describes a protocol, digital interface and connectors and allows a wide variety of electronic musical instruments, computers and other related devices to connect and communicate with one another. A single MIDI link can carry up to sixteen channels of information, each of which can be routed to a separate device.
MIDI carries event messages that specify notation, pitch and velocity, control signals for parameters such as volume, vibrato, audio panning, cues, and clock signals that set and synchronize tempo between multiple devices. These messages are sent via a MIDI cable to other devices where they control sound generation and other features. This data can also be recorded into a hardware or software device called a sequencer, which can be used to edit the data and to play it back at a later time.
MIDI allows selection of an instrument's sounds through program change messages, but there is no guarantee that any two instruments have the same sound at a given program location. Program #0 may be a piano on one instrument, or a flute on another. The General MIDI (GM) standard was established in 1991, and provides a standardized sound bank that allows a Standard MIDI File created on one device to sound similar when played back on another. GM specifies a bank of 128 sounds arranged into 16 families of eight related instruments, and assigns a specific program number to each instrument. Percussion instruments are placed on channel 10, and a specific MIDI note value is mapped to each percussion sound. GM-compliant devices must offer 24-note polyphony. Any given program change will select the same instrument sound on any GM-compatible instrument.
The GM standard eliminates variation in note mapping. Some manufacturers had disagreed over what note number should represent middle C, but GM specifies that note number 69 plays A440, which in turn fixes middle C as note number 60. GM-compatible devices are required to respond to velocity, aftertouch, and pitch bend, to be set to specified default values at startup, and to support certain controller numbers such as for sustain pedal, and Registered Parameter Numbers. A simplified version of GM, called “GM Lite”, is used in mobile phones and other devices with limited processing power.

General MIDI

GS

General MIDI Level 2 https://en.wikipedia.org/wiki/General_MIDI_Level_2

or GM2 is a specification for synthesizers which defines several requirements beyond the more abstract MIDI standard and is based on General MIDI and GS extensions. It was adopted in 1999 by the MIDI Manufacturers Association (MMA).

Roland GS https://en.wikipedia.org/wiki/Roland_GS

or just GS, sometimes expanded as General Standard[1][2] or General Sound,[1] is an extension of General MIDI specification. It requires that all GS-compatible equipment must meet a certain set of features and it documents interpretations of some MIDI commands and bytes sequences, thus defining more instrument tones, more controllers for sound effects, etc.
GS takes into account some of the criticism of simplicity of original General MIDI standard, while retaining full forward compatibility and even some backward compatibility. GS defines 98 additional tone instruments, 15 more percussion instruments, 8 more drum kits, 3 effects (reverb/chorus/variation) and some other features,thus adding more sounds to the MIDI world. Roland also gave users their own MIDI file player, called SB-55 Sound Brush.

Yamaha XG

https://en.wikipedia.org/wiki/Yamaha_XG

(EXtended General MIDI) is an extension to the General MIDI standard, created by Yamaha. It is similar in purpose to Roland's GS Standard.
Relative to General MIDI, XG gained popularity by increasing the number of available instruments from 128 to over 600, and introduced a large set of standard controllers and parameters that composers could employ to achieve greater subtlety and realism in their compositions. The XG also has a synthesizer that provides a 32 note polyphonic feature which is shared through the supported 16 MIDI channels. XG has a wide range of sounds to form such complex chords and produces a vast variety of lower synthesizer sounds to choose from.

FFmpeg

Usage

  • ffmpeg -codecs
  • ffmpeg -filters
  • ffmpeg -formats
  • ffmpeg -version
  • ffmpeg [options] 2>a.txt - also dumps output into a.txt
  • UpUbuntu - Some Useful FFMPEG Commands - gives an idea of what's possible!
  • -vcodec copy - allows to copy video losslessly (and overrides other -vf options)
  • -y = Overwrite output files

Audio:

  • -acodec copy passes through the audio unchanged
  • Audio Noise: no treatement, Audacity recommended…
  • Extract Audio to WAV, is easy: .\ffmpeg -i input-video -vn out.wav.

Concatenation of identically codec'd files is super fast:

.\ffmpeg -i "concat:1.avi|2.avi" -c copy 'Joseph avec les Mélangeurs.avi'

vflip: Flip the input video vertically: -vf “vflip”.

.\ffmpeg -i b5g_pushing_up.3gp -vf "vflip" -an -y b5g_pushing_up.mp4

Xiph.Org:

  • Encoding VOBs to ogv needs at least -q:v 5.

Crop

Crop away bottom strip (input width retained, input height reduced):

.\ffmpeg -i ladder.AVI -vf crop=iw:ih-80:0:0 ladder.mp4

- nicely trimmed off 80pixels from bottom of video.

Crop away left edge (input width reduced by 80, from left side, sound also removed):

.\ffmpeg -i MVI_4179.AVI -an -vf crop=iw-80:ih:80:0 'd21 stickers.mp4'

-map

So I recorded a video of my young son walking in the Paris Paleontology museum on my Samsung GT-S7560. VLC ignores the rotation tag, and plays it tipped over to the left, and the sound is very hissy. Here I rebuild it, with the sound stream having been passed through Audacity's default Low Pass filter, and with the video rotated, and the rotation tag cleared:

.\ffmpeg -i 20140413_112656.mp4 -i 20140413LP.wav -map 0:0 -map 1:0 -vf transpose=1 -metadata:s:v:0 rotate=0 -y '20140413 at the PaleoM.mp4'

Rotations

Phones and pocket cameras used in portrait mode create a digital media in landscape mode with a rotation tag. I prefer to manually rotate the video to landscape (and, in the case of my ancient Canon A470 strip the poor-quality sound):

.\ffmpeg -i MVI_1669.AVI -vf transpose=1 -an MVI_1669.mp4

Watermarking

can be done in various ways, and I settled on -filter_complex (in Powershell, and putting the label bottom-right):

.\ffmpeg -i input.mp4 -i label.png -filter_complex 'overlay=W-w-10:H-h-10' -c:a copy labelled-output.mp4

My reply to Change audio and insert watermark with ffmpeg shows this working code:

ffmpeg -i RMe1u-ballcatch.MOV -i troingphotolabel20.png -i RMe1u-ballcatch.ogg -filter_complex "[0:v][1:v]overlay=W-w-10:H-h-10[out]" -map "[out]" -map 2:a -c:a copy RMe1u-ballcatch.mp4

image2

Creating a video from the images in the file sequence ‘img-001.jpeg’, ‘img-002.jpeg’, …, assuming an input framerate of 10 frames per second:

ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi

Pull out all the stills from my 49.02s long 12h01-dull_run-640.mp4, at 29.97fps:

ffmpeg -i 12h01-dull_run-640.mp4 -f image2 stills/n-%04d.jpg

- got me 1469 stills (because 49.02 x 29.97 = 1469.1294 ). I converted them, with jpgMagick.pl, to Negate(), then put them back together like this:

ffmpeg -r 29.97 -f image2 -i stills/n-%04d.jpg 12h01-dull_run-640-Negative.mp4

or, having converted the still with my Color-In.sh:

ffmpeg -r 29.97 -f image2 -i stills/n-%04d-CI.jpg 12h01-dull_run-640-ColorIn.mp4

grab one image every second

Creating a sequence of files ‘img-001.jpeg’, ‘img-002.jpeg’, …, taking one image every second from the input video:
ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg'

> Note that with ‘ffmpeg’, if the format is not specified with the -f option and the output filename specifies an image file format, the image2 muxer is automatically selected, so the previous command can be written as:

ffmpeg -i in.avi -r 1 'img-%03d.jpeg'

Making a video from an Image Sequence

http://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence

ffmpeg -f image2 -i image%d.jpg output.mpg

- defaults to 25fps.

The canonical form to work with image sequences is to use the -f image2 argument like this:
ffmpeg -f image2 -i image-%03d.png video.webm

and

ffmpeg -i video.webm -f image2 image-%03d.png

But ffmpeg is very good with inferring that information so this chapter will omit that argument in all examples unless absolutely necessary.

Ffmpeg expects the numbering to start at 0 (or 000 in this example). If your files do not start at 000 then use the argument -start_number to tell ffmpeg the first number of your files:
ffmpeg -start_number 100 -i image-%03d.png video.webm
The numbering has to be consecutive. Ffmpeg will stop at the last consecutive numbered filename.
The default framerate is 25 fps. That means each image is shown 1/25 of a second. This is a speed which creates the illusion of a smooth animation for most humans eyes. If you still want more frames per second then use the -framerate argument:
ffmpeg -framerate 60 -i image-%03d.png video.webm

If you want to have a slideshow then you have to lower the input framerate. The following command will show each image 5 seconds long:

ffmpeg -framerate 1/5 -i image-%03d.png video.webm

It may be necessary to force the video framerate up:

ffmpeg -framerate 1/5 -i image-%03d.png -r 30 video.webm

Xiph.org

XML Shareable Playlist Format

https://en.wikipedia.org/wiki/XML_Shareable_Playlist_Format

XSPF is a data format for sharing the kind of playlist that can be played on a personal computer or portable device. In the same way that any user on any computer can open any web page, XSPF is intended to provide portability for playlists.
A simple form of content resolution is the localisation of a playlist based on metadata. An XSPF-compliant content resolver will open XSPF playlists and search a catalog for every title with <creator>, <album> and <title> tags, then localise the playlist to reference the available matching tracks. A catalog may reference a collection of media files on a local disk, a music subscription service like Yahoo! Music Unlimited, or some other searchable archive. The end result is shareable playlists that are not tied to a specific collection or service.
XSPF is not a recommendation of any standards body besides Xiph.Org Foundation.

Ogg

http://en.wikipedia.org/wiki/Ogg

OggConvert

Nominally, OggConvert is a GNOME utility, but depends only on the GStreamer Python bindings package and uses GTK+ libraries, allowing it to run in a number of desktop environments.

Vorbis

oggdropXPd

From RareWares. Wiki guide.

Filename Unicode snags:

cross_platform/temporal.txt · Last modified: 2016/09/01 17:55 (external edit)