Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6147 serge 1
=encoding utf8
2
 
3
=head1 NAME
4
 
5
ffmpeg-devices - FFmpeg devices
6
 
7
=head1 DESCRIPTION
8
 
9
 
10
This document describes the input and output devices provided by the
11
libavdevice library.
12
 
13
 
14
 
15
=head1 DEVICE OPTIONS
16
 
17
 
18
The libavdevice library provides the same interface as
19
libavformat. Namely, an input device is considered like a demuxer, and
20
an output device like a muxer, and the interface and generic device
21
options are the same provided by libavformat (see the ffmpeg-formats
22
manual).
23
 
24
In addition each input or output device may support so-called private
25
options, which are specific for that component.
26
 
27
Options may be set by specifying -I
28
FFmpeg tools, or by setting the value explicitly in the device
29
C options or using the F API
30
for programmatic use.
31
 
32
 
33
 
34
=head1 INPUT DEVICES
35
 
36
 
37
Input devices are configured elements in FFmpeg which enable accessing
38
the data coming from a multimedia device attached to your system.
39
 
40
When you configure your FFmpeg build, all the supported input devices
41
are enabled by default. You can list all available ones using the
42
configure option "--list-indevs".
43
 
44
You can disable all the input devices using the configure option
45
"--disable-indevs", and selectively enable an input device using the
46
option "--enable-indev=I", or you can disable a particular
47
input device using the option "--disable-indev=I".
48
 
49
The option "-devices" of the ff* tools will display the list of
50
supported input devices.
51
 
52
A description of the currently available input devices follows.
53
 
54
 
55
=head2 alsa
56
 
57
 
58
ALSA (Advanced Linux Sound Architecture) input device.
59
 
60
To enable this input device during configuration you need libasound
61
installed on your system.
62
 
63
This device allows capturing from an ALSA device. The name of the
64
device to capture has to be an ALSA card identifier.
65
 
66
An ALSA identifier has the syntax:
67
 
68
	hw:[,[,]]
69
 
70
 
71
where the I and I components are optional.
72
 
73
The three arguments (in order: I,I,I)
74
specify card number or identifier, device number and subdevice number
75
(-1 means any).
76
 
77
To see the list of cards currently recognized by your system check the
78
files F and F.
79
 
80
For example to capture with B from an ALSA device with
81
card id 0, you may run the command:
82
 
83
	ffmpeg -f alsa -i hw:0 alsaout.wav
84
 
85
 
86
For more information see:
87
EBE
88
 
89
 
90
=head3 Options
91
 
92
 
93
 
94
=over 4
95
 
96
 
97
 
98
=item B
99
 
100
Set the sample rate in Hz. Default is 48000.
101
 
102
 
103
=item B
104
 
105
Set the number of channels. Default is 2.
106
 
107
 
108
=back
109
 
110
 
111
 
112
=head2 avfoundation
113
 
114
 
115
AVFoundation input device.
116
 
117
AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX E= 10.7 as well as on iOS.
118
The older QTKit framework has been marked deprecated since OSX version 10.7.
119
 
120
The input filename has to be given in the following syntax:
121
 
122
	-i "[[VIDEO]:[AUDIO]]"
123
 
124
The first entry selects the video input while the latter selects the audio input.
125
The stream has to be specified by the device name or the device index as shown by the device list.
126
Alternatively, the video and/or audio input device can be chosen by index using the
127
 
128
    B<-video_device_index EINDEXE>
129
 
130
and/or
131
 
132
    B<-audio_device_index EINDEXE>
133
 
134
, overriding any
135
device name or index given in the input filename.
136
 
137
All available devices can be enumerated by using B<-list_devices true>, listing
138
all device names and corresponding indices.
139
 
140
There are two device name aliases:
141
 
142
=over 4
143
 
144
 
145
 
146
=item C
147
 
148
Select the AVFoundation default device of the corresponding type.
149
 
150
 
151
=item C
152
 
153
Do not record the corresponding media type.
154
This is equivalent to specifying an empty device name or index.
155
 
156
 
157
=back
158
 
159
 
160
 
161
=head3 Options
162
 
163
 
164
AVFoundation supports the following options:
165
 
166
 
167
=over 4
168
 
169
 
170
 
171
=item B<-list_devices ETRUE|FALSEE>
172
 
173
If set to true, a list of all available input devices is given showing all
174
device names and indices.
175
 
176
 
177
=item B<-video_device_index EINDEXE>
178
 
179
Specify the video device by its index. Overrides anything given in the input filename.
180
 
181
 
182
=item B<-audio_device_index EINDEXE>
183
 
184
Specify the audio device by its index. Overrides anything given in the input filename.
185
 
186
 
187
=item B<-pixel_format EFORMATE>
188
 
189
Request the video device to use a specific pixel format.
190
If the specified format is not supported, a list of available formats is given
191
und the first one in this list is used instead. Available pixel formats are:
192
C
193
 bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10,
194
 yuv420p, nv12, yuyv422, gray>
195
 
196
 
197
=item B<-framerate>
198
 
199
Set the grabbing frame rate. Default is C, corresponding to a
200
frame rate of C<30000/1001>.
201
 
202
 
203
=item B<-video_size>
204
 
205
Set the video frame size.
206
 
207
 
208
=item B<-capture_cursor>
209
 
210
Capture the mouse pointer. Default is 0.
211
 
212
 
213
=item B<-capture_mouse_clicks>
214
 
215
Capture the screen mouse clicks. Default is 0.
216
 
217
 
218
=back
219
 
220
 
221
 
222
=head3 Examples
223
 
224
 
225
 
226
=over 4
227
 
228
 
229
 
230
=item *
231
 
232
Print the list of AVFoundation supported devices and exit:
233
 
234
	$ ffmpeg -f avfoundation -list_devices true -i ""
235
 
236
 
237
 
238
=item *
239
 
240
Record video from video device 0 and audio from audio device 0 into out.avi:
241
 
242
	$ ffmpeg -f avfoundation -i "0:0" out.avi
243
 
244
 
245
 
246
=item *
247
 
248
Record video from video device 2 and audio from audio device 1 into out.avi:
249
 
250
	$ ffmpeg -f avfoundation -video_device_index 2 -i ":1" out.avi
251
 
252
 
253
 
254
=item *
255
 
256
Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi:
257
 
258
	$ ffmpeg -f avfoundation -pixel_format bgr0 -i "default:none" out.avi
259
 
260
 
261
 
262
=back
263
 
264
 
265
 
266
=head2 bktr
267
 
268
 
269
BSD video input device.
270
 
271
 
272
=head3 Options
273
 
274
 
275
 
276
=over 4
277
 
278
 
279
 
280
=item B
281
 
282
Set the frame rate.
283
 
284
 
285
=item B
286
 
287
Set the video frame size. Default is C.
288
 
289
 
290
=item B
291
 
292
 
293
Available values are:
294
 
295
=over 4
296
 
297
 
298
=item B
299
 
300
 
301
 
302
=item B
303
 
304
 
305
 
306
=item B
307
 
308
 
309
 
310
=item B
311
 
312
 
313
 
314
=item B
315
 
316
 
317
 
318
=item B
319
 
320
 
321
 
322
=back
323
 
324
 
325
 
326
=back
327
 
328
 
329
 
330
=head2 decklink
331
 
332
 
333
The decklink input device provides capture capabilities for Blackmagic
334
DeckLink devices.
335
 
336
To enable this input device, you need the Blackmagic DeckLink SDK and you
337
need to configure with the appropriate C<--extra-cflags>
338
and C<--extra-ldflags>.
339
On Windows, you need to run the IDL files through B.
340
 
