author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 22 Feb 2016 12:41:52 +0200 | |
changeset 1903 | 901e7394849f |
parent 1772 | f2e72be1412b |
child 1905 | fba288d59662 |
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 |
|
1772 | 45 |
$ guvcview |
1308 | 46 |
$ cheese |
47 |
$ camorama |
|
48 |
||
1499
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
49 |
Make screenshort from web camera:: |
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
50 |
|
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 1 test.jpeg |
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
52 |
$ 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
|
53 |
|
b19fe371e90e
Make screenshort from web camera.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1498
diff
changeset
|
54 |
Record web camera to a file:: |
1498
094d7e74252a
Recording web camera to file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1361
diff
changeset
|
55 |
|
094d7e74252a
Recording web camera to file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1361
diff
changeset
|
56 |
$ mencoder -fps 15 tv:// -ovc lavc -o my.avi |
1772 | 57 |
$ guvcview |
1498
094d7e74252a
Recording web camera to file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1361
diff
changeset
|
58 |
|
1308 | 59 |
See: |
60 |
||
61 |
http://wiki.debian.org/Webcam |
|
62 |
Debian wiki. |
|
63 |
||
1359
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
64 |
Extract audio from video file. |
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
65 |
============================== |
1532
53d1eee0ee05
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1518
diff
changeset
|
66 |
|
53d1eee0ee05
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1518
diff
changeset
|
67 |
``$NO`` - autio strean number:: |
53d1eee0ee05
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1518
diff
changeset
|
68 |
|
1545 | 69 |
$ ffmpeg -i $IN -c:a:$NO $OUT.mp3 |
1359
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
70 |
|
9ea67efc1fac
Extract audio from video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1358
diff
changeset
|
71 |
$ 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
|
72 |
|
1360
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
73 |
Integrate audio to video file. |
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 |
:: |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
76 |
|
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
77 |
$ mencoder \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
78 |
-ffourcc divx \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
79 |
-ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=400 \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
80 |
-audiofile audio.wav \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
81 |
-oac mp3lame -lameopts vbr=3 \ |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
82 |
-o output.avi input.mkv |
380c5205ef4e
Integrate audio to video file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1359
diff
changeset
|
83 |
|
1358
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
84 |
Synchronise video and audio streams. |
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 |
:: |
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
87 |
|
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
88 |
$ 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
|
89 |
$ 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
|
90 |
-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
|
91 |
-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
|
92 |
|
1361
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
93 |
Convert video for Nokia 5320. |
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 |
:: |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
96 |
|
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
97 |
$ mencoder -mc 0 -of lavf -lavfopts format=mp4 \ |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
98 |
-oac lavc -ovc lavc \ |
f62fc97ba770
Convert video for Nokia 5320.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1360
diff
changeset
|
99 |
-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
|
100 |
-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
|
101 |
-o out.mp4 in.avi |
1358
7a93143dbf53
Synchronise video and audio streams.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1355
diff
changeset
|
102 |
|
1308 | 103 |
How convert .3gp to .avi(mpeg)? |
104 |
=============================== |
|
105 |
:: |
|
106 |
||
107 |
$ sudo apt-get install ffmpeg |
|
108 |
$ ffmpeg -i test.3gp -f mpegvideo -ar 44100 -ac 1 -acodec mp3 test.mpg |
|
109 |
$ 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 |
|
110 |
$ ffmpeg -i video-in.3gp -b 250 -s 160×120 -r 15 -f avi -an video-out.avi |
|
111 |
$ mencoder -oac mp3lame -ovc lavc -o video-out.avi -vf pp,2xsai,scale video-in.3gp |
|
112 |
$ mencoder -o video-in.avi -vf pp,2xsai,scale -ovc lavc video-out.3gp |
|
113 |
$ mencoder -o video-in.avi -vf rotate=2 -oac pcm -ovc divx4 video-out.3gp |
|
114 |
||
115 |
You need to compile FFmpeg with AMR support (--enable-amr_nb --enable-amr_wb). |
|
116 |
||
117 |
AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204 |
|
118 |
V5.1.0 from |
|
119 |
http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip |
|
120 |
and extracted the source to libavcodec/amrwb_float |
|
121 |
||
122 |
||
123 |
AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104 |
|
124 |
REL-5 V5.1.0 from |
|
125 |
http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-5??.zip |
|
126 |
and extracted the source to libavcodec/amr_float |
|
127 |
and if u try this on an alpha, u may need to change Word32 to int in |
|
128 |
amr/typedef.h |
|
129 |
||
1518 | 130 |
Video editors. |
131 |
============== |
|
132 |
:: |
|
1308 | 133 |
|
1518 | 134 |
$ sudo apt-get install pitivi kino |
1308 | 135 |
|
1518 | 136 |
See: |
1308 | 137 |
|
1518 | 138 |
http://www.pitivi.org/ |
139 |
pitivi home page. |
|
140 |
http://www.kinodv.org/ |
|
141 |
Kino home page. |
|
1308 | 142 |