LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-01-2019, 04:05 AM   #16
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925

Quote:
Originally Posted by Gregg Bell View Post
Thanks, man, but you're wanting me to get the command line version instead of the GUI? Is the cli really easy to use?[/CODE]
No. If you look at my instructions, you are installing two packages in the same apt install line: handbrake-gtk and handbrake-cli. The latter you may never need to use but it gives you more flexibility in the future to have it. You don't need to install handbrake-cli if you don't want to, just handbrake-gtk.
 
1 members found this post helpful.
Old 03-01-2019, 06:27 AM   #17
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
it does not hurt to have both, and the cli I use for batch jobs, if you just got one or two dvd/cds to rip, use the gui one.

If your system is beefy enough you can run two or more of them simultaneously and not see a slow down in anything else you might be doing. But wait that would require more than one cd/dvd reader... my files are already on my hdd.

just CLI info to fill your brain.
Code:
#!/bin/bash

#
# Change this to specify a different handbrake preset. 
# You can list them by running: "HandBrakeCLI --preset-list"
#

cd /media/data1/scripts

if [[ -d "/run/media/userx/3TB-External/HoldMovies" ]] ; 
then
{
#SLackware paths
SRC="/run/media/userx/3TB-External/HoldMovies/subdirectory"
DEST="/run/media/userx/3TB-External/Movies"
mkdir -p "$DEST"
}
else
{
#Peppermint / Mint Linux Paths 
SRC="/media/userx/3TB-External/HoldMovies/subdirectory"
DEST="/media/userx/3TB-External/Movies"
mkdir -p "$DEST"
}
fi

keep_old=/media/data/old_movies
OPTIONS="--loose-anamorphic  --loose-crop"
WIDTH="--maxWidth 420"
DEST_EXT=mp4
HANDBRAKE_CLI=HandBrakeCLI
PRESET="Very Fast 480p30"


####################
######## PATH OVER RIDES #########

SRC=/run/media/userx/2TBInternal/TestQueue
DEST=/run/media/userx/2TBInternal/TestMovies
ORGINALS=/run/media/userx/2TBInternal/orginals
SETSIZEDIR=/run/media/userx/2TBInternal/setsize420
mkdir -p "$SETSIZEDIR"


[[ ! -d "$DEST" ]] && (echo "Not mounted" ; exit)



count="$(find "$SRC" -type f -name "*.*" | wc -l)"
 

for F in "$SRC"/*
do
	echo "$F" 
	wh="$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "$F")"
     
	width=${wh%x*}
	height=${wh#*x}
	
	if [[ "$width" -gt '420' ]] ; then # && [[ "$height" -gt '300' ]] ; then
	{
		filename=$(basename "$F")
		path=${F%*/}
		echo "$path"
		echo
		extension=${filename##*.}
		filename=${filename%.*}
		send_to="$DEST"/"$filename"-"420HB"."$DEST_EXT"
		
		$HANDBRAKE_CLI --preset="$PRESET" -i "$F" -o "$send_to"
		
		mv -vf "$F" "$ORGINALS"
		echo "left: $((--count))"
	
	}
	else
	{
		mv -fv "$F" "$SETSIZEDIR"
		echo "left: $((--count))"
	}
	fi
   
   #if blank it does not move old out of directory. 
   [[ -n "$keep_old" ]] && (mkdir -p "$keep_old" ; mv "$F" "$keep_old")
   
   if [ -x /usr/bin/HandBrakeCLI ] ; then rm -v "$F" ; else echo "no /usr/bin/HandBrakeCLI" ; fi
   echo 
done

Last edited by BW-userx; 03-01-2019 at 06:47 AM.
 
2 members found this post helpful.
Old 03-01-2019, 01:41 PM   #18
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by hydrurga View Post
No. If you look at my instructions, you are installing two packages in the same apt install line: handbrake-gtk and handbrake-cli. The latter you may never need to use but it gives you more flexibility in the future to have it. You don't need to install handbrake-cli if you don't want to, just handbrake-gtk.
My bad, hydrurga. I didn't look at it closely enough. Hey, watching the terminal I saw when I ran the initial command this came up:

Code:
12 packages can be upgraded. Run 'apt list --upgradable' to see them.
And then I ran the
Code:
sudo apt update
command and I saw that handbrake was in there.

Code:
~/Desktop$ sudo apt update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                      
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                               
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                    
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                                                                               
Hit:6 http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu bionic InRelease
Then I ran
Code:
sudo apt install handbrake-gtk handbrake-cli
Then I ran
Code:
sudo apt update
Then I ran
Code:
sudo apt ugrade
And the end result was "all packages are up to date." So it's all good now, right?
 
Old 03-01-2019, 01:56 PM   #19
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by Gregg Bell View Post
My bad, hydrurga. I didn't look at it closely enough. Hey, watching the terminal I saw when I ran the initial command this came up:

