1,000 previews of 15 secs...

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
nanohtpc
Posts: 9
Joined: Mon Jun 26, 2017 4:04 am

1,000 previews of 15 secs...

Post by nanohtpc »

Description of problem or question
hi guyz, i need a little help
i need to make a 1,000+ previews of 15sec each of all my videos.
could you put examples how to do it.? TIA!!

Steps to reproduce the problem (If Applicable)
so far i was doing it one file at a time but takes to long.

HandBrake version (e.g., 1.0.0)
1.0.7

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.3 High Sierra, Windows 10 Creators Update)
Win 10

Error message text or screenshot (If Applicable)
no errors.

Provide a URL from any image hosting site.
no image

HandBrake Activity Log ***required*** (see How-to get an activity log)
its a request, no activity log yet

Use any pastebin website and provide the URL it generates
- or -

Code: Select all

Paste log text between these markers.
[code][/i]
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: 1,000 previews of 15 secs...

Post by mduell »

for i in *.* ;
do HandBrakeCLI -i "$i" -o "new/$i" --stop-at duration:10
nanohtpc
Posts: 9
Joined: Mon Jun 26, 2017 4:04 am

Re: 1,000 previews of 15 secs...

Post by nanohtpc »

welll seems to work for one file, but how can i make it a batch??? for all the content in one folder...?
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: 1,000 previews of 15 secs...

Post by Woodstock »

The for i in *.*; part of the example is what causes it to loop for all files found in the directory you're running the script in. That part is dependent upon which shell language you're using.

Are you using CMD.EXE or PowerShell?
nanohtpc
Posts: 9
Joined: Mon Jun 26, 2017 4:04 am

Re: 1,000 previews of 15 secs...

Post by nanohtpc »

well for now im triying CMD....

cant beleive it want a batch for this already...
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: 1,000 previews of 15 secs...

Post by Woodstock »

https://www.microsoft.com/resources/doc ... x?mfr=true

On the page for the "for" loop, there is a section on "variable modifiers" that you will be interested in, particular things like "%~nI", which is the file name without the extension, for when you're changing the file type during the encode.
nanohtpc
Posts: 9
Joined: Mon Jun 26, 2017 4:04 am

Re: 1,000 previews of 15 secs...

Post by nanohtpc »

thnks will check later....
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: 1,000 previews of 15 secs...

Post by Woodstock »

Gee, should I tell you about putting quotes around the part of the command line where the file names are, to deal with file names with spaces in them, or let you find out what happens on your own? :)
nanohtpc
Posts: 9
Joined: Mon Jun 26, 2017 4:04 am

Re: 1,000 previews of 15 secs...

Post by nanohtpc »

im a little rusty in programming anythings helps....
m.savazzi
Posts: 10
Joined: Mon Apr 25, 2016 10:20 am

Re: 1,000 previews of 15 secs...

Post by m.savazzi »

I'm developing a program can help you :)
will be distributed today or tomorrow
m.savazzi
Posts: 10
Joined: Mon Apr 25, 2016 10:20 am

Re: 1,000 previews of 15 secs...

Post by m.savazzi »

Post Reply