Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th October 2010, 17:49   #1  |  Link
Klagar
Registered User
 
Klagar's Avatar
 
Join Date: Sep 2010
Posts: 46
Concatenating 2 passes in FFmpeg : OS dependency

Hi !

Just a quick question because at the moment I don't have the material to test it out myself...

I learned that it is possible, in FFmpeg, to run many encodings in a single command line. Example taken from this site :
ffmpeg -i fluid8.mov -y out1.mp4 && ffmpeg -i fluid8.mov -y out2.avi && ffmpeg -i fluid8.mov -y out3.flv && ffmpeg -i fluid8.mov -y out4.mov

So the "&&" separator does that. Now my question is : will it work the same on any OS, or is it a Windows-only syntax ?

Regards.
Klagar is offline   Reply With Quote
Old 14th October 2010, 18:12   #2  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
"&&" is the same on Unix/Linux. The following command is only run when the previous command ends successfully (returns a zero exit code). If you want all the commands to run one after another regardless of their exit status, use "&" with cmd.exe and ";" on Unix/Linux (where "&" would make the previous command run in background).
nm is offline   Reply With Quote
Old 14th October 2010, 18:50   #3  |  Link
Klagar
Registered User
 
Klagar's Avatar
 
Join Date: Sep 2010
Posts: 46
Great ! Thanks a lot !
Klagar is offline   Reply With Quote
Old 14th October 2010, 20:57   #4  |  Link
Reimar
Registered User
 
Join Date: Jun 2005
Posts: 278
Quote:
Originally Posted by nm View Post
"&&" is the same on Unix/Linux. The following command is only run when the previous command ends successfully (returns a zero exit code). If you want all the commands to run one after another regardless of their exit status, use "&" with cmd.exe and ";" on Unix/Linux (where "&" would make the previous command run in background).
I feel pedantic: it only depends on the shell, not the OS. So if you want to make sure you have the same behaviour, use e.g. bash (e.g. from MinGW or Cygwin) on Windows. Even the Powershell seems to use ";" to separate commands, however the & seems to be misused for something else (though possibly only at a start of a command).
Reimar is offline   Reply With Quote
Reply

Tags
ffmpeg, linux, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.