LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-07-2004, 03:25 AM   #1
bendeco13
Member
 
Registered: Oct 2004
Distribution: Fedora 7
Posts: 232

Rep: Reputation: 30
ffmpeg loop


When I use this code:

Code:
find "$DIR" -name "*.wav" | while read list ; do
   echo "$list"
   ffmpeg -y -hq -i "$list" "${list%%.*}.ra"
done
it only does the first file and not all the .wav files like it should....
This same code used with lame works fine for all files....
e.g.
Code:
find "$DIR" -name "*.wav" | while read list; do
   echo "$list"
   lame -b $BITRATE -h -t "$list" "${list%%.*}.mp3"
done
So this must be a problem with the way I setup the options/etc.. for ffmpeg.
I'm clueless....

Anyone know how to fix this?

Thanks in advance
 
Old 11-07-2004, 11:53 PM   #2
bendeco13
Member
 
Registered: Oct 2004
Distribution: Fedora 7
Posts: 232

Original Poster
Rep: Reputation: 30
Ok.....
I fixed the problem...
for some reason ffmpeg is reading from standard input, which is
killing off the rest of the output from find.
I found this from here

So I had to add </dev/null to the end of the ffmpeg command...
My script now looks like this:
Code:
find "$DIR" -name "*.wav" | while read list ; do
   echo "$list"
   ffmpeg -y -hq -i "$list" "${list%%.*}.ra" </dev/null
done
All works well
Cheers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg installation !! Ashdown Linux - Software 3 11-14-2005 10:38 AM
Ask : ffmpeg and MPlayer imamwib Linux - Software 0 10-21-2005 08:11 PM
ffmpeg Polanski Linux - Software 0 07-25-2005 11:05 PM
ffmpeg RySk8er30 Linux - Software 3 06-25-2005 12:10 PM
which files do I need for ffmpeg? akihandyman Linux - Software 1 12-02-2003 09:12 AM


All times are GMT -5. The time now is 03:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration