You are not logged in.

#1 2013-12-04 23:44:30

z1lt0id
Member
Registered: 2012-09-20
Posts: 168

A watch directory for encoding videos

I was wondering what would be the best way to go about making a watch directory routine in bash.  Essentially i want a bash script to watch a directory and when a file is added it will automatically encode using ffmpeg and x264?  Are there any external utilities to help with this function?

Offline

#2 2013-12-04 23:51:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: A watch directory for encoding videos

Use inotify?

Offline

#3 2013-12-05 00:09:23

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: A watch directory for encoding videos

Indeed. Personally, I use incron, because it's an elegant way of using inotify. smile

Also, I use mencoder instead of ffmpeg, but each to their own.

Offline

#4 2013-12-05 00:10:40

z1lt0id
Member
Registered: 2012-09-20
Posts: 168

Re: A watch directory for encoding videos

I just found mencoder doesn't utilise the cores properly when deinterlacing and piping to x264 smile I got better performance.  I'll look into incron tomk, thank you so much.

Last edited by z1lt0id (2013-12-05 00:15:43)

Offline

#5 2013-12-05 00:11:58

graysky
Member
From: The worse toilet in Scotland
Registered: 2008-12-01
Posts: 8,649
Website

Re: A watch directory for encoding videos

Slightly O/T but do people prefer mencoder to handbrake?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2013-12-05 00:16:41

z1lt0id
Member
Registered: 2012-09-20
Posts: 168

Re: A watch directory for encoding videos

I prefer piping ffmpeg into x264.  I use ffmpeg for filtering and resizing options and push it out to x264.  Handbrake is good though smile

Offline

#7 2013-12-05 00:32:32

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: A watch directory for encoding videos

graysky wrote:

Slightly O/T but do people prefer mencoder to handbrake?

People might, but I don't, simply because handbrake doesn't do what I want.

Offline

Board footer

Powered by FluxBB