-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
71 lines (46 loc) · 2.36 KB
/
README
File metadata and controls
71 lines (46 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Tools for video conversion
The goal is to stream video via HTTP to HTML5 browsers and mobile devices.
Such browsers and devices do not have a common supported video format and
most video is captured and/or edited in other formats. We need tools to
convert from the capture formats to the streaming formats. FFMPEG (incl.
the associated libraries it uses) is a terrific tool for this, but it has
lots of configuration options that need to be set on each run.
The purpose of this project is to wrap up FFMPEG and its allies into a
workflow that meets our needs.
The Workflow
------------
This workflow assumes a directory structure:
upload/ - where the source video gets put
masters/ - where the master video gets put
public/ - where the streamable videos get put
* Stage 1 - Create a master
convert_video_to_master.pl
The master video the last stage of quality improvement before the video
is converted to equal or lower quality streaming formats. Of particular
interest to my workflow is normalizing the audio volume of the videos.
Run this script from the masters/ directory.
* Stage 2 - Create the streaming versions
convert_video_to_streaming.pl
The streaming videos should be in the formats understood by browsers
and devices. They should also be low enough average bitrate that they
can stream over slower connections. The versions should be roughly
equivalent in terms of the quality parameters used for encoding.
Run this script from the public/ directory.
* Stage 3 - Create the HTML code
create_html_embed_code.pl
create_video_html_pages.pl
To properly support all browsers and devices, some mildly fancy HTML
needs to be assembled. These scripts scan the current directory for
videos and assemble the HTML. One script outputs everything in one
HTML page to stdout. The other script creates one file per video.
Shortcut
convert_video.pl
If the program is run without any input, it will run from the users
home directory in the video directory. It will grab files in
the upload directory and output the converted version into the
public directory.
There is also an option to run the conversion program on files
outside of the video directory. The program takes the filenames
as input. Multiple files can be inputted at the same time.
If this process is used, all output is placed in the same
directory as the program is run from.