Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
Plexus v0.9.0
Browse files Browse the repository at this point in the history
- Added additional error handling for the encode function where no manual list file is specified but the default list file doesn't exist either
- Added FFmpeg bug fix flag for each FFmpeg call (-max-muxing_queue_size 1024)
- Added --verbose flag to encode function
- Improved the information on the Help page of the Plexus Suite website
  • Loading branch information
wolveix committed Oct 15, 2018
1 parent 33bac20 commit b34f467
Show file tree
Hide file tree
Showing 8 changed files with 1,022 additions and 26 deletions.
10 changes: 8 additions & 2 deletions docs/help/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ <h1 class="doc-title"><span aria-hidden="true" class="fa fa-question-circle"></s
<section id="general" class="doc-section">
<h2 class="section-title">General</h2>
<div class="section-block">
<h3 class="question"><i class="fa fa-question-circle"></i> What if the install fails?</h3>
<div class="answer">The app is currently unstable and in active development. Please wait for a stable release.</div>
<h3 class="question"><i class="fa fa-question-circle"></i> I don't have FFmpeg installed. How can I install it?</h3>
<div class="answer">The recommended way to install any of Plexus' dependencies is to use the built-in install function. From there, you can either install the precompiled version of FFmpeg from your OS' repositories, or you can install a custom build with extended codec support.</div>

<h3 class="question"><i class="fa fa-question-circle"></i> I'm getting "An unknown error occurred with FFmpeg.", what should I do?</h3>
<div class="answer">Run the encode command again while ensuring that the --verbose flag is set. Once the error occurs again, copy & paste FFmpeg's output into a new GitHub issue for the <a href="https://github.com/Wolveix/Plexus">Plexus repository</a>.</div>

