Hi People ,

I trying use a program Called FFMPeg that grab videos directly from my videodevice on linux .

How can i insert in this code a part to when people put the command line "-T" (it's about time) , after he stop ,launch a external shell script bash (linux) that will reside in the same directory ?

I mean , i try to use the program for video capture called , only , he is a GNU program then we have the source .
Very well , i just need when i put the command "-t" , when he finish just lauch another program . (He call a shellbash script resident in same directory with name "starting").

Can someone help ? I really don't know nothing about C or C++ , but i really need fix this to use here .

I think that i can't put code in this channel , someone have this program ?? can someone help ? I send the C source .
It's very easy i think =)

Looking into the code i see this part when i take out the break command compile and try to use he never stop , then i think this is the part that i must insert the lauch code .


}
/* if none, if is finished */
if (file_index < 0)
break;

/* finish if recording time exhausted */

if (recording_time > 0 && min_pts >= recording_time)
break; < -- "Think that the code must be here"

/* read a packet from it and output it in the fifo */

is = input_files[file_index];
if (av_read_packet(is, &pkt) < 0) {
file_table[file_index].eof_reached = 1;
continue;
}
ist_index = file_table[file_index].ist_index + pkt.stream_index;
ist = ist_table[ist_index];
if (ist->discard) {
continue;
}




Thanks anyway for helping .