Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 27 May 2018, 06:27
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Script for batch converting .mkv files with ffmpeg
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
ally


Joined: 19 May 2012
Posts: 1817
Location: lincoln, uk

PostPosted: Mon 02 Apr 2018, 09:26    Post subject:  Script for batch converting .mkv files with ffmpeg
Subject description: How to move the original source file to another folder?
 

hi

I am batch converting .mkv files using ffmpeg

I have 2 drives, one with the raw files the second is the target drive

all is well apart from I need to move the original source file to another folder on the same drive

Code:

#!/bin/bash
for i in *.mkv;
do
   ffmpeg -i "$i" -c:v libx264 -preset medium -crf 15 -c:a copy /media/dvdrip_2/Film/conv_"$i"
   mv "$i" /media/dvdrip_1/Converted/"$i"
done


the mv line fails, can somebody help

Smile
Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1520
Location: Japan

PostPosted: Tue 03 Apr 2018, 21:08    Post subject:  

No error message?
Back to top
View user's profile Send private message 
ally


Joined: 19 May 2012
Posts: 1817
Location: lincoln, uk

PostPosted: Wed 04 Apr 2018, 05:57    Post subject:  

no

it's not a big deal as I am doing it manually, just curious

I thought maybe I had the syntax wrong

Smile
Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1520
Location: Japan

PostPosted: Wed 04 Apr 2018, 07:33    Post subject:  

What then do you mean by "mv line fails"? Are you saying that the files are not moved at all? That would be odd. Run mv in verbose mode (mv -v). You should get a message of what has been done. Syntax looks OK.
Back to top
View user's profile Send private message 
muggins

Joined: 20 Jan 2006
Posts: 6747
Location: hobart

PostPosted: Wed 04 Apr 2018, 07:53    Post subject:  

Ally,

I don't know if I've been using the wrong commandline options with ffmpeg, but have always been unhappy with the quality of the transcoded video. No such problems with handbrake-CLI, Just google & there are plenty of examples of batch processing with handbrake-CLI.
Back to top
View user's profile Send private message 
ally


Joined: 19 May 2012
Posts: 1817
Location: lincoln, uk

PostPosted: Wed 04 Apr 2018, 08:58    Post subject:  

thanks both

yes, the file failed to move

I will try the verbose on the next batch

the above script reduces the file size about 30%, am happy with the quality, I had to junk 500 rips because the output was poor, only a months work...

Smile
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1053s ][ Queries: 11 (0.0762s) ][ GZIP on ]