Code:
12 packages can be upgraded. Run 'apt list --upgradable' to see them.
And then I ran the
Code:
sudo apt update
command and I saw that handbrake was in there.

Code:
~/Desktop$ sudo apt update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                      
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                               
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                    
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                                                                               
Hit:6 http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu bionic InRelease
Then I ran
Code:
sudo apt install handbrake-gtk handbrake-cli
Then I ran
Code:
sudo apt update
Then I ran
Code:
sudo apt ugrade
And the end result was "all packages are up to date." So it's all good now, right?
Yes, it should be. You didn't need that final update and upgrade (note that you wrote ugrade, not upgrade).

So, give Handbrake a whirl by ripping a DVD and see how you get on.
 
1 members found this post helpful.
Old 03-01-2019, 02:07 PM   #20
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by BW-userx View Post
it does not hurt to have both, and the cli I use for batch jobs, if you just got one or two dvd/cds to rip, use the gui one.

If your system is beefy enough you can run two or more of them simultaneously and not see a slow down in anything else you might be doing. But wait that would require more than one cd/dvd reader... my files are already on my hdd.

just CLI info to fill your brain.
Code:
#!/bin/bash

#
# Change this to specify a different handbrake preset. 
# You can list them by running: "HandBrakeCLI --preset-list"
#

cd /media/data1/scripts

if [[ -d "/run/media/userx/3TB-External/HoldMovies" ]] ; 
then
{
#SLackware paths
SRC="/run/media/userx/3TB-External/HoldMovies/subdirectory"
DEST="/run/media/userx/3TB-External/Movies"
mkdir -p "$DEST"
}
else
{
#Peppermint / Mint Linux Paths 
SRC="/media/userx/3TB-External/HoldMovies/subdirectory"
DEST="/media/userx/3TB-External/Movies"
mkdir -p "$DEST"
}
fi

keep_old=/media/data/old_movies
OPTIONS="--loose-anamorphic  --loose-crop"
WIDTH="--maxWidth 420"
DEST_EXT=mp4
HANDBRAKE_CLI=HandBrakeCLI
PRESET="Very Fast 480p30"


####################
######## PATH OVER RIDES #########

SRC=/run/media/userx/2TBInternal/TestQueue
DEST=/run/media/userx/2TBInternal/TestMovies
ORGINALS=/run/media/userx/2TBInternal/orginals
SETSIZEDIR=/run/media/userx/2TBInternal/setsize420
mkdir -p "$SETSIZEDIR"


[[ ! -d "$DEST" ]] && (echo "Not mounted" ; exit)



count="$(find "$SRC" -type f -name "*.*" | wc -l)"
 

for F in "$SRC"/*
do
	echo "$F" 
	wh="$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "$F")"
     
	width=${wh%x*}
	height=${wh#*x}
	
	if [[ "$width" -gt '420' ]] ; then # && [[ "$height" -gt '300' ]] ; then
	{
		filename=$(basename "$F")
		path=${F%*/}
		echo "$path"
		echo
		extension=${filename##*.}
		filename=${filename%.*}
		send_to="$DEST"/"$filename"-"420HB"."$DEST_EXT"
		
		$HANDBRAKE_CLI --preset="$PRESET" -i "$F" -o "$send_to"
		
		mv -vf "$F" "$ORGINALS"
		echo "left: $((--count))"
	
	}
	else
	{
		mv -fv "$F" "$SETSIZEDIR"
		echo "left: $((--count))"
	}
	fi
   
   #if blank it does not move old out of directory. 
   [[ -n "$keep_old" ]] && (mkdir -p "$keep_old" ; mv "$F" "$keep_old")
   
   if [ -x /usr/bin/HandBrakeCLI ] ; then rm -v "$F" ; else echo "no /usr/bin/HandBrakeCLI" ; fi
   echo 
done
Thanks BW. I have the cli and the gui for BackInTime too. I guess it doesn't hurt to have both.
 
Old 03-01-2019, 02:09 PM   #21
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by hydrurga View Post
Yes, it should be. You didn't need that final update and upgrade (note that you wrote ugrade, not upgrade).

So, give Handbrake a whirl by ripping a DVD and see how you get on.
Ok. Very good. Thank you. (Maybe that was a Freudian slip--"Ughgrade"? LOL)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] MakeMKV pop-up window blocking use Gregg Bell Linux - Software 6 08-16-2016 03:46 AM
[SOLVED] makemkv immediately segfaults on both 14.1 and current (multilib) moesasji Slackware 9 01-12-2015 12:42 PM
[SOLVED] What happened to the MakeMKV Slackbuild? Not found... Z_Tagr Slackware 2 09-24-2011 12:12 AM
how to install MakeMKV in ubuntu 9.10 kumar116 Linux - Software 2 05-31-2010 09:18 AM
New Slackware User who needs guidance and reassurance! ruinedshadow Linux - General 5 03-21-2006 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration