-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
91 lines (79 loc) · 4.08 KB
/
README
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
WebCmd
======
Framework for putting together custom tools into a web interface. Makes it easy
to provide control over services on your local computer through a common
webpage, or to experiment with simple tools a la the Google calculator.
Alpha - this is a work in progress, getting new features and modules as I need
them. May not be too valuable yet, although the on-the-fly transcoding is
pretty slick.
Written on Windows (x64), but it should be platform agnostic. If you try it on
anything else, let me know how it goes.
Top-level Flags:
-host: Server address to host on. (":8080" is default).
-window: Whether to try to open a GUI window. On windows when compiled as a gui
application and run with --window=false the process runs in the background
with no visible window whatsoever.
-resource_path: Where to find resource files. This shouldn't need to be set for
installed go programs - it will look relative to the location of the
executable - but if necessary, set to the source directory
(src/github.com/EricBurnett/WebCmd).
Currently Supported Modules:
-------------------
Static File Serving
SMB making you miserable? This lets you share files from your local disk
over standard HTTP for easy access.
Can't easily play your videos across devices? Video files are wrapped in an
HTML5 player (disable with --custom_video_player=false), and transcoded on
the fly to a web-friendly format (disable with --transcode=false).
Notes:
- Served paths are configured via --static_content_config.
- Player comes from http://videojs.com
- You must have ffmpeg or similar for transcoding.
- Transcoded files can't be seeked, since they're encoded on the fly. If
you have ideas to make that work without losing the instant playing, give
me a shout!
- I've only tested file formats in Chrome, but via --transcode_settings and
--transcode_content_type you can experiment yourself. If you find other
browsers like different settings, let me know and I can add
browser-specific options.
Flags:
-static_content_config: Path to csv file for configuring hosted
directories. staticcontent/example_paths.csv for an example file.
-custom_video_player: Whether to return an HTML5 player wrapper for video
files.
-transcode: Transcode videos to web-friendly formats.
-transcoder: Path to transcoder to use (ffmpeg is default).
-transcode_settings: Parameters to pass to transcoder to control output.
-transcode_content_type: Content type of the transcoded video, for setting
mime types. (webm is default).
-transcode_input_flag: Flag to specify an input file, if different from
ffmpeg.
-transcode_seek_flag: Flag to specify how far to seek the input, if
different from ffmpeg. If set to '', seeking is disabled.
-verbose_transcode_output: Write extra output to the log file, including
the stderr messages of the transcoder itself.
Grooveshark Desktop
Basic player controls for Grooveshark Desktop. Only limited controls are
supported (support was intended for keyboard shortcuts), but this gives you
play/pause and next song at least.
Notes:
- You must set --gs_path to point to the Grooveshark Desktop location to
enable the module - it won't load if it can't find the file.
Flags:
-gs_path: The path Grooveshark Desktop installed user data to. Set this
to enable gsDesktop control.
-gs_control_file: The file Grooveshark watches. You shouldn't need to
change this.
A Full Example
==============
1. Install ffmpeg somewhere on your path.
2. Create a file for configuring static file serving. E.g.
C:\Documents\webcmd_paths.csv:
"movies","C:\Documents\Movies"
(On linux, use linux-style paths)
3. go get github.com/EricBurnett/WebCmd
4. go install github.com/EricBurnett/WebCmd
5. WebCmd --static_content_config="C:\Documents\webcmd_paths.csv"
6. Point a web browser to http://localhost:8080
7. Try typing "files", or going to http://localhost:8080/files, and browse
around. Try a video!