FORUMS: list search recent posts

script error

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Peter Robertson
script error
on Jul 3, 2013 at 3:19:45 pm

I was able to make a script a few months ago with the generous help of this forum but now it has stopped working. When I try to run:

#!/bin/sh

for (( i=0; i<97; i+=30 ))

do ffmpeg -ss $i -t 10 -acodec copy -vcodec copy -i movie.mp4 index_$i.mov

done

I get the error:


./IndexVidBash.sh: line 1: {rtf1ansiansicpg1252cocoartf1187cocoasubrtf390: command not found
./IndexVidBash.sh: line 2: syntax error near unexpected token `}'
./IndexVidBash.sh: line 2: `\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;\f1\fnil\fcharset0 LucidaGrande;}'

Any suggestion on how to fix this?

Peter

Pedro


Return to posts index

Peter Robertson
Re: script error
on Jul 3, 2013 at 3:56:33 pm

My bad. The error appears to have been caused by the fact that I was using Text Edit to edit my .sh file--not a good idea. Saving the script with a different editor fixed the problem.

FYI--the syntax for ffmpeg has changed since I used this script. With newer versions of ffmpeg you will need to use

do ffmpeg -ss $i -t 10 -i YUWinter.mp4 -acodec copy -vcodec copy index_$i.mov

the '-acodec copy -vcodec copy' needs to be placed AFTER the output file.



Peter

Pedro


Return to posts index

Lou Logan
Re: script error
on Jul 5, 2013 at 8:57:21 pm

[Peter Robertson] "the '-acodec copy -vcodec copy' needs to be placed AFTER the output file."

Don't you mean "after the *input* file"? Please use the CODE button on your commands and console outputs.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]