commit 082cef6fd3cd52866155992f650912f6e5a0ff87
Author: Kiritow <1362050620@qq.com>
Date: Sun Sep 2 10:22:06 2018 +0800
Initial Commit
diff --git a/LocalCoverUpdate.cpp b/LocalCoverUpdate.cpp
new file mode 100644
index 0000000..ad1324f
Binary files /dev/null and b/LocalCoverUpdate.cpp differ
diff --git a/LocalVideoList.cpp b/LocalVideoList.cpp
new file mode 100644
index 0000000..f3ea3e9
Binary files /dev/null and b/LocalVideoList.cpp differ
diff --git a/LocalVideoUpload.cpp b/LocalVideoUpload.cpp
new file mode 100644
index 0000000..f83b07a
Binary files /dev/null and b/LocalVideoUpload.cpp differ
diff --git a/Readme.md b/Readme.md
new file mode 100644
index 0000000..d8411e2
--- /dev/null
+++ b/Readme.md
@@ -0,0 +1,27 @@
+# Video Site
+
+* 在线播放视频(使用h5 video).
+
+* 后台生成视频缩略图.
+
+* 点击图片即可播放.
+
+* 支持在线上传视频到服务器(目前只支持mp4和vdat)
+
+## Web页面
+
+**index.html**: 额外需要jQuery放置在/js/jquery.js下
+
+## CGI
+
+CGI需要HttpWrapper支持.
+
+**LocalVideoList**: 用于获取本地视频列表.
+
+**LocalVideoUpload**: 用于处理视频上传.
+
+**LocalCoverUpdate**: 用于在后台发起缩略图更新.
+
+## 服务器本地
+
+**generate_cover.py**: 用于扫描并生成视频的缩略图. 额外需要ffmpeg. 需要有cover文件夹.
\ No newline at end of file
diff --git a/generate_cover.py b/generate_cover.py
new file mode 100644
index 0000000..a7f75e2
--- /dev/null
+++ b/generate_cover.py
@@ -0,0 +1,15 @@
+# coding=gbk
+import sys
+import os
+
+print(sys.getdefaultencoding())
+
+for root,dirs,files in os.walk('.'):
+ for names in files:
+ if(names.endswith(".mp4")):
+ filename=names[0:-4]
+ print(filename)
+ cmd='ffmpeg -ss 00:00:05.000 -i "'+filename+'.mp4" -vframes 1 "cover/'+filename+'.png" -y'
+ print(cmd)
+ os.system(cmd)
+
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..13612ca
--- /dev/null
+++ b/index.html
@@ -0,0 +1,159 @@
+
+
+
+
XV Homepage
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/json.hpp b/json.hpp
new file mode 100644
index 0000000..6b6655a
--- /dev/null
+++ b/json.hpp
@@ -0,0 +1,17300 @@
+/*
+ __ _____ _____ _____
+ __| | __| | | | JSON for Modern C++
+| | |__ | | | | | | version 3.1.2
+|_____|_____|_____|_|___| https://github.com/nlohmann/json
+
+Licensed under the MIT License .
+Copyright (c) 2013-2018 Niels Lohmann .
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+#ifndef NLOHMANN_JSON_HPP
+#define NLOHMANN_JSON_HPP
+
+#define NLOHMANN_JSON_VERSION_MAJOR 3
+#define NLOHMANN_JSON_VERSION_MINOR 1
+#define NLOHMANN_JSON_VERSION_PATCH 2
+
+#include // all_of, find, for_each
+#include // assert
+#include // and, not, or
+#include // nullptr_t, ptrdiff_t, size_t
+#include // hash, less
+#include // initializer_list
+#include // istream, ostream
+#include // iterator_traits, random_access_iterator_tag
+#include // accumulate
+#include // string, stoi, to_string
+#include // declval, forward, move, pair, swap
+
+// #include
+#ifndef NLOHMANN_JSON_FWD_HPP
+#define NLOHMANN_JSON_FWD_HPP
+
+#include // int64_t, uint64_t
+#include