Hi Keean,
Keean Schupke wrote:
[...]
> If I write a separate program, how would my CGI scripts tell it which
> clips to play next?
I do not know... There are a lot of possible solutions: for example,
you can implement some kind of playlist functionalities, or you can
make your program controllable through a socket or a pipe, or you can
design your program to play all the files that it can find in a
specified directory (removing a file after playing it, and checking
for new files every time a file is eneded), ...
> ffmpeg can generate a stream from a jpeg, so thats the logo sorted. I
> then need some way of telling a running ffmpeg to switch to playing a
> clip file instead of the jpeg...
The easiest way to address this problem could be the following: look
at the "for(; received_sigterm == 0;) {" loop inside av_encode().
Such loop contains an "if (file_index < 0) {" condition to exit when
no input files are available. You can modify it, removing the "break;"
statement and using your jpeg picture as an input frame.
Of course you will have to modify the timestamps computations a little
bit (to allow "chaining" different files one after the other, and to
insert your frames coming from the jpeg file).
> When you give ffmpeg a list of files to join together:
>
> ffmpeg -i video1.avi -i video2.avi -i video3.avi
>
> It must store a list of files to read in an internal list.
A word of warning here: ffmpeg reads all the input files
simultaneously; if I understand well you want to read them sequentially
(one at time). So, you might want to insert some code in the
"if (file_index < 0) {" to check for the next file to read.
> If I would
> write say a simple socket remote control interface, so that you could
> give it commands like:
>
> PLAY video1.avi
>
> and have that append to the list of files to play, then that would be
> half the problem solved...
Yes, this could be a solution.
Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user