Browse Source

Only support webm or ogv when syncing videos to peertube

Bob Mottram 7 years ago
parent
commit
7d549793db
3 changed files with 6 additions and 6 deletions
  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 View File

42
 
42
 
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.
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
 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.
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 View File

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

+ 2
- 2
website/EN/app_peertube.html View File

4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
 <head>
5
 <head>
6
 <title></title>
6
 <title></title>
7
-<!-- 2018-06-16 Sat 21:52 -->
7
+<!-- 2018-06-21 Thu 10:27 -->
8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
9
 <meta  name="generator" content="Org-mode" />
9
 <meta  name="generator" content="Org-mode" />
10
 <meta  name="author" content="Bob Mottram" />
10
 <meta  name="author" content="Bob Mottram" />
226
 </p>
226
 </p>
227
 
227
 
228
 <p>
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
 </p>
230
 </p>
231
 
231
 
232
 <p>
232
 <p>