341
DeckLink is very picky about the formats it supports. Pixel format is
342
uyvy422 or v210, framerate and video size must be determined for your device with
343
B<-list_formats 1>. Audio sample rate is always 48 kHz and the number
344
of channels can be 2, 8 or 16.
345
 
346
 
347
=head3 Options
348
 
349
 
350
 
351
=over 4
352
 
353
 
354
 
355
=item B
356
 
357
If set to B, print a list of devices and exit.
358
Defaults to B.
359
 
360
 
361
=item B
362
 
363
If set to B, print a list of supported formats and exit.
364
Defaults to B.
365
 
366
 
367
=item B
368
 
369
If set to B<1>, video is captured in 10 bit v210 instead
370
of uyvy422. Not all Blackmagic devices support this option.
371
 
372
 
373
=back
374
 
375
 
376
 
377
=head3 Examples
378
 
379
 
380
 
381
=over 4
382
 
383
 
384
 
385
=item *
386
 
387
List input devices:
388
 
389
	ffmpeg -f decklink -list_devices 1 -i dummy
390
 
391
 
392
 
393
=item *
394
 
395
List supported formats:
396
 
397
	ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
398
 
399
 
400
 
401
=item *
402
 
403
Capture video clip at 1080i50 (format 11):
404
 
405
	ffmpeg -f decklink -i 'Intensity Pro@11' -acodec copy -vcodec copy output.avi
406
 
407
 
408
 
409
=item *
410
 
411
Capture video clip at 1080i50 10 bit:
412
 
413
	ffmpeg -bm_v210 1 -f decklink -i 'UltraStudio Mini Recorder@11' -acodec copy -vcodec copy output.avi
414
 
415
 
416
 
417
=back
418
 
419
 
420
 
421
=head2 dshow
422
 
423
 
424
Windows DirectShow input device.
425
 
426
DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.
427
Currently only audio and video devices are supported.
428
 
429
Multiple devices may be opened as separate inputs, but they may also be
430
opened on the same input, which should improve synchronism between them.
431
 
432
The input name should be in the format:
433
 
434
 
435
	=[:=]
436
 
437
 
438
where I can be either I
439
and I is the device's name or alternative name..
440
 
441
 
442
=head3 Options
443
 
444
 
445
If no options are specified, the device's defaults are used.
446
If the device does not support the requested options, it will
447
fail to open.
448
 
449
 
450
=over 4
451
 
452
 
453
 
454
=item B
455
 
456
Set the video size in the captured video.
457
 
458
 
459
=item B
460
 
461
Set the frame rate in the captured video.
462
 
463
 
464
=item B
465
 
466
Set the sample rate (in Hz) of the captured audio.
467
 
468
 
469
=item B
470
 
471
Set the sample size (in bits) of the captured audio.
472
 
473
 
474
=item B
475
 
476
Set the number of channels in the captured audio.
477
 
478
 
479
=item B
480
 
481
If set to B, print a list of devices and exit.
482
 
483
 
484
=item B
485
 
486
If set to B, print a list of selected device's options
487
and exit.
488
 
489
 
490
=item B
491
 
492
Set video device number for devices with the same name (starts at 0,
493
defaults to 0).
494
 
495
 
496
=item B
497
 
498
Set audio device number for devices with the same name (starts at 0,
499
defaults to 0).
500
 
501
 
502
=item B
503
 
504
Select pixel format to be used by DirectShow. This may only be set when
505
the video codec is not set or set to rawvideo.
506
 
507
 
508
=item B
509
 
510
Set audio device buffer size in milliseconds (which can directly
511
impact latency, depending on the device).
512
Defaults to using the audio device's
513
default buffer size (typically some multiple of 500ms).
514
Setting this value too low can degrade performance.
515
See also
516
EBE
517
 
518
 
519
=item B
520
 
521
Select video capture pin to use by name or alternative name.
522
 
523
 
524
=item B
525
 
526
Select audio capture pin to use by name or alternative name.
527
 
528
 
529
=item B
530
 
531
Select video input pin number for crossbar device. This will be
532
routed to the crossbar device's Video Decoder output pin.
533
Note that changing this value can affect future invocations
534
(sets a new default) until system reboot occurs.
535
 
536
 
537
=item B
538
 
539
Select audio input pin number for crossbar device. This will be
540
routed to the crossbar device's Audio Decoder output pin.
541
Note that changing this value can affect future invocations
542
(sets a new default) until system reboot occurs.
543
 
544
 
545
=item B
546
 
547
If set to B, before capture starts, popup a display dialog
548
to the end user, allowing them to change video filter properties
549
and configurations manually.
550
Note that for crossbar devices, adjusting values in this dialog
551
may be needed at times to toggle between PAL (25 fps) and NTSC (29.97)
552
input frame rates, sizes, interlacing, etc.  Changing these values can
553
enable different scan rates/frame rates and avoiding green bars at
554
the bottom, flickering scan lines, etc.
555
Note that with some devices, changing these properties can also affect future
556
invocations (sets new defaults) until system reboot occurs.
557
 
558
 
559
=item B
560
 
561
If set to B, before capture starts, popup a display dialog
562
to the end user, allowing them to change audio filter properties
563
and configurations manually.
564
 
565
 
566
=item B
567
 
568
If set to B, before capture starts, popup a display
569
dialog to the end user, allowing them to manually
570
modify crossbar pin routings, when it opens a video device.
571
 
572
 
573
=item B
574
 
575
If set to B, before capture starts, popup a display
576
dialog to the end user, allowing them to manually
577
modify crossbar pin routings, when it opens an audio device.
578
 
579
 
580
=item B
581
 
582
If set to B, before capture starts, popup a display
583
dialog to the end user, allowing them to manually
584
modify TV channels and frequencies.
585
 
586
 
587
=item B
588
 
589
If set to B, before capture starts, popup a display
590
dialog to the end user, allowing them to manually
591
modify TV audio (like mono vs. stereo, Language A,B or C).
592
 
593
 
594
=item B
595
 
596
Load an audio capture filter device from file instead of searching
597
it by name. It may load additional parameters too, if the filter
598
supports the serialization of its properties to.
599
To use this an audio capture source has to be specified, but it can
600
be anything even fake one.
601
 
602
 
603
=item B
604
 
605
Save the currently used audio capture filter device and its
606
parameters (if the filter supports it) to a file.
607
If a file with the same name exists it will be overwritten.
608
 
609
 
610
=item B
611
 
612
Load a video capture filter device from file instead of searching
613
it by name. It may load additional parameters too, if the filter
614
supports the serialization of its properties to.
615
To use this a video capture source has to be specified, but it can
616
be anything even fake one.
617
 
618
 
619
=item B
620
 
621
Save the currently used video capture filter device and its
622
parameters (if the filter supports it) to a file.
623
If a file with the same name exists it will be overwritten.
624
 
625
 
626
=back
627
 
628
 
629
 
630
=head3 Examples
631
 
632
 
633
 
634
=over 4
635
 
636
 
637
 
638
=item *
639
 
640
Print the list of DirectShow supported devices and exit:
641
 
642
	$ ffmpeg -list_devices true -f dshow -i dummy
643
 
644
 
645
 
646
=item *
647
 
648
Open video device I:
649
 
650
	$ ffmpeg -f dshow -i video="Camera"
651
 
652
 
653
 
654
=item *
655
 
656
Open second video device with name I:
657
 
658
	$ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
659
 
660
 
661
 
662
=item *
663
 
664
Open video device I and audio device I:
665
 
666
	$ ffmpeg -f dshow -i video="Camera":audio="Microphone"
667
 
668
 
669
 
670
=item *
671
 
672
Print the list of supported options in selected device and exit:
673
 
674
	$ ffmpeg -list_options true -f dshow -i video="Camera"
675
 
676
 
677
 
678
=item *
679
 
680
Specify pin names to capture by name or alternative name, specify alternative device name:
681
 
682
	$ ffmpeg -f dshow -audio_pin_name "Audio Out" -video_pin_name 2 -i video=video="@device_pnp_\\?\pci#ven_1a0a&dev_6200&subsys_62021461&rev_01#4&e2c7dd6&0&00e1#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6}":audio="Microphone"
683
 
684
 
685
 
686
=item *
687
 
688
Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup:
689
 
690
	$ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
691
	     -crossbar_audio_input_pin_number 3 -i video="AVerMedia BDA Analog Capture":audio="AVerMedia BDA Analog Capture"
692
 
693
 
694
 
695
=back
696
 
697
 
698
 
699
=head2 dv1394
700
 
701
 
702
Linux DV 1394 input device.
703
 
704
 
705
=head3 Options
706
 
707
 
708
 
709
=over 4
710
 
711
 
712
 
713
=item B
714
 
715
Set the frame rate. Default is 25.
716
 
717
 
718
=item B
719
 
720
 
721
Available values are:
722
 
723
=over 4
724
 
725
 
726
=item B
727
 
728
 
729
 
730
=item B
731
 
732
 
733
 
734
=back
735
 
736
 
737
Default value is C.
738
 
739
 
740
=back
741
 
742
 
743
 
744
=head2 fbdev
745
 
746
 
747
Linux framebuffer input device.
748
 
749
The Linux framebuffer is a graphic hardware-independent abstraction
750
layer to show graphics on a computer monitor, typically on the
751
console. It is accessed through a file device node, usually
752
F.
753
 
754
For more detailed information read the file
755
Documentation/fb/framebuffer.txt included in the Linux source tree.
756
 
757
See also EBE, and fbset(1).
758
 
759
To record from the framebuffer device F with
760
B:
761
 
762
	ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi
763
 
764
 
765
You can take a single screenshot image with the command:
766
 
767
	ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
768
 
769
 
770
 
771
=head3 Options
772
 
773
 
774
 
775
=over 4
776
 
777
 
778
 
779
=item B
780
 
781
Set the frame rate. Default is 25.
782
 
783
 
784
=back
785
 
786
 
787
 
788
=head2 gdigrab
789
 
790
 
791
Win32 GDI-based screen capture device.
792
 
793
This device allows you to capture a region of the display on Windows.
794
 
795
There are two options for the input filename:
796
 
797
	desktop
798
 
799
or
800
 
801
	title=
802
 
803
 
804
The first option will capture the entire desktop, or a fixed region of the
805
desktop. The second option will instead capture the contents of a single
806
window, regardless of its position on the screen.
807
 
808
For example, to grab the entire desktop using B:
809
 
810
	ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
811
 
812
 
813
Grab a 640x480 region at position C<10,20>:
814
 
815
	ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
816
 
817
 
818
Grab the contents of the window named "Calculator"
819
 
820
	ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
821
 
822
 
823
 
824
=head3 Options
825
 
826
 
827
 
828
=over 4
829
 
830
 
831
=item B
832
 
833
Specify whether to draw the mouse pointer. Use the value C<0> to
834
not draw the pointer. Default value is C<1>.
835
 
836
 
837
=item B
838
 
839
Set the grabbing frame rate. Default value is C,
840
corresponding to a frame rate of C<30000/1001>.
841
 
842
 
843
=item B
844
 
845
Show grabbed region on screen.
846
 
847
If I is specified with C<1>, then the grabbing
848
region will be indicated on screen. With this option, it is easy to
849
know what is being grabbed if only a portion of the screen is grabbed.
850
 
851
Note that I is incompatible with grabbing the contents
852
of a single window.
853
 
854
For example:
855
 
856
	ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
857
 
858
 
859
 
860
=item B
861
 
862
Set the video frame size. The default is to capture the full screen if F is selected, or the full window size if F> is selected.
863
 
864
 
865
=item B
866
 
867
When capturing a region with I, set the distance from the left edge of the screen or desktop.
868
 
869
Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned to the left of your primary monitor, you will need to use a negative I value to move the region to that monitor.
870
 
871
 
872
=item B
873
 
874
When capturing a region with I, set the distance from the top edge of the screen or desktop.
875
 
876
Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned above your primary monitor, you will need to use a negative I value to move the region to that monitor.
877
 
878
 
879
=back
880
 
881
 
882
 
883
=head2 iec61883
884
 
885
 
886
FireWire DV/HDV input device using libiec61883.
887
 
888
To enable this input device, you need libiec61883, libraw1394 and
889
libavc1394 installed on your system. Use the configure option
890
C<--enable-libiec61883> to compile with the device enabled.
891
 
892
The iec61883 capture device supports capturing from a video device
893
connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
894
FireWire stack (juju). This is the default DV/HDV input method in Linux
895
Kernel 2.6.37 and later, since the old FireWire stack was removed.
896
 
897
Specify the FireWire port to be used as input file, or "auto"
898
to choose the first port connected.
899
 
900
 
901
=head3 Options
902
 
903
 
904
 
905
=over 4
906
 
907
 
908
 
909
=item B
910
 
911
Override autodetection of DV/HDV. This should only be used if auto
912
detection does not work, or if usage of a different device type
913
should be prohibited. Treating a DV device as HDV (or vice versa) will
914
not work and result in undefined behavior.
915
The values B, B and B are supported.
916
 
917
 
918
=item B
919
 
920
Set maximum size of buffer for incoming data, in frames. For DV, this
921
is an exact value. For HDV, it is not frame exact, since HDV does
922
not have a fixed frame size.
923
 
924
 
925
=item B
926
 
927
Select the capture device by specifying it's GUID. Capturing will only
928
be performed from the specified device and fails if no device with the
929
given GUID is found. This is useful to select the input if multiple
930
devices are connected at the same time.
931
Look at /sys/bus/firewire/devices to find out the GUIDs.
932
 
933
 
934
=back
935
 
936
 
937
 
938
=head3 Examples
939
 
940
 
941
 
942
=over 4
943
 
944
 
945
 
946
=item *
947
 
948
Grab and show the input of a FireWire DV/HDV device.
949
 
950
	ffplay -f iec61883 -i auto
951
 
952
 
953
 
954
=item *
955
 
956
Grab and record the input of a FireWire DV/HDV device,
957
using a packet buffer of 100000 packets if the source is HDV.
958
 
959
	ffmpeg -f iec61883 -i auto -hdvbuffer 100000 out.mpg
960
 
961
 
962
 
963
=back
964
 
965
 
966
 
967
=head2 jack
968
 
969
 
970
JACK input device.
971
 
972
To enable this input device during configuration you need libjack
973
installed on your system.
974
 
975
A JACK input device creates one or more JACK writable clients, one for
976
each audio channel, with name I:input_I, where
977
I is the name provided by the application, and I
978
is a number which identifies the channel.
979
Each writable client will send the acquired data to the FFmpeg input
980
device.
981
 
982
Once you have created one or more JACK readable clients, you need to
983
connect them to one or more JACK writable clients.
984
 
985
To connect or disconnect JACK clients you can use the B
986
and B programs, or do it through a graphical interface,
987
for example with B.
988
 
989
To list the JACK clients and their properties you can invoke the command
990
B.
991
 
992
Follows an example which shows how to capture a JACK readable client
993
with B.
994
 
995
	# Create a JACK writable client with name "ffmpeg".
996
	$ ffmpeg -f jack -i ffmpeg -y out.wav
997
 
998
	# Start the sample jack_metro readable client.
999
	$ jack_metro -b 120 -d 0.2 -f 4000
1000
 
1001
	# List the current JACK clients.
1002
	$ jack_lsp -c
1003
	system:capture_1
1004
	system:capture_2
1005
	system:playback_1
1006
	system:playback_2
1007
	ffmpeg:input_1
1008
	metro:120_bpm
1009
 
1010
	# Connect metro to the ffmpeg writable client.
1011
	$ jack_connect metro:120_bpm ffmpeg:input_1
1012
 
1013
 
1014
For more information read:
1015
EBE
1016
 
1017
 
1018
=head3 Options
1019
 
1020
 
1021
 
1022
=over 4
1023
 
1024
 
1025
 
1026
=item B
1027
 
1028
Set the number of channels. Default is 2.
1029
 
1030
 
1031
=back
1032
 
1033
 
1034
 
1035
=head2 lavfi
1036
 
1037
 
1038
Libavfilter input virtual device.
1039
 
1040
This input device reads data from the open output pads of a libavfilter
1041
filtergraph.
1042
 
1043
For each filtergraph open output, the input device will create a
1044
corresponding stream which is mapped to the generated output. Currently
1045
only video data is supported. The filtergraph is specified through the
1046
option B.
1047
 
1048
 
1049
=head3 Options
1050
 
1051
 
1052
 
1053
=over 4
1054
 
1055
 
1056
 
1057
=item B
1058
 
1059
Specify the filtergraph to use as input. Each video open output must be
1060
labelled by a unique string of the form "outI", where I is a
1061
number starting from 0 corresponding to the mapped input stream
1062
generated by the device.
1063
The first unlabelled output is automatically assigned to the "out0"
1064
label, but all the others need to be specified explicitly.
1065
 
1066
The suffix "+subcc" can be appended to the output label to create an extra
1067
stream with the closed captions packets attached to that output
1068
(experimental; only for EIA-608 / CEA-708 for now).
1069
The subcc streams are created after all the normal streams, in the order of
1070
the corresponding stream.
1071
For example, if there is "out19+subcc", "out7+subcc" and up to "out42", the
1072
stream #43 is subcc for stream #7 and stream #44 is subcc for stream #19.
1073
 
1074
If not specified defaults to the filename specified for the input
1075
device.
1076
 
1077
 
1078
=item B
1079
 
1080
Set the filename of the filtergraph to be read and sent to the other
1081
filters. Syntax of the filtergraph is the same as the one specified by
1082
the option I.
1083
 
1084
 
1085
=item B
1086
 
1087
Dump graph to stderr.
1088
 
1089
 
1090
=back
1091
 
1092
 
1093
 
1094
=head3 Examples
1095
 
1096
 
1097
 
1098
=over 4
1099
 
1100
 
1101
=item *
1102
 
1103
Create a color video stream and play it back with B:
1104
 
1105
	ffplay -f lavfi -graph "color=c=pink [out0]" dummy
1106
 
1107
 
1108
 
1109
=item *
1110
 
1111
As the previous example, but use filename for specifying the graph
1112
description, and omit the "out0" label:
1113
 
1114
	ffplay -f lavfi color=c=pink
1115
 
1116
 
1117
 
1118
=item *
1119
 
1120
Create three different video test filtered sources and play them:
1121
 
1122
	ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
1123
 
1124
 
1125
 
1126
=item *
1127
 
1128
Read an audio stream from a file using the amovie source and play it
1129
back with B:
1130
 
1131
	ffplay -f lavfi "amovie=test.wav"
1132
 
1133
 
1134
 
1135
=item *
1136
 
1137
Read an audio stream and a video stream and play it back with
1138
B:
1139
 
1140
	ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
1141
 
1142
 
1143
 
1144
=item *
1145
 
1146
Dump decoded frames to images and closed captions to a file (experimental):
1147
 
1148
	ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
1149
 
1150
 
1151
 
1152
=back
1153
 
1154
 
1155
 
1156
=head2 libcdio
1157
 
1158
 
1159
Audio-CD input device based on libcdio.
1160
 
1161
To enable this input device during configuration you need libcdio
1162
installed on your system. It requires the configure option
1163
C<--enable-libcdio>.
1164
 
1165
This device allows playing and grabbing from an Audio-CD.
1166
 
1167
For example to copy with B the entire Audio-CD in F,
1168
you may run the command:
1169
 
1170
	ffmpeg -f libcdio -i /dev/sr0 cd.wav
1171
 
1172
 
1173
 
1174
=head3 Options
1175
 
1176
 
1177
=over 4
1178
 
1179
 
1180
=item B
1181
 
1182
Set drive reading speed. Default value is 0.
1183
 
1184
The speed is specified CD-ROM speed units. The speed is set through
1185
the libcdio C function. On many CD-ROM
1186
drives, specifying a value too large will result in using the fastest
1187
speed.
1188
 
1189
 
1190
=item B
1191
 
1192
Set paranoia recovery mode flags. It accepts one of the following values:
1193
 
1194
 
1195
=over 4
1196
 
1197
 
1198
=item B
1199
 
1200
 
1201
=item B
1202
 
1203
 
1204
=item B
1205
 
1206
 
1207
=item B
1208
 
1209
 
1210
=item B
1211
 
1212
 
1213
=back
1214
 
1215
 
1216
Default value is B.
1217
 
1218
For more information about the available recovery modes, consult the
1219
paranoia project documentation.
1220
 
1221
=back
1222
 
1223
 
1224
 
1225
=head2 libdc1394
1226
 
1227
 
1228
IIDC1394 input device, based on libdc1394 and libraw1394.
1229
 
1230
Requires the configure option C<--enable-libdc1394>.
1231
 
1232
 
1233
=head2 openal
1234
 
1235
 
1236
The OpenAL input device provides audio capture on all systems with a
1237
working OpenAL 1.1 implementation.
1238
 
1239
To enable this input device during configuration, you need OpenAL
1240
headers and libraries installed on your system, and need to configure
1241
FFmpeg with C<--enable-openal>.
1242
 
1243
OpenAL headers and libraries should be provided as part of your OpenAL
1244
implementation, or as an additional download (an SDK). Depending on your
1245
installation you may need to specify additional flags via the
1246
C<--extra-cflags> and C<--extra-ldflags> for allowing the build
1247
system to locate the OpenAL headers and libraries.
1248
 
1249
An incomplete list of OpenAL implementations follows:
1250
 
1251
 
1252
=over 4
1253
 
1254
 
1255
=item B
1256
 
1257
The official Windows implementation, providing hardware acceleration
1258
with supported devices and software fallback.
1259
See EBE.
1260
 
1261
=item B
1262
 
1263
Portable, open source (LGPL) software implementation. Includes
1264
backends for the most common sound APIs on the Windows, Linux,
1265
Solaris, and BSD operating systems.
1266
See EBE.
1267
 
1268
=item B
1269
 
1270
OpenAL is part of Core Audio, the official Mac OS X Audio interface.
1271
See EBE
1272
 
1273
=back
1274
 
1275
 
1276
This device allows one to capture from an audio input device handled
1277
through OpenAL.
1278
 
1279
You need to specify the name of the device to capture in the provided
1280
filename. If the empty string is provided, the device will
1281
automatically select the default device. You can get the list of the
1282
supported devices by using the option I.
1283
 
1284
 
1285
=head3 Options
1286
 
1287
 
1288
 
1289
=over 4
1290
 
1291
 
1292
 
1293
=item B
1294
 
1295
Set the number of channels in the captured audio. Only the values
1296
B<1> (monaural) and B<2> (stereo) are currently supported.
1297
Defaults to B<2>.
1298
 
1299
 
1300
=item B
1301
 
1302
Set the sample size (in bits) of the captured audio. Only the values
1303
B<8> and B<16> are currently supported. Defaults to
1304
B<16>.
1305
 
1306
 
1307
=item B
1308
 
1309
Set the sample rate (in Hz) of the captured audio.
1310
Defaults to B<44.1k>.
1311
 
1312
 
1313
=item B
1314
 
1315
If set to B, print a list of devices and exit.
1316
Defaults to B.
1317
 
1318
 
1319
=back
1320
 
1321
 
1322
 
1323
=head3 Examples
1324
 
1325
 
1326
Print the list of OpenAL supported devices and exit:
1327
 
1328
	$ ffmpeg -list_devices true -f openal -i dummy out.ogg
1329
 
1330
 
1331
Capture from the OpenAL device F:
1332
 
1333
	$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
1334
 
1335
 
1336
Capture from the default device (note the empty string '' as filename):
1337
 
1338
	$ ffmpeg -f openal -i '' out.ogg
1339
 
1340
 
1341
Capture from two devices simultaneously, writing to two different files,
1342
within the same B command:
1343
 
1344
	$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
1345
 
1346
Note: not all OpenAL implementations support multiple simultaneous capture -
1347
try the latest OpenAL Soft if the above does not work.
1348
 
1349
 
1350
=head2 oss
1351
 
1352
 
1353
Open Sound System input device.
1354
 
1355
The filename to provide to the input device is the device node
1356
representing the OSS input device, and is usually set to
1357
F.
1358
 
1359
For example to grab from F using B use the
1360
command:
1361
 
1362
	ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
1363
 
1364
 
1365
For more information about OSS see:
1366
EBE
1367
 
1368
 
1369
=head3 Options
1370
 
1371
 
1372
 
1373
=over 4
1374
 
1375
 
1376
 
1377
=item B
1378
 
1379
Set the sample rate in Hz. Default is 48000.
1380
 
1381
 
1382
=item B
1383
 
1384
Set the number of channels. Default is 2.
1385
 
1386
 
1387
=back
1388
 
1389
 
1390
 
1391
 
1392
=head2 pulse
1393
 
1394
 
1395
PulseAudio input device.
1396
 
1397
To enable this output device you need to configure FFmpeg with C<--enable-libpulse>.
1398
 
1399
The filename to provide to the input device is a source device or the
1400
string "default"
1401
 
1402
To list the PulseAudio source devices and their properties you can invoke
1403
the command B.
1404
 
1405
More information about PulseAudio can be found on EBE.
1406
 
1407
 
1408
=head3 Options
1409
 
1410
 
1411
=over 4
1412
 
1413
 
1414
=item B
1415
 
1416
Connect to a specific PulseAudio server, specified by an IP address.
1417
Default server is used when not provided.
1418
 
1419
 
1420
=item B
1421
 
1422
Specify the application name PulseAudio will use when showing active clients,
1423
by default it is the C string.
1424
 
1425
 
1426
=item B
1427
 
1428
Specify the stream name PulseAudio will use when showing active streams,
1429
by default it is "record".
1430
 
1431
 
1432
=item B
1433
 
1434
Specify the samplerate in Hz, by default 48kHz is used.
1435
 
1436
 
1437
=item B
1438
 
1439
Specify the channels in use, by default 2 (stereo) is set.
1440
 
1441
 
1442
=item B
1443
 
1444
Specify the number of bytes per frame, by default it is set to 1024.
1445
 
1446
 
1447
=item B
1448
 
1449
Specify the minimal buffering fragment in PulseAudio, it will affect the
1450
audio latency. By default it is unset.
1451
 
1452
 
1453
=item B
1454
 
1455
Set the initial PTS using the current time. Default is 1.
1456
 
1457
 
1458
=back
1459
 
1460
 
1461
 
1462
=head3 Examples
1463
 
1464
Record a stream from default device:
1465
 
1466
	ffmpeg -f pulse -i default /tmp/pulse.wav
1467
 
1468
 
1469
 
1470
=head2 qtkit
1471
 
1472
 
1473
QTKit input device.
1474
 
1475
The filename passed as input is parsed to contain either a device name or index.
1476
The device index can also be given by using -video_device_index.
1477
A given device index will override any given device name.
1478
If the desired device consists of numbers only, use -video_device_index to identify it.
1479
The default device will be chosen if an empty string  or the device name "default" is given.
1480
The available devices can be enumerated by using -list_devices.
1481
 
1482
 
1483
	ffmpeg -f qtkit -i "0" out.mpg
1484
 
1485
 
1486
 
1487
	ffmpeg -f qtkit -video_device_index 0 -i "" out.mpg
1488
 
1489
 
1490
 
1491
	ffmpeg -f qtkit -i "default" out.mpg
1492
 
1493
 
1494
 
1495
	ffmpeg -f qtkit -list_devices true -i ""
1496
 
1497
 
1498
 
1499
=head3 Options
1500
 
1501
 
1502
 
1503
=over 4
1504
 
1505
 
1506
 
1507
=item B
1508
 
1509
Set frame rate. Default is 30.
1510
 
1511
 
1512
=item B
1513
 
1514
If set to C, print a list of devices and exit. Default is
1515
C.
1516
 
1517
 
1518
=item B
1519
 
1520
Select the video device by index for devices with the same name (starts at 0).
1521
 
1522
 
1523
=back
1524
 
1525
 
1526
 
1527
=head2 sndio
1528
 
1529
 
1530
sndio input device.
1531
 
1532
To enable this input device during configuration you need libsndio
1533
installed on your system.
1534
 
1535
The filename to provide to the input device is the device node
1536
representing the sndio input device, and is usually set to
1537
F.
1538
 
1539
For example to grab from F using B use the
1540
command:
1541
 
1542
	ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
1543
 
1544
 
1545
 
1546
=head3 Options
1547
 
1548
 
1549
 
1550
=over 4
1551
 
1552
 
1553
 
1554
=item B
1555
 
1556
Set the sample rate in Hz. Default is 48000.
1557
 
1558
 
1559
=item B
1560
 
1561
Set the number of channels. Default is 2.
1562
 
1563
 
1564
=back
1565
 
1566
 
1567
 
1568
=head2 video4linux2, v4l2
1569
 
1570
 
1571
Video4Linux2 input video device.
1572
 
1573
"v4l2" can be used as alias for "video4linux2".
1574
 
1575
If FFmpeg is built with v4l-utils support (by using the
1576
C<--enable-libv4l2> configure option), it is possible to use it with the
1577
C<-use_libv4l2> input device option.
1578
 
1579
The name of the device to grab is a file device node, usually Linux
1580
systems tend to automatically create such nodes when the device
1581
(e.g. an USB webcam) is plugged into the system, and has a name of the
1582
kind F>, where I is a number associated to
1583
the device.
1584
 
1585
Video4Linux2 devices usually support a limited set of
1586
IxI sizes and frame rates. You can check which are
1587
supported using B<-list_formats all> for Video4Linux2 devices.
1588
Some devices, like TV cards, support one or more standards. It is possible
1589
to list all the supported standards using B<-list_standards all>.
1590
 
1591
The time base for the timestamps is 1 microsecond. Depending on the kernel
1592
version and configuration, the timestamps may be derived from the real time
1593
clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
1594
boot time, unaffected by NTP or manual changes to the clock). The
1595
B<-timestamps abs> or B<-ts abs> option can be used to force
1596
conversion into the real time clock.
1597
 
1598
Some usage examples of the video4linux2 device with B
1599
and B:
1600
 
1601
=over 4
1602
 
1603
 
1604
=item *
1605
 
1606
List supported formats for a video4linux2 device:
1607
 
1608
	ffplay -f video4linux2 -list_formats all /dev/video0
1609
 
1610
 
1611
 
1612
=item *
1613
 
1614
Grab and show the input of a video4linux2 device:
1615
 
1616
	ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
1617
 
1618
 
1619
 
1620
=item *
1621
 
1622
Grab and record the input of a video4linux2 device, leave the
1623
frame rate and size as previously set:
1624
 
1625
	ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
1626
 
