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 » Wed Nov 29, 2017 10:17 pm

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: 6011
Joined: Sat Apr 21, 2007 8:54 pm

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

Post by mduell » Wed Nov 29, 2017 11:19 pm

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 » Fri Dec 01, 2017 6:16 pm

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: 2594
Joined: Tue Aug 27, 2013 6:39 am

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

Post by Woodstock » Fri Dec 01, 2017 6:20 pm

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 » Mon Jan 01, 2018 7:25 am

well for now im triying CMD....

cant beleive it want a batch for this already...

Woodstock
Veteran User
Posts: 2594
Joined: Tue Aug 27, 2013 6:39 am

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

Post by Woodstock » Mon Jan 01, 2018 4:23 pm

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 » Mon Jan 01, 2018 7:54 pm

thnks will check later....

Woodstock
Veteran User
Posts: 2594
Joined: Tue Aug 27, 2013 6:39 am

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

Post by Woodstock » Mon Jan 01, 2018 9:42 pm

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 » Mon Jan 01, 2018 9:49 pm

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 » Wed Jan 03, 2018 10:36 pm

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 » Sun Jan 07, 2018 12:18 pm


Post Reply