ソースを参照

Only support webm or ogv when syncing videos to peertube

Bob Mottram 6 年 前
コミット
7d549793db
共有3 個のファイルを変更した6 個の追加6 個の削除を含む
  1. 1
    1
      doc/EN/app_peertube.org
  2. 3
    3
      src/freedombone-app-peertube
  3. 2
    2
      website/EN/app_peertube.html

+ 1
- 1
doc/EN/app_peertube.org ファイルの表示

@@ -42,7 +42,7 @@ The most convenient way to add new videos to PeerTube is if you have the *syncth
42 42
 
43 43
 The first line of login.txt should be your username, the second line should be the password and optionally the third line can contain the words *public* and/or *nsfw*, if you want to make imported videos immediately public or mark them as not suitable for work.
44 44
 
45
-Prepare your videos preferably in *webm* format. Other formats may be poorly supported, especially on libre distros. To minimize bandwidth usage try to keep your videos as small as possible. Giant videos with incredibly high resolution tend to result in a bad user experience. Often just converting your videos to *webm* using *ffmpeg* will keep the size down.
45
+Prepare your videos in *webm* or *ogv* format. Other formats may be poorly supported, especially on libre distros. To minimize bandwidth usage try to keep your videos as small as possible. Giant videos with incredibly high resolution tend to result in a bad user experience. Often just converting your videos to *webm* using *ffmpeg* will keep the size down.
46 46
 
47 47
 Now copy or drag and drop your videos into the *~/Sync/peertube_upload* directory. Syncthing will sync to the server and automatically add the videos to PeerTube. Depending on how large the videos are this may take some time.
48 48
 

+ 3
- 3
src/freedombone-app-peertube ファイルの表示

@@ -120,7 +120,7 @@ function peertube_import_from_syncthing {
120 120
       echo "echo \"0\" > \$LOCKFILE";
121 121
       echo '';
122 122
       echo "for video_file in \$search_dir/*; do";
123
-      echo "    if [[ \"\$video_file\" == *'.ogv' || \"\$video_file\" == *'.mp4' || \"\$video_file\" == *'.webm' ]]; then";
123
+      echo "    if [[ \"\$video_file\" == *'.ogv' || \"\$video_file\" == *'.webm' ]]; then";
124 124
       echo "        if ! grep -q \"\$video_file\" /root/.peertube_uploaded; then";
125 125
       echo "            peertubetitle=\$(basename \"\$video_file\" | awk -F '.' '{print \$1}' | sed 's|_| |g' | sed 's|-| |g')";
126 126
       echo "            if $nodecmd \$import_script -n \"\$peertubetitle\" \$peertubensfw \$peertubeprivate -u \"\$peertubedomain\" -U \"\$peertubeuser\" --password \"\$peertubepassword\" -f \"\$video_file\"; then";
@@ -278,9 +278,9 @@ function peertube_import_from_file {
278 278
     if [ ! "$selected_file" ]; then
279 279
         return
280 280
     fi
281
-    if [[ "$selected_file" != *'.ogv' && "$selected_file" != *'.mp4' && "$selected_file" != *'.webm' ]]; then
281
+    if [[ "$selected_file" != *'.ogv' && "$selected_file" != *'.webm' ]]; then
282 282
         dialog --title $"Import video from file" \
283
-               --msgbox $"The video should be in ogv, mp4 or webm format" 6 75
283
+               --msgbox $"The video should be in ogv or webm format" 6 75
284 284
         return
285 285
     fi
286 286
 

+ 2
- 2
website/EN/app_peertube.html ファイルの表示

@@ -4,7 +4,7 @@
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6 6
 <title></title>
7
-<!-- 2018-06-16 Sat 21:52 -->
7
+<!-- 2018-06-21 Thu 10:27 -->
8 8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
9 9
 <meta  name="generator" content="Org-mode" />
10 10
 <meta  name="author" content="Bob Mottram" />
@@ -226,7 +226,7 @@ The first line of login.txt should be your username, the second line should be t
226 226
 </p>
227 227
 
228 228
 <p>
229
-Prepare your videos preferably in <b>webm</b> format. Other formats may be poorly supported, especially on libre distros. To minimize bandwidth usage try to keep your videos as small as possible. Giant videos with incredibly high resolution tend to result in a bad user experience. Often just converting your videos to <b>webm</b> using <b>ffmpeg</b> will keep the size down.
229
+Prepare your videos in <b>webm</b> or <b>ogv</b> format. Other formats may be poorly supported, especially on libre distros. To minimize bandwidth usage try to keep your videos as small as possible. Giant videos with incredibly high resolution tend to result in a bad user experience. Often just converting your videos to <b>webm</b> using <b>ffmpeg</b> will keep the size down.
230 230
 </p>
231 231
 
232 232
 <p>