<h3 class="question"><i class="fa fa-question-circle"></i> What does Plexus do?</h3>
<div class="answer">A lot of things. But it's original intended purpose was to create a sublist of media from your media collection which doesn't meet your desired video and audio codec specifications (by default, these are h264 for video and aac for audio as they're the most universally played codecs), and then process said list to re-encode the media.<br>By running the list command while using the -d flag to point to your overall media directory, Plexus will build a list file containing absolute paths to the media in question. Once the list file is complete, you're then able to feed the list into the encode command which will then re-encode all of the media that needs to be re-encoded. You can specify your default codecs from your config file ($HOME/.config/plexus/plexus.conf), or you can specify the codecs wanted for a specific runtime session by using the -a and -v flags respectively.</div>
</div>
</section>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ <h1 class="logo"> <a href="/"> <span aria-hidden="true" class="icon_documents_al
<div class="doc-wrapper">
<div class="container">
<div id="doc-header" class="doc-header text-center">
<h1 class="doc-title"><i class="icon fa fa-share"></i> Plexus Suite v0.8.9</h1>
<div class="meta"><i class="fa fa-clock-o"></i> Last updated: October 11th, 2018</div>
<h1 class="doc-title"><i class="icon fa fa-share"></i> Plexus Suite v0.9.0</h1>
<div class="meta"><i class="fa fa-clock-o"></i> Last updated: October 15th, 2018</div>
</div>
<div class="doc-body">
<div class="doc-content">
Expand Down
2 changes: 1 addition & 1 deletion docs/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
printf "\\e[93m=== Plexus v0.8.9 - Developed by Robert Thomas ==="
printf "\\e[93m=== Plexus v0.9.0 - Developed by Robert Thomas ==="
printf "\\n=== https://github.com/Wolveix/Plexus ==="
printf "\\n\\e[36mInstalling any missing dependencies.\\n\\e[94m"
apt-get install curl ffmpeg -y -qq
Expand Down
8 changes: 7 additions & 1 deletion docs/versions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h1 class="logo"> <a href="/"> <span aria-hidden="true" class="icon_documents_al
<div class="container">
<div id="doc-header" class="doc-header text-center">
<h1 class="doc-title"><i class="icon fa fa-download"></i> Versions</h1>
<div class="meta"><i class="fa fa-clock-o"></i> Last updated: September 26th, 2018</div>
<div class="meta"><i class="fa fa-clock-o"></i> Last updated: October 15th, 2018</div>
</div>
<div class="doc-body">
<div class="doc-content">
Expand All @@ -54,6 +54,12 @@ <h2 class="section-title">Downloads</h2>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">0.9</th>
<td><a href="https://plexus.robt.me/versions/releases/v0.9/plexus">Link</a></td>
<td><a href="https://github.com/Wolveix/Plexus/commit/?" target="_blank">?</a></td>
<td><a href="https://github.com/Wolveix">@Wolveix</a></td>
</tr>
<tr>
<th scope="row">0.8</th>
<td><a href="https://plexus.robt.me/versions/releases/v0.8/plexus">Link</a></td>
Expand Down
40 changes: 30 additions & 10 deletions docs/versions/releases/latest/plexus
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
HEADER_TEXT="\\e[93m=== Plexus v0.8.9 - Developed by Robert Thomas ===\\n"
HEADER_TEXT="\\e[93m=== Plexus v0.9.0 - Developed by Robert Thomas ===\\n"
HEADER_SUBTEXT="\\e[93m=== https://github.com/Wolveix/Plexus ===\\n"
set -e
if [ -f "$HOME"/.config/plexus/plexus.conf ]
Expand Down Expand Up @@ -341,6 +341,19 @@ function func_config {
}

function func_encode {
if [ "$verbose" == "true" ]
then
ffmpeg_verbose=""
else
ffmpeg_verbose="-loglevel quiet"
fi

if [ ! -e "$list_file" ]
then
printf "List file does not exist.\\nPlease manually specify a list file or run the list command to create one.\\n"
exit 0
fi

while read line; do
if [ -n "$line" ]
then
Expand Down Expand Up @@ -415,18 +428,18 @@ function func_encode {
then
if [ "$file_audio_codec" != "$audio_codec" ]
then
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v copy -c:a "$audio_codec" -preset "$ffmpeg_preset" -movflags faststart -threads 2 -nostdin -loglevel quiet -stats "$converted_dir/$NAME.mkv"
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v copy -c:a "$audio_codec" -preset "$ffmpeg_preset" -max_muxing_queue_size 1024 -movflags faststart -threads 2 -nostdin $ffmpeg_verbose -stats "$converted_dir/$NAME.mkv"
then
printf "\\n\\nAn unknown error occurred with FFmpeg.\\nTrying with full conversion instead.\\n\\n"
if [ "$video_codec" == "h264" ]
then
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -crf 20 -level 4.1 -c:a "$audio_codec" -preset "$ffmpeg_preset" -movflags faststart -threads 2 -nostdin -loglevel quiet -stats "$converted_dir/$NAME.mkv"
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -crf 20 -level 4.1 -c:a "$audio_codec" -preset "$ffmpeg_preset" -max_muxing_queue_size 1024 -movflags faststart -threads 2 -nostdin $ffmpeg_verbose -stats "$converted_dir/$NAME.mkv"
then
printf "$ffmpeg_error"
exit 0
fi
else
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -c:a "$audio_codec" -preset "$ffmpeg_preset" -movflags faststart -threads 2 -nostdin -loglevel quiet -stats "$converted_dir/$NAME.mkv"
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -c:a "$audio_codec" -preset "$ffmpeg_preset" -max_muxing_queue_size 1024 -movflags faststart -threads 2 -nostdin $ffmpeg_verbose -stats "$converted_dir/$NAME.mkv"
then
printf "$ffmpeg_error"
exit 0
Expand All @@ -441,13 +454,13 @@ function func_encode {
then
if [ "$video_codec" == "h264" ]
then
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -crf 20 -level 4.1 -c:a copy -preset "$ffmpeg_preset" -movflags faststart -threads 2 -nostdin -loglevel quiet -stats "$converted_dir/$NAME.mkv"
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -crf 20 -level 4.1 -c:a copy -preset "$ffmpeg_preset" -max_muxing_queue_size 1024 -movflags faststart -threads 2 -nostdin $ffmpeg_verbose -stats "$converted_dir/$NAME.mkv"
then
printf "$ffmpeg_error"
exit 0
fi
else
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -c:a copy -preset "$ffmpeg_preset" -movflags faststart -threads 2 -nostdin -loglevel quiet -stats "$converted_dir/$NAME.mkv"
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -c:a copy -preset "$ffmpeg_preset" -max_muxing_queue_size 1024 -movflags faststart -threads 2 -nostdin $ffmpeg_verbose -stats "$converted_dir/$NAME.mkv"
then
printf "$ffmpeg_error"
exit 0
Expand All @@ -456,13 +469,13 @@ function func_encode {
else
if [ "$video_codec" == "h264" ]
then
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -crf 20 -level 4.1 -c:a "$audio_codec" -preset "$ffmpeg_preset" -movflags faststart -threads 2 -nostdin -loglevel quiet -stats "$converted_dir/$NAME.mkv"
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -crf 20 -level 4.1 -c:a "$audio_codec" -preset "$ffmpeg_preset" -max_muxing_queue_size 1024 -movflags faststart -threads 2 -nostdin $ffmpeg_verbose -stats "$converted_dir/$NAME.mkv"
then
printf "$ffmpeg_error"
exit 0
fi
else
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -c:a "$audio_codec" -preset "$ffmpeg_preset" -movflags faststart -threads 2 -nostdin -loglevel quiet -stats "$converted_dir/$NAME.mkv"
if ! /usr/bin/ffmpeg -y -i "$convert_dir/$FILE" -map 0 $exclude_stream -c:v "$video_library" -c:a "$audio_codec" -preset "$ffmpeg_preset" -max_muxing_queue_size 1024 -movflags faststart -threads 2 -nostdin $ffmpeg_verbose -stats "$converted_dir/$NAME.mkv"
then
printf "$ffmpeg_error"
exit 0
Expand Down Expand Up @@ -737,7 +750,7 @@ case "$command" in
func_config
;;
encode)
while getopts ":a:l:p:r:v:" opt; do
while getopts ":a:l:p:r:v-:" opt; do
case $opt in
a)
check_variable audio ${OPTARG,,}
Expand Down Expand Up @@ -787,6 +800,13 @@ case "$command" in
exit 0
fi
;;
-)
case ${OPTARG} in
"verbose"*)
verbose="true"
;;
esac
;;
\?)
echo "Invalid option: -$OPTARG." >&2
exit 1
Expand All @@ -799,7 +819,7 @@ case "$command" in
done
if [ $OPTIND -eq 1 ]
then
printf "\\e[39mUsage:\\n plexus encode -l /path/to/list.txt [flags]\\n\\nFlags:\\n -a Audio codec. Default = $audio_codec\\n -l List location. Default = $list_file\\n -p FFMpeg preset. Default = $ffmpeg_preset\\n -r RClone remote. Use this for RClone integration\\n -v Video codec. Default = $video_codec\\n"
printf "\\e[39mUsage:\\n plexus encode -l /path/to/list.txt [flags]\\n\\nFlags:\\n -a Audio codec. Default = $audio_codec\\n -l List location. Default = $list_file\\n -p FFMpeg preset. Default = $ffmpeg_preset\\n -r RClone remote. Use this for RClone integration\\n -v Video codec. Default = $video_codec\\n --verbose Show detailed log\\n"
exit 0
fi
if [ ! -z "$list_file" ]
Expand Down

0 comments on commit b34f467

Please sign in to comment.