Re: do shell script quoting help
Re: do shell script quoting help
- Subject: Re: do shell script quoting help
- From: Terry Barnum <email@hidden>
- Date: Tue, 09 Sep 2014 15:26:26 -0700
On Sep 8, 2014, at 5:40 PM, sphil <email@hidden> wrote:
> The problem looks like the variables 'TCR' and 'white' etc are being stripped of the single quotes (at least judging by the error output your provided).
>
> Assuming they're supposed to be single-quoted, try replacing the command 'quoted form of' with the manual escape sequence ('quoted form of' is notorious for causing trouble), and see if that helps.
>
> Example: instead of
>
> set myText to quoted form of "text='TCR ':"
>
> write the lines like this:
>
> set myText to "text=\\'TCR\\':"
Thank you Phil! Escaping the single quotes solved it.
-Terry
>
>
> Phil
>
>
>
>
>
> On 9 Sep 2014, at 05:35, Terry Barnum <email@hidden> wrote:
>
>>
>> On Sep 8, 2014, at 8:02 AM, sphil <email@hidden> wrote:
>>
>>> On 4 Sep 2014, at 02:58, Terry Barnum <email@hidden> wrote:
>>>
>>>> fmpeg -i /Users/macuser/Desktop/source.mov -threads 0 -s 640x360 -pix_fmt yuv420p -vcodec libx264 -b:v 500k -acodec libfaac -b:a 128k -vf drawtext="fontsize=15:fontfile=/Library/Fonts/Verdana.ttf:timecode='01\:00\:00\:00':rate=23.976:text='TCR ':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=30:y=30" -y /Users/macuser/Desktop/out.mp4
>>>
>>>
>>> This version compiles for me in the AS editor (aside from the 'quoted form' expression, I've added a few escapes, here and there):
>>>
>>> set q to quoted form of "fmpeg -i /Users/macuser/Desktop/source.mov -threads 0 -s 640x360 -pix_fmt yuv420p -vcodec libx264 -b:v 500k -acodec libfaac -b:a 128k -vf drawtext=\"fontsize=15:fontfile=/Library/Fonts/Verdana.ttf:timecode='01\\:00\\:00\\:00':rate=23.976:text='TCR ':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=30:y=30\" -y /Users/macuser/Desktop/out.mp4"
>>>
>>> Whether it works and does what you want it to, I'll have to leave that for you to test. :)
>>
>> Thanks for the suggestion Phil. Unfortunately this doesn't work. I too can make the AS compiler happy but the resulting string that do shell script passes still makes ffmpeg unhappy. I'll keep poking away at it.
>>
>> Thanks,
>> -Terry
>>
>>
>>> Best
>>>
>>> Phil
>>> http://applehelpwriter.com
>>> http://sqwarq.com - apps for OS X & iOS
>>>
>>>
>>> If you wish to send me encrypted mail, search for my public key in GPGSuite https://gpgtools.org
>>>
>>>
>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> applescriptobjc-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden