author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Wed, 05 Aug 2015 23:55:34 +0300 | |
changeset 1729 | 22ffd80639c0 |
parent 1545 | bce7c524f517 |
child 1772 | f2e72be1412b |
permissions | -rw-r--r-- |
1308 | 1 |
.. -*- coding: utf-8; -*- |
1334
9bf0d5a1f0cf
Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1309
diff
changeset
|
2 |
.. include:: HEADER.rst |
1308 | 3 |
|
4 |
======== |
|
5 |
Video. |
|
6 |
======== |
|
1346
a2fbf50a43f4
Fix: Has no 'contents::' directive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
7 |
.. contents:: |
1308 | 8 |
|
9 |
Players for linux? |
|
10 |
================== |
|
11 |
:: |
|
12 |
||
13 |
$ sudo apt-get install vlc |
|
14 |
$ sudo apt-get install mplayer |
|
15 |
||
1355
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
16 |
Determine video format. |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
17 |
======================= |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
18 |
:: |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
19 |
|
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
20 |
$ file $VIDEO |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
21 |
$ mplayer -frames 0 -vo null -ao null -identify $VIDEO |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
22 |
$ mediainfo $VIDEO |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
23 |
|
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
24 |
See: |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
25 |
|
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
26 |
http://en.gentoo-wiki.com/wiki/Show_Video_Codecs |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
27 |
Show Video Codecs |
22bbad2a94db
Determine video format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
28 |
|
1309 | 29 |
3d film. |
30 |
======== |
|
31 |
:: |
|
32 |
||
33 |
$ mplayer -vf stereo3d=side_by_side_left_first:anaglyph_red_cyan_color -vo gl $VIDEO |
|
34 |
$ mplayer -vf stereo3d=above_below_left_first:anaglyph_red_cyan_color -vo gl $VIDEO |
|
35 |
||
36 |
See ``man 1 mplayer``. |
|
37 |
||
1308 | 38 |
Web camera. |
39 |
=========== |
|
40 |
||
1499
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
41 |
View picture from web camera on display screen:: |
1308 | 42 |
|
43 |
$ mplayer tv:// |
|
44 |
$ mplayer tv:// -tv driver=v4l2:width=640:height=480:fps=15:device=/dev/video0 |
|
45 |
$ cheese |
|
46 |
$ camorama |
|
47 |
||
1499
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
48 |
Make screenshort from web camera:: |
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
49 |
|
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
50 |
$ ffmpeg -f video4linux2 -i /dev/v4l/by-id/CAMERA -vframes 1 test.jpeg |
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
51 |
$ ffmpeg -f video4linux2 -i /dev/v4l/by-id/CAMERA -vframes 4 test%3d.jpeg |
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
52 |
|
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
53 |
Record web camera to a file:: |
1498
094d7e74252a
Recording web camera to file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1361
diff
changeset
|
54 |
|
094d7e74252a
Recording web camera to file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1361
diff
changeset
|
55 |
$ mencoder -fps 15 tv:// -ovc lavc -o my.avi |
094d7e74252a
Recording web camera to file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1361
diff
changeset
|
56 |
|
1308 | 57 |
See: |
58 |
||
59 |
http://wiki.debian.org/Webcam |
|
60 |
Debian wiki. |
|
61 |
||
1359
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
62 |
Extract audio from video file. |
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
63 |
============================== |
1532
53d1eee0ee05
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1518
diff
changeset
|
64 |
|
53d1eee0ee05
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1518
diff
changeset
|
65 |
``$NO`` - autio strean number:: |
53d1eee0ee05
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1518
diff
changeset
|
66 |
|
1545 | 67 |
$ ffmpeg -i $IN -c:a:$NO $OUT.mp3 |
1359
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
68 |
|
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
69 |
$ mplayer -ao pcm:fast:file=audio.wav -vc null -vo null input.avi |
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
70 |
|
1360
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
71 |
Integrate audio to video file. |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
72 |
============================== |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
73 |
:: |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
74 |
|
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
75 |
$ mencoder \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
76 |
-ffourcc divx \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
77 |
-ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=400 \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
78 |
-audiofile audio.wav \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
79 |
-oac mp3lame -lameopts vbr=3 \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
80 |
-o output.avi input.mkv |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
81 |
|
1358
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
82 |
Synchronise video and audio streams. |
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
83 |
==================================== |
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
84 |
:: |
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
85 |
|
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
86 |
$ mencoder -delay 0.7 -oac copy -ovc copy in.avi -o out.avi |
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
87 |
$ mencoder -mc 0 -of lavf -lavfopts format=mp4 -oac lavc -ovc lavc \ |
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
88 |
-lavcopts aglobal=1:vglobal=1:acodec=libmp3lame:abitrate=128:vcodec=mpeg4:vbitrate=500:keyint=200 |
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
89 |
-vf scale=-3:240,crop=320:240,harddup -af lavcresample=44100 -o out.mp4 in.mp4 |
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
90 |
|
1361
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
91 |
Convert video for Nokia 5320. |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
92 |
============================= |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
93 |
:: |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
94 |
|
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
95 |
$ mencoder -mc 0 -of lavf -lavfopts format=mp4 \ |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
96 |
-oac lavc -ovc lavc \ |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
97 |
-lavcopts aglobal=1:vglobal=1:acodec=libmp3lame:abitrate=96:vcodec=mpeg4:vbitrate=400:keyint=100 \ |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
98 |
-vf scale=-3:240,crop=320:240,harddup -af lavcresample=44100 -ofps 15 \ |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
99 |
-o out.mp4 in.avi |
1358
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
100 |
|
1308 | 101 |
How convert .3gp to .avi(mpeg)? |
102 |
=============================== |
|
103 |
:: |
|
104 |
||
105 |
$ sudo apt-get install ffmpeg |
|
106 |
$ ffmpeg -i test.3gp -f mpegvideo -ar 44100 -ac 1 -acodec mp3 test.mpg |
|
107 |
$ for i in `ls -1 *.3gp | cut -d. -f1`; do ffmpeg -y -i $i.3gp -sameq -f mpegvideo -s cif -r 25 -ar 32000 -ac 1 mpegs/$i.mpg; done |
|
108 |
$ ffmpeg -i video-in.3gp -b 250 -s 160×120 -r 15 -f avi -an video-out.avi |
|
109 |
$ mencoder -oac mp3lame -ovc lavc -o video-out.avi -vf pp,2xsai,scale video-in.3gp |
|
110 |
$ mencoder -o video-in.avi -vf pp,2xsai,scale -ovc lavc video-out.3gp |
|
111 |
$ mencoder -o video-in.avi -vf rotate=2 -oac pcm -ovc divx4 video-out.3gp |
|
112 |
||
113 |
You need to compile FFmpeg with AMR support (--enable-amr_nb --enable-amr_wb). |
|
114 |
||
115 |
AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204 |
|
116 |
V5.1.0 from |
|
117 |
http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip |
|
118 |
and extracted the source to libavcodec/amrwb_float |
|
119 |
||
120 |
||
121 |
AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104 |
|
122 |
REL-5 V5.1.0 from |
|
123 |
http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-5??.zip |
|
124 |
and extracted the source to libavcodec/amr_float |
|
125 |
and if u try this on an alpha, u may need to change Word32 to int in |
|
126 |
amr/typedef.h |
|
127 |
||
1518 | 128 |
Video editors. |
129 |
============== |
|
130 |
:: |
|
1308 | 131 |
|
1518 | 132 |
$ sudo apt-get install pitivi kino |
1308 | 133 |
|
1518 | 134 |
See: |
1308 | 135 |
|
1518 | 136 |
http://www.pitivi.org/ |
137 |
pitivi home page. |
|
138 |
http://www.kinodv.org/ |
|
139 |
Kino home page. |
|
1308 | 140 |