LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-04-2013, 10:13 PM   #1
NetBot
LQ Newbie
 
Registered: Nov 2013
Posts: 13

Rep: Reputation: 0
Why doesn't mencoder have the ability to check for existing file


hello lq readers

Ffmpeg has file overwrite protection and mencoder doesn't. Does mencoder have an option to do this. If not, is there a way to make mencoder check if a file exists before overwriting the file?

I know the if [ -f file ] thing but how do I make this info useful to mencoder.
thx

Last edited by NetBot; 11-04-2013 at 10:25 PM.
 
Old 11-05-2013, 01:39 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by NetBot View Post
Does mencoder have an option to do this.
That should show from the manual 'man mencoder' or else see its mailing list or bug tracker, somebody may have opened a ticket for or mailed about it.


Quote:
Originally Posted by NetBot View Post
(..) is there a way to make mencoder check if a file exists before overwriting the file?
You could (have somebody) write and submit a patch to fix that.
 
Old 11-05-2013, 03:02 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by NetBot View Post
Ffmpeg has file overwrite protection and mencoder doesn't. Does mencoder have an option to do this.
Nope. mencoder follows the Unix/Linux "you should know what you are doing" philosophy and not MS's "are you sure? are you really sure??" philosophy.

However, mencoder can use a default output file name. This from the manual page:
Quote:
EXAMPLE MENCODER CONFIGURATION FILE:
# Make MEncoder output to a default filename.
o=encoded.avi
Have a look at the CONFIGURATION FILES section.

BTW: As a general rule: Don't use the same name for input and output.
 
1 members found this post helpful.
Old 11-06-2013, 06:49 PM   #4
NetBot
LQ Newbie
 
Registered: Nov 2013
Posts: 13

Original Poster
Rep: Reputation: 0
Thank you UnSpawn and druuna.
 
Old 11-08-2013, 08:16 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
How about this? Those are two vertical bar symbols in the command - you don't want to pipe the output of test to mencoder (what a single verticle bar would do), rather you want the OR operator (what two verticle bars mean)

Code:
test -e filename || mencoder blah blah blah
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
check existing process ust Linux - Newbie 3 06-22-2012 02:29 AM
Mencoder adds the extension of the original file to the output file ex: file.flv.mp4 linuxlicious Linux - General 2 04-17-2012 02:22 PM
Mencoder adds the extension of the original file to the output file ex: file.flv.mp4 linuxlicious Linux - General 1 04-15-2012 04:07 AM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration