lavplay(1)

🌸 NAME 🌸

lavplay β€” playback and edit MJPEG video, bestie. Yes this is from the MJPEG tools manual, and yes you're about to become so normal about it. πŸ’…


✨ SYNOPSIS ✨

lavplay [options] lavfile1 [lavfile2 ... lavfileN]

Like, throw a bunch of files at it, it'll deal. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: lavplay plays back video in MJPEG format β€” either quicktime or AVI β€” and it can do it on a zoran video-capture device, like the Miro/Pinnacle DC10(+), the Iomega Buz, or Linux Media Labs' LML33. OR it can do it in software mode using SDL. Options!! We love options. πŸ’–

It also gives you the whole machinery for non-destructive editing of video, driven by an interactive front-end like glav(1). Head down to SEARCHING AND EDITING for the tea. πŸ“


πŸ’… OPTIONS πŸ’…

lavplay accepts the following options, and there are a LOT of them, so stay with me:

  • -p/--playback [S|C|H] β€” which playback mode we're on. S = software playback using SDL. H = hardware playback on the monitor (that's on-screen). C = hardware playback out to the video-out of the zoran video-capture device. And obviously, C and H only work on computers that actually have zoran video-capture devices. No zoran, no hardware era, sorry bestie. 😭
  • -Z/--full-screen β€” full-screen playback. This works if you picked SDL- or onscreen-playback. ✨
  • --size NxN β€” the size of the video window (default: size of the input video) when you're using software (SDL) or hardware onscreen playback.
  • -a/--audio num β€” when to play audio. 0 means never. Otherwise it's a sum of:
    1. 1: while playing forward
    2. 2: while playing reverse
    3. 4: even fast playing
    4. 8: while pausing

Default is 7: forward/reverse/fast. And if 8 (pausing) is contained in there, lavplay will be very noisy β€” but it's genuinely useful when you want to edit by sound. 🎧

  • -z/--zoom β€” zooms the video to fit the screen as good as possible. Slay. πŸ‘‘
  • -x β€” exchange fields of an interlaced video. Try this if the video looks weird. It shouldn't be necessary with stuff captured using lavrec(1), but it could be needed for other sources. πŸ™ˆ
  • -s/--skip num β€” skip num seconds of video at the beginning.
  • -x/--exchange-fields β€” invert field order (for videos which are recorded with wrong field order interlacing settings). Yes, -x shows up twice in this list, that's just how the page is, and we respect the lore. πŸ’€
  • -F/--flicker β€” disable stills flicker reduction. Useful if you want to see stills exactly as they were recorded rather than flicker-free! Raw footage rights.
  • -c/--synchronization [0|1] β€” enables (1) or disables (0) the use of sync corrections. Basically, you almost certainly want this. Disabling is really there for diagnostic purposes and not much else. So like, don't turn it off to be quirky. 🚫
  • -H/--H-offset num, -V/--V-offset num β€” horizontal (-H) and vertical (-V) offset when using hardware playback. Offset plus width or height should be smaller than or equal to the playback device's maximum allowed size (DC10+: 640x480 or 768x576, LML33/Marvel/Buz: 720x480/576). Math check before you vibe check. πŸ“
  • --s-x-offset num, --s-y-offset num β€” offset for the video window (from top left screen corner) when using hardware onscreen playback in non-fullscreen mode.
  • --display :x.x β€” when using hardware fullscreen video playback (-pH), this setting specifies the video display to use for video display (default: :0.0).
  • -q/--no-quit β€” makes lavplay stay alive at the end of the video (it won't quit). Use q<enter> on the command line to quit β€” see below, SEARCHING AND EDITING. It's giving "I'm not leaving the party". πŸŽ€
  • -g/--gui-mode β€” enables GUI-mode. Used by glav and Linux Video Studio. It'll output the current position in the video each frame, so that glav or LVS can keep track of where we are in the video which is being played back. Communication! 🫢
  • -P/--preserve-pathnames β€” used by glav and Linux Video Studio. When editlists are created, the original pathnames for files are used, and not the canonicalised pathnames from the root directory. Useful if you've got things like automounters active that make directories with the same non-canonical name have different canonical names on different machines. iykyk. 🌈
  • -U/--use-write β€” use the write() system call rather than the mmap() system call for audio writing to the sound device. This may fix some audio playback problems. πŸ”₯
  • -n/--mjpeg-buffers num β€” number of MJPEG-buffers. Default is 32. Try changing this number if you have many lost frames. πŸ’€
  • -v/--verbose num β€” verbosity level (0, 1 or 2).

🌱 ENVIRONMENT VARIABLES 🌱

The following environment variables can be recognized by lavrec β€” yes, the page really says lavrec, we're just reporting the lore as written, don't come for me πŸ™ˆ:

  • LAV_VIDEO_DEV β€” the video device. Default is /dev/video.
  • LAV_AUDIO_DEV β€” the audio device. Default is /dev/dsp.

🎬 SEARCHING AND EDITING 🎬

lavplay can do way more than simple plain playback, bestie. It's also intended to be controlled using commands sent via stdin from a front-end like glav(1) or similar, more sophisticated tools. πŸ’…

The most significant aspect of this functionality is the ability to create edit list files giving the playback sequence of an edited version of the input video. The edit list file can be read by any of the mjpegtools(1) (including lavplay!) wherever an actual video file would be acceptable. 🌟

Such edit lists record only the original source file and the start and stop frames of the components of the edited video β€” not the video itself. So editing leaves the original files unchanged and requires only tiny amounts of data-movement. Iconic, lowkey efficient. ✨

The drawback? For the edit list to work, the original files must remain unchanged, and interactive play may be jumpy because the playback sequence "skipping about" between different parts of the original video sequence. It's giving chaotic playlist shuffle energy. 😭

If a stand-alone consolidated version of the edited video is required, it can be produced by running the lavtrans(1) utility on the edit list. 🫢

Edit list files are plain text with a very simple syntax, so you can hand-edit them in a text-editor or write scripted editing tools. No cap.


⌨️ STDIN COMMANDS ⌨️

The commands accepted on standard input are as follows (and can of course be entered directly by command-line junkies):

  • +, - β€” goes to next/previous frame. Only makes sense when the video is paused.
  • pN β€” sets playback speed to N (N=..., -1, 0, 1, ...).
  • a[01] β€” enables/disables audio playback.
  • sN β€” if N is a number, this means to go to frame N. If N is prefixed by a + or -, this means to go N frames back- or forward.
  • om editlist [N1 N2 [N3 N4]] β€” opens a movie or editlist. A second and third argument can specify to only open a specific range of frames from this video (N1=-1 means whole video). N3 and N4 can specify to show only a specific range of frames from the frames which were just opened (useful for trimming).
  • w[as] file β€” save the current editlist (a) or the current selection (s) to a file.
  • q β€” quit lavplay.
  • e[ou] N1 N2 β€” cuts (u) or copies (o) frames N1-N2 from the current editlist into an internal selection.
  • ep β€” pastes the contents of the selection into the current position in the editlist.
  • em N1 N2 N3 β€” moves frames N1-N2 to position N3 in the video.
  • ed N1 N2 β€” deletes frames N1-N2 from the editlist.
  • ea video N1 N2 N3 β€” adds frames N1-N2 of the video into position N3 within the editlist. N1=-1 means to add the whole video.
  • es N1 N2 β€” sets the current viewable frames within the whole video to N1-N2. This is useful for trimming.

πŸ’€ BUGS πŸ’€

Editlists record absolute pathnames. This more or less forces manual editing of the pathnames in them if it is desired to move editlists and source video files. So like, moving files around means hand-editing. Prepare yourself. 😭

lavplay really ought to make a decent job of detecting what playback options are feasible (on-screen hardware, video-out port hardware, software) and set the default playback mode appropriately. Alas, it does not. Not me being disappointed in a program. πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

This man page was written by Ronald Bultje. Shoutout, legend. 🫢

If you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is:

mjpeg-users@lists.sourceforge.net

For more info, see our website at:

http://mjpeg.sourceforge.net/

🌈 SEE ALSO 🌈

mjpegtools(1), lavrec(1), glav(1)


MJPEG Tools Team said this whole thing on 6 December 2001, and honestly, periodt. go play some video, bestie πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