1627
 
1628
=back
1629
 
1630
 
1631
For more information about Video4Linux, check EBE.
1632
 
1633
 
1634
=head3 Options
1635
 
1636
 
1637
 
1638
=over 4
1639
 
1640
 
1641
=item B
1642
 
1643
Set the standard. Must be the name of a supported standard. To get a
1644
list of the supported standards, use the B
1645
option.
1646
 
1647
 
1648
=item B
1649
 
1650
Set the input channel number. Default to -1, which means using the
1651
previously selected channel.
1652
 
1653
 
1654
=item B
1655
 
1656
Set the video frame size. The argument must be a string in the form
1657
IxI or a valid size abbreviation.
1658
 
1659
 
1660
=item B
1661
 
1662
Select the pixel format (only valid for raw video input).
1663
 
1664
 
1665
=item B
1666
 
1667
Set the preferred pixel format (for raw video) or a codec name.
1668
This option allows one to select the input format, when several are
1669
available.
1670
 
1671
 
1672
=item B
1673
 
1674
Set the preferred video frame rate.
1675
 
1676
 
1677
=item B
1678
 
1679
List available formats (supported pixel formats, codecs, and frame
1680
sizes) and exit.
1681
 
1682
Available values are:
1683
 
1684
=over 4
1685
 
1686
 
1687
=item B
1688
 
1689
Show all available (compressed and non-compressed) formats.
1690
 
1691
 
1692
=item B
1693
 
1694
Show only raw video (non-compressed) formats.
1695
 
1696
 
1697
=item B
1698
 
1699
Show only compressed formats.
1700
 
1701
=back
1702
 
1703
 
1704
 
1705
=item B
1706
 
1707
List supported standards and exit.
1708
 
1709
Available values are:
1710
 
1711
=over 4
1712
 
1713
 
1714
=item B
1715
 
1716
Show all supported standards.
1717
 
1718
=back
1719
 
1720
 
1721
 
1722
=item B
1723
 
1724
Set type of timestamps for grabbed frames.
1725
 
1726
Available values are:
1727
 
1728
=over 4
1729
 
1730
 
1731
=item B
1732
 
1733
Use timestamps from the kernel.
1734
 
1735
 
1736
=item B
1737
 
1738
Use absolute timestamps (wall clock).
1739
 
1740
 
1741
=item B
1742
 
1743
Force conversion from monotonic to absolute timestamps.
1744
 
1745
=back
1746
 
1747
 
1748
Default value is C.
1749
 
1750
 
1751
=item B
1752
 
1753
Use libv4l2 (v4l-utils) conversion functions. Default is 0.
1754
 
1755
 
1756
=back
1757
 
1758
 
1759
 
1760
=head2 vfwcap
1761
 
1762
 
1763
VfW (Video for Windows) capture input device.
1764
 
1765
The filename passed as input is the capture driver number, ranging from
1766
 
1767
other filename will be interpreted as device number 0.
1768
 
1769
 
1770
=head3 Options
1771
 
1772
 
1773
 
1774
=over 4
1775
 
1776
 
1777
 
1778
=item B
1779
 
1780
Set the video frame size.
1781
 
1782
 
1783
=item B
1784
 
1785
Set the grabbing frame rate. Default value is C,
1786
corresponding to a frame rate of C<30000/1001>.
1787
 
1788
 
1789
=back
1790
 
1791
 
1792
 
1793
=head2 x11grab
1794
 
1795
 
1796
X11 video input device.
1797
 
1798
To enable this input device during configuration you need libxcb
1799
installed on your system. It will be automatically detected during
1800
configuration.
1801
 
1802
Alternatively, the configure option B<--enable-x11grab> exists
1803
for legacy Xlib users.
1804
 
1805
This device allows one to capture a region of an X11 display.
1806
 
1807
The filename passed as input has the syntax:
1808
 
1809
	[]:.[+,]
1810
 
1811
 
1812
I:I.I specifies the
1813
X11 display name of the screen to grab from. I can be
1814
omitted, and defaults to "localhost". The environment variable
1815
B contains the default display name.
1816
 
1817
I and I specify the offsets of the grabbed
1818
area with respect to the top-left border of the X11 screen. They
1819
default to 0.
1820
 
1821
Check the X11 documentation (e.g. B) for more detailed
1822
information.
1823
 
1824
Use the B program for getting basic information about
1825
the properties of your X11 display (e.g. grep for "name" or
1826
"dimensions").
1827
 
1828
For example to grab from F<:0.0> using B:
1829
 
1830
	ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
1831
 
1832
 
1833
Grab at position C<10,20>:
1834
 
1835
	ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
1836
 
1837
 
1838
 
1839
=head3 Options
1840
 
1841
 
1842
 
1843
=over 4
1844
 
1845
 
1846
=item B
1847
 
1848
Specify whether to draw the mouse pointer. A value of C<0> specify
1849
not to draw the pointer. Default value is C<1>.
1850
 
1851
 
1852
=item B
1853
 
1854
Make the grabbed area follow the mouse. The argument can be
1855
C or a number of pixels I.
1856
 
1857
When it is specified with "centered", the grabbing region follows the mouse
1858
pointer and keeps the pointer at the center of region; otherwise, the region
1859
follows only when the mouse pointer reaches within I (greater than
1860
zero) to the edge of region.
1861
 
1862
For example:
1863
 
1864
	ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
1865
 
1866
 
1867
To follow only when the mouse pointer reaches within 100 pixels to edge:
1868
 
1869
	ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
1870
 
1871
 
1872
 
1873
=item B
1874
 
1875
Set the grabbing frame rate. Default value is C,
1876
corresponding to a frame rate of C<30000/1001>.
1877
 
1878
 
1879
=item B
1880
 
1881
Show grabbed region on screen.
1882
 
1883
If I is specified with C<1>, then the grabbing
1884
region will be indicated on screen. With this option, it is easy to
1885
know what is being grabbed if only a portion of the screen is grabbed.
1886
 
1887
 
1888
=item B
1889
 
1890
Set the region border thickness if B<-show_region 1> is used.
1891
Range is 1 to 128 and default is 3 (XCB-based x11grab only).
1892
 
1893
For example:
1894
 
1895
	ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
1896
 
1897
 
1898
With I:
1899
 
1900
	ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
1901
 
1902
 
1903
 
1904
=item B
1905
 
1906
Set the video frame size. Default value is C.
1907
 
1908
 
1909
=item B
1910
 
1911
Use the MIT-SHM extension for shared memory. Default value is C<1>.
1912
It may be necessary to disable it for remote displays (legacy x11grab
1913
only).
1914
 
1915
=back
1916
 
1917
 
1918
 
1919
=head3 I I AVOption
1920
 
1921
 
1922
The syntax is:
1923
 
1924
	-grab_x  -grab_y 
1925
 
1926
 
1927
Set the grabbing region coordinates. They are expressed as offset from the top left
1928
corner of the X11 window. The default value is 0.
1929
 
1930
 
1931
 
1932
=head1 OUTPUT DEVICES
1933
 
1934
 
1935
Output devices are configured elements in FFmpeg that can write
1936
multimedia data to an output device attached to your system.
1937
 
1938
When you configure your FFmpeg build, all the supported output devices
1939
are enabled by default. You can list all available ones using the
1940
configure option "--list-outdevs".
1941
 
1942
You can disable all the output devices using the configure option
1943
"--disable-outdevs", and selectively enable an output device using the
1944
option "--enable-outdev=I", or you can disable a particular
1945
input device using the option "--disable-outdev=I".
1946
 
1947
The option "-devices" of the ff* tools will display the list of
1948
enabled output devices.
1949
 
1950
A description of the currently available output devices follows.
1951
 
1952
 
1953
=head2 alsa
1954
 
1955
 
1956
ALSA (Advanced Linux Sound Architecture) output device.
1957
 
1958
 
1959
=head3 Examples
1960
 
1961
 
1962
 
1963
=over 4
1964
 
1965
 
1966
=item *
1967
 
1968
Play a file on default ALSA device:
1969
 
1970
	ffmpeg -i INPUT -f alsa default
1971
 
1972
 
1973
 
1974
=item *
1975
 
1976
Play a file on soundcard 1, audio device 7:
1977
 
1978
	ffmpeg -i INPUT -f alsa hw:1,7
1979
 
1980
 
1981
=back
1982
 
1983
 
1984
 
1985
=head2 caca
1986
 
1987
 
1988
CACA output device.
1989
 
1990
This output device allows one to show a video stream in CACA window.
1991
Only one CACA window is allowed per application, so you can
1992
have only one instance of this output device in an application.
1993
 
1994
To enable this output device you need to configure FFmpeg with
1995
C<--enable-libcaca>.
1996
libcaca is a graphics library that outputs text instead of pixels.
1997
 
1998
For more information about libcaca, check:
1999
EBE
2000
 
2001
 
2002
=head3 Options
2003
 
2004
 
2005
 
2006
=over 4
2007
 
2008
 
2009
 
2010
=item B
2011
 
2012
Set the CACA window title, if not specified default to the filename
2013
specified for the output device.
2014
 
2015
 
2016
=item B
2017
 
2018
Set the CACA window size, can be a string of the form
2019
IxI or a video size abbreviation.
2020
If not specified it defaults to the size of the input video.
2021
 
2022
 
2023
=item B
2024
 
2025
Set display driver.
2026
 
2027
 
2028
=item B
2029
 
2030
Set dithering algorithm. Dithering is necessary
2031
because the picture being rendered has usually far more colours than
2032
the available palette.
2033
The accepted values are listed with C<-list_dither algorithms>.
2034
 
2035
 
2036
=item B
2037
 
2038
Set antialias method. Antialiasing smoothens the rendered
2039
image and avoids the commonly seen staircase effect.
2040
The accepted values are listed with C<-list_dither antialiases>.
2041
 
2042
 
2043
=item B
2044
 
2045
Set which characters are going to be used when rendering text.
2046
The accepted values are listed with C<-list_dither charsets>.
2047
 
2048
 
2049
=item B
2050
 
2051
Set color to be used when rendering text.
2052
The accepted values are listed with C<-list_dither colors>.
2053
 
2054
 
2055
=item B
2056
 
2057
If set to B, print a list of available drivers and exit.
2058
 
2059
 
2060
=item B
2061
 
2062
List available dither options related to the argument.
2063
The argument must be one of C, C,
2064
C, C.
2065
 
2066
=back
2067
 
2068
 
2069
 
2070
=head3 Examples
2071
 
2072
 
2073
 
2074
=over 4
2075
 
2076
 
2077
=item *
2078
 
2079
The following command shows the B output is an
2080
CACA window, forcing its size to 80x25:
2081
 
2082
	ffmpeg -i INPUT -vcodec rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
2083
 
2084
 
2085
 
2086
=item *
2087
 
2088
Show the list of available drivers and exit:
2089
 
2090
	ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true -
2091
 
2092
 
2093
 
2094
=item *
2095
 
2096
Show the list of available dither colors and exit:
2097
 
2098
	ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
2099
 
2100
 
2101
=back
2102
 
2103
 
2104
 
2105
=head2 decklink
2106
 
2107
 
2108
The decklink output device provides playback capabilities for Blackmagic
2109
DeckLink devices.
2110
 
2111
To enable this output device, you need the Blackmagic DeckLink SDK and you
2112
need to configure with the appropriate C<--extra-cflags>
2113
and C<--extra-ldflags>.
2114
On Windows, you need to run the IDL files through B.
2115
 
2116
DeckLink is very picky about the formats it supports. Pixel format is always
2117
uyvy422, framerate and video size must be determined for your device with
2118
B<-list_formats 1>. Audio sample rate is always 48 kHz.
2119
 
2120
 
2121
=head3 Options
2122
 
2123
 
2124
 
2125
=over 4
2126
 
2127
 
2128
 
2129
=item B
2130
 
2131
If set to B, print a list of devices and exit.
2132
Defaults to B.
2133
 
2134
 
2135
=item B
2136
 
2137
If set to B, print a list of supported formats and exit.
2138
Defaults to B.
2139
 
2140
 
2141
=item B
2142
 
2143
Amount of time to preroll video in seconds.
2144
Defaults to B<0.5>.
2145
 
2146
 
2147
=back
2148
 
2149
 
2150
 
2151
=head3 Examples
2152
 
2153
 
2154
 
2155
=over 4
2156
 
2157
 
2158
 
2159
=item *
2160
 
2161
List output devices:
2162
 
2163
	ffmpeg -i test.avi -f decklink -list_devices 1 dummy
2164
 
2165
 
2166
 
2167
=item *
2168
 
2169
List supported formats:
2170
 
2171
	ffmpeg -i test.avi -f decklink -list_formats 1 'DeckLink Mini Monitor'
2172
 
2173
 
2174
 
2175
=item *
2176
 
2177
Play video clip:
2178
 
2179
	ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 'DeckLink Mini Monitor'
2180
 
2181
 
2182
 
2183
=item *
2184
 
2185
Play video clip with non-standard framerate or video size:
2186
 
2187
	ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001 'DeckLink Mini Monitor'
2188
 
2189
 
2190
 
2191
=back
2192
 
2193
 
2194
 
2195
=head2 fbdev
2196
 
2197
 
2198
Linux framebuffer output device.
2199
 
2200
The Linux framebuffer is a graphic hardware-independent abstraction
2201
layer to show graphics on a computer monitor, typically on the
2202
console. It is accessed through a file device node, usually
2203
F.
2204
 
2205
For more detailed information read the file
2206
F included in the Linux source tree.
2207
 
2208
 
2209
=head3 Options
2210
 
2211
 
2212
=over 4
2213
 
2214
 
2215
 
2216
=item B
2217
 
2218
 
2219
=item B
2220
 
2221
Set x/y coordinate of top left corner. Default is 0.
2222
 
2223
=back
2224
 
2225
 
2226
 
2227
=head3 Examples
2228
 
2229
Play a file on framebuffer device F.
2230
Required pixel format depends on current framebuffer settings.
2231
 
2232
	ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
2233
 
2234
 
2235
See also EBE, and fbset(1).
2236
 
2237
 
2238
=head2 opengl
2239
 
2240
OpenGL output device.
2241
 
2242
To enable this output device you need to configure FFmpeg with C<--enable-opengl>.
2243
 
2244
This output device allows one to render to OpenGL context.
2245
Context may be provided by application or default SDL window is created.
2246
 
2247
When device renders to external context, application must implement handlers for following messages:
2248
C - create OpenGL context on current thread.
2249
C - make OpenGL context current.
2250
C - swap buffers.
2251
C - destroy OpenGL context.
2252
Application is also required to inform a device about current resolution by sending C message.
2253
 
2254
 
2255
=head3 Options
2256
 
2257
 
2258
=over 4
2259
 
2260
 
2261
 
2262
=item B
2263
 
2264
Set background color. Black is a default.
2265
 
2266
=item B
2267
 
2268
Disables default SDL window when set to non-zero value.
2269
Application must provide OpenGL context and both C and C callbacks when set.
2270
 
2271
=item B
2272
 
2273
Set the SDL window title, if not specified default to the filename specified for the output device.
2274
Ignored when B is set.
2275
 
2276
=item B
2277
 
2278
Set preferred window size, can be a string of the form widthxheight or a video size abbreviation.
2279
If not specified it defaults to the size of the input video, downscaled according to the aspect ratio.
2280
Mostly usable when B is not set.
2281
 
