My guess is that ffmpeg is reading two bytes from stdin. If you are using, or can use, kshell, then you can avoid that with code like this:
The while reads from the file descriptor opened by the exec statement and assigned to fd and thus isn't affected by what anything in the loop might read from stdin.
If you need to, or would rather use bash, then you'll have to specifically pick a file descriptor to use:
And, from my small bit of testing, you have to supply a hard number on the exec when using bash, this seems not to work: exec $fd<data-file
---------- Post updated at 13:04 ---------- Previous update was at 12:58 ----------
Kludgy, but this would work allowing the variable contents to be used when opening:
Need help on making a loop script base on what is inside a file...
File to read: List.txt
List.txt contains below w/c are file name as well:
SAMPLEa
SAMPLEb
SAMPLEc
SAMPLEd
SAMPLEe
SAMPLEf
.
.
.
Want to make a loop that will manipulate those that are inside the file.txt w/c are... (3 Replies)
Hi Friends ,
Sorry if this is a repeated question ,
The input file contains 5 lines , so the the values of the variables i and count should b
i=5;
count=15
but the variables are not updating , the value of variables showing i=0 and count =0 only.:mad:
can any1 help me please. (11 Replies)
Hi,
I am building a script to grep for a string in all the files from a folder and display the results.
I am reading the files one by one by placing the names in other file using while loop
my code is as below
while read inp
do
chk=`grep -c "$str" $pth/$inp`
... (2 Replies)
Hi Guys
I am new to scripting.Please forgive for asking basic questions.
I want to write a script to check whether the logs are getting updated in last 15 mins.
cat server
192.168.1.6
192.168.1.7
cat list
192.168.1.7 /logs/logpath1
192.168.1.7 /logs/logpath2
192.168.1.6... (4 Replies)
Hi,
I am on HP-UX and K shell.
When I am using while/for loop for reading a file. It is working fine but not reading tabs:
Suppose, if the line is: ; ;COMP; ; ; ;
then loop is reading as
; ;COMP; ;... (5 Replies)
Hi All,
I need small help on for loop syntax in C shell.
How can we read the values from a file (line by line) through C shell loop.
For Ex:
$Cat file1
data1
data2
data3
data4
$
I have to print those values in a variable and have to perform some steps...
Can anyone help on... (2 Replies)
Hi,
I am writing in a file through cat command. This file will contain the path of file along with filename. e.g. /home/user/folder1/folder2/filename.txt
There might be very large number of this path in same file like say 140
when I try to run while command:
while read -r file
do
//command... (8 Replies)
Hello,
I have a problem with Greek subtitle font size when I map a subtitle file into a video in ffmpeg.
I ran below code:
ffmpeg -i video.mp4 -sub_charenc CP1253 -i video_sub.srt -c:v copy -c:a copy \
-c:s mov_text -metadata:s:s:0 language=gr mapped_video.mp4
When I play it in VLC,... (2 Replies)
Hello All,
I have two files with me file1.txt and file2.txt
file1.txt has:
333
222
111
file2.txt has
ccc
bbb
aaa
ccc is related to 333 only, bbb is related to 222 only and aaa is related to 111 only.
I have to get the values from each of the file and pass them in the URL... (3 Replies)
Hello, I was inquiring myself if it's possible to call ffmpeg in loop, an in each iteration, ffmpeg will pick one of the files in a directory and produce a new with a slightest different name. Can be as simple as a '*' in the beginning of the file name.
I know how to use ffmpeg to do the... (2 Replies)
Discussion started by: colt
2 Replies
LEARN ABOUT DEBIAN
pfsoutffmpeg
pfsoutffmpeg(1) General Commands Manual pfsoutffmpeg(1)NAME
pfsoutffmpeg - Read pfs frames from stdin and forward them to ffmpeg program
SYNOPSIS
pfsoutffmpeg [--help] <ffmpeg options> output_file
DESCRIPTION
This command is a wrapper for ffmpeg program and can be used to write pfs frames to a compressed video.
Check the examples section to for sample usage and see manual of ffmpeg for further information.
Note that the usage of '-f' switch (input format specifier) and '-i' switch (input file specifier) of the ffmpeg program is implemented
inside the script and is therefore not allowed.
EXAMPLES
pfsinrgbe frame%04d.hdr --frames 100:2:200 | pfstmo_reinhard02 -s
| pfsgamma -g 1.7 | pfsoutffmpeg -qscale 4 test.avi
1. Read HDR frames in RGBE format with the following names:
frame0100.hdr, frame0102.hdr, frame0104.hdr,... frame0200.hdr
2. Apply local tone mapping operator to each frame (Reinhard2002
model, part of the PFSTMO package)
3. Apply gamma correction to each tone mapped frame
4. Compress frames to test.avi animation
SEE ALSO ffmpeg(1)pfsin(1)pfstmo_reinhard02(1)pfsgamma(1)BUGS
Frames smaller than 512x384 can cause broken pipe error, due to bug in ppm pipe reading routine in ffmpeg.
Please report bugs and comments to Rafal Mantiuk <mantiuk@mpi-sb.mpg.de> or Grzegorz Krawczyk <krawczyk@mpi-sb.mpg.de>.
pfsoutffmpeg(1)