Skip to content
Snippets Groups Projects
Commit 7d549793 authored by Bob Mottram's avatar Bob Mottram
Browse files

Only support webm or ogv when syncing videos to peertube

parent be50bfb7
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ The most convenient way to add new videos to PeerTube is if you have the *syncth
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.
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.
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.
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.
......
......@@ -120,7 +120,7 @@ function peertube_import_from_syncthing {
echo "echo \"0\" > \$LOCKFILE";
echo '';
echo "for video_file in \$search_dir/*; do";
echo " if [[ \"\$video_file\" == *'.ogv' || \"\$video_file\" == *'.mp4' || \"\$video_file\" == *'.webm' ]]; then";
echo " if [[ \"\$video_file\" == *'.ogv' || \"\$video_file\" == *'.webm' ]]; then";
echo " if ! grep -q \"\$video_file\" /root/.peertube_uploaded; then";
echo " peertubetitle=\$(basename \"\$video_file\" | awk -F '.' '{print \$1}' | sed 's|_| |g' | sed 's|-| |g')";
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 {
if [ ! "$selected_file" ]; then
return
fi
if [[ "$selected_file" != *'.ogv' && "$selected_file" != *'.mp4' && "$selected_file" != *'.webm' ]]; then
if [[ "$selected_file" != *'.ogv' && "$selected_file" != *'.webm' ]]; then
dialog --title $"Import video from file" \
--msgbox $"The video should be in ogv, mp4 or webm format" 6 75
--msgbox $"The video should be in ogv or webm format" 6 75
return
fi
......
......@@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<!-- 2018-06-16 Sat 21:52 -->
<!-- 2018-06-21 Thu 10:27 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<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
</p>
<p>
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.
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.
</p>
<p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment