Avconv

Uit De Vliegende Brigade
Versie door Jeroen Strompf (overleg | bijdragen) op 4 okt 2020 om 20:01 (→‎Zie ook)
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Naar navigatie springen Naar zoeken springen

avconv is een command-line tool voor videoconversie. Het is de opvolger van ffmpeg.

Syntaxis

De syntaxis is:

avconv [global options] [[infile options][-i infile]]... {[outfile options] outfile}...

Hierbij worden eerst de infiles gespecificeerd met bijbehorende parameters. Daarna worden de output-bestanden gespecificeerd inclusief parameters. Parameters horen dus óf bij het input-bestand, óf bij het output-bestand.

Voorbeelden

Overzicht van alle filters

avconv -filters   # Overzicht van alle beschikbare filters

Bestand 90 graden roteren

avconv -i test-in.mp4 -vf transpose=1 test-out-02.mp4

Waarbij:

  • -i test-in.mp4 - Input-bestand
  • -vf - Pas een filter toe op de ontvangen stroom
  • -vf transpose=1 - Pas het transponeer-filter toe, waarbij kolommen en rijen worden getransponeerd, en er eventueel wordt gespiegeld. In dit geval: transpose=1 betreft rotatie kloksgewijs van 90 graden
  • test-out-02.mp4 - Dit is het output-bestand: Alles wat geen inputbestand of parameter is, is automatisch een output-bestand.

Dit wil wel eens een storing geven bij variabele frame-rates. In dat geval is een oplossing:

avconv -i test-in.mp4 -vf transpose=1 -vsync 2 test-out.mp4

Geluid weglaten

avconv -i inbestand.mp4 -an outputbestand.mp4

of

avconv -i inbestand.mp4 -an -vsync 2 outputbestand.mp4

Wat de man-page ervan vindt:

  -an (output)
          Disable audio recording.

Filters

avconv -filters Geeft een overzicht van alle filters:

anull            Pass the source unchanged to the output.
anullsrc         Null audio source, never return audio frames.
anullsink        Do absolutely nothing with the input audio.
blackframe       Detect frames that are (almost) black.
boxblur          Blur the input.
copy             Copy the input video unchanged to the output.
crop             Crop the input video to width:height:x:y.
cropdetect       Auto-detect crop size.
delogo           Remove logo from input video.
drawbox          Draw a colored box on the input video.
drawtext         Draw text on top of video frames using libfreetype library.
fade             Fade in/out input video
fieldorder       Set the field order.
fifo             Buffer input images and send them when they are requested.
format           Convert the input video to one of the specified pixel formats.
gradfun          Debands video quickly using gradients.
hflip            Horizontally flip the input video.
hqdn3d           Apply a High Quality 3D Denoiser.
lut              Compute and apply a lookup table to the RGB/YUV input video.
lutrgb           Compute and apply a lookup table to the RGB input video.
lutyuv           Compute and apply a lookup table to the YUV input video.
negate           Negate input video.
noformat         Force libavfilter not to use any of the specified pixel formats for the input to the next filter.
null             Pass the source unchanged to the output.
overlay          Overlay a video source on top of the input.
pad              Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black).
pixdesctest      Test pixel format definitions.
scale            Scale the input video to width:height size and/or convert the image format.
select           Select frames to pass in output.
setdar           Set the frame display aspect ratio.
setpts           Set PTS for the output video frame.
setsar           Set the pixel sample aspect ratio.
settb            Set timebase for the output link.
showinfo         Show textual information for each video frame.
slicify          Pass the images of input video on to next video filter as multiple slices.
split            Pass on the input to two outputs.
transpose        Transpose input video.
unsharp          Sharpen or blur the input video.
vflip            Flip the input video vertically.
yadif            Deinterlace the input image
color            Provide an uniformly colored input, syntax is: [color[:size[:rate]]]
movie            Read from a movie source.
nullsrc          Null video source, never return images.
rgbtestsrc       Generate RGB test pattern.
testsrc          Generate test pattern.
nullsink         Do absolutely nothing with the input video.
buffer           Buffer video frames, and make them accessible to the filterchain.

Geselecteerde output-opties

  • -vf - Filter graph - Filter dat toegepast wordt op het input-bestand.

Zie ook

Bronnen