2282
 
2283
=back
2284
 
2285
 
2286
 
2287
=head3 Examples
2288
 
2289
Play a file on SDL window using OpenGL rendering:
2290
 
2291
	ffmpeg  -i INPUT -f opengl "window title"
2292
 
2293
 
2294
 
2295
=head2 oss
2296
 
2297
 
2298
OSS (Open Sound System) output device.
2299
 
2300
 
2301
=head2 pulse
2302
 
2303
 
2304
PulseAudio output device.
2305
 
2306
To enable this output device you need to configure FFmpeg with C<--enable-libpulse>.
2307
 
2308
More information about PulseAudio can be found on EBE
2309
 
2310
 
2311
=head3 Options
2312
 
2313
 
2314
=over 4
2315
 
2316
 
2317
 
2318
=item B
2319
 
2320
Connect to a specific PulseAudio server, specified by an IP address.
2321
Default server is used when not provided.
2322
 
2323
 
2324
=item B
2325
 
2326
Specify the application name PulseAudio will use when showing active clients,
2327
by default it is the C string.
2328
 
2329
 
2330
=item B
2331
 
2332
Specify the stream name PulseAudio will use when showing active streams,
2333
by default it is set to the specified output name.
2334
 
2335
 
2336
=item B
2337
 
2338
Specify the device to use. Default device is used when not provided.
2339
List of output devices can be obtained with command B.
2340
 
2341
 
2342
=item B
2343
 
2344
 
2345
=item B
2346
 
2347
Control the size and duration of the PulseAudio buffer. A small buffer
2348
gives more control, but requires more frequent updates.
2349
 
2350
B specifies size in bytes while
2351
B specifies duration in milliseconds.
2352
 
2353
When both options are provided then the highest value is used
2354
(duration is recalculated to bytes using stream parameters). If they
2355
are set to 0 (which is default), the device will use the default
2356
PulseAudio duration value. By default PulseAudio set buffer duration
2357
to around 2 seconds.
2358
 
2359
 
2360
=item B
2361
 
2362
Specify pre-buffering size in bytes. The server does not start with
2363
playback before at least B bytes are available in the
2364
buffer. By default this option is initialized to the same value as
2365
B or B (whichever is bigger).
2366
 
2367
 
2368
=item B
2369
 
2370
Specify minimum request size in bytes. The server does not request less
2371
than B bytes from the client, instead waits until the buffer
2372
is free enough to request more bytes at once. It is recommended to not set
2373
this option, which will initialize this to a value that is deemed sensible
2374
by the server.
2375
 
2376
 
2377
=back
2378
 
2379
 
2380
 
2381
=head3 Examples
2382
 
2383
Play a file on default device on default server:
2384
 
2385
	ffmpeg  -i INPUT -f pulse "stream name"
2386
 
2387
 
2388
 
2389
=head2 sdl
2390
 
2391
 
2392
SDL (Simple DirectMedia Layer) output device.
2393
 
2394
This output device allows one to show a video stream in an SDL
2395
window. Only one SDL window is allowed per application, so you can
2396
have only one instance of this output device in an application.
2397
 
2398
To enable this output device you need libsdl installed on your system
2399
when configuring your build.
2400
 
2401
For more information about SDL, check:
2402
EBE
2403
 
2404
 
2405
=head3 Options
2406
 
2407
 
2408
 
2409
=over 4
2410
 
2411
 
2412
 
2413
=item B
2414
 
2415
Set the SDL window title, if not specified default to the filename
2416
specified for the output device.
2417
 
2418
 
2419
=item B
2420
 
2421
Set the name of the iconified SDL window, if not specified it is set
2422
to the same value of I.
2423
 
2424
 
2425
=item B
2426
 
2427
Set the SDL window size, can be a string of the form
2428
IxI or a video size abbreviation.
2429
If not specified it defaults to the size of the input video,
2430
downscaled according to the aspect ratio.
2431
 
2432
 
2433
=item B
2434
 
2435
Set fullscreen mode when non-zero value is provided.
2436
Default value is zero.
2437
 
2438
=back
2439
 
2440
 
2441
 
2442
=head3 Interactive commands
2443
 
2444
 
2445
The window created by the device can be controlled through the
2446
following interactive commands.
2447
 
2448
 
2449
=over 4
2450
 
2451
 
2452
=item B
2453
 
2454
Quit the device immediately.
2455
 
2456
=back
2457
 
2458
 
2459
 
2460
=head3 Examples
2461
 
2462
 
2463
The following command shows the B output is an
2464
SDL window, forcing its size to the qcif format:
2465
 
2466
	ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
2467
 
2468
 
2469
 
2470
=head2 sndio
2471
 
2472
 
2473
sndio audio output device.
2474
 
2475
 
2476
=head2 xv
2477
 
2478
 
2479
XV (XVideo) output device.
2480
 
2481
This output device allows one to show a video stream in a X Window System
2482
window.
2483
 
2484
 
2485
=head3 Options
2486
 
2487
 
2488
 
2489
=over 4
2490
 
2491
 
2492
=item B
2493
 
2494
Specify the hardware display name, which determines the display and
2495
communications domain to be used.
2496
 
2497
The display name or DISPLAY environment variable can be a string in
2498
the format I[:I[.I]].
2499
 
2500
I specifies the name of the host machine on which the
2501
display is physically attached. I specifies the number of
2502
the display server on that host machine. I specifies
2503
the screen to be used on that server.
2504
 
2505
If unspecified, it defaults to the value of the DISPLAY environment
2506
variable.
2507
 
2508
For example, C would specify screen 1 of display
2509
 
2510
 
2511
Check the X11 specification for more detailed information about the
2512
display name format.
2513
 
2514
 
2515
=item B
2516
 
2517
When set to non-zero value then device doesn't create new window,
2518
but uses existing one with provided I. By default
2519
this options is set to zero and device creates its own window.
2520
 
2521
 
2522
=item B
2523
 
2524
Set the created window size, can be a string of the form
2525
IxI or a video size abbreviation. If not
2526
specified it defaults to the size of the input video.
2527
Ignored when I is set.
2528
 
2529
 
2530
=item B
2531
 
2532
 
2533
=item B
2534
 
2535
Set the X and Y window offsets for the created window. They are both
2536
set to 0 by default. The values may be ignored by the window manager.
2537
Ignored when I is set.
2538
 
2539
 
2540
=item B
2541
 
2542
Set the window title, if not specified default to the filename
2543
specified for the output device. Ignored when I is set.
2544
 
2545
=back
2546
 
2547
 
2548
For more information about XVideo see EBE.
2549
 
2550
 
2551
=head3 Examples
2552
 
2553
 
2554
 
2555
=over 4
2556
 
2557
 
2558
=item *
2559
 
2560
Decode, display and encode video input with B at the
2561
same time:
2562
 
2563
	ffmpeg -i INPUT OUTPUT -f xv display
2564
 
2565
 
2566
 
2567
=item *
2568
 
2569
Decode and display the input video to multiple X11 windows:
2570
 
2571
	ffmpeg -i INPUT -f xv normal -vf negate -f xv negated
2572
 
2573
 
2574
=back
2575
 
2576
 
2577
 
2578
 
2579
=head1 SEE ALSO
2580
 
2581
 
2582
 
2583
ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libavdevice(3)
2584
 
2585
 
2586
=head1 AUTHORS
2587
 
2588
 
2589
The FFmpeg developers.
2590
 
2591
For details about the authorship, see the Git history of the project
2592
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
2593
B in the FFmpeg source directory, or browsing the
2594
online repository at EBE.
2595
 
2596
Maintainers for the specific components are listed in the file
2597
F in the source code tree.
2598