<div dir="ltr">Ok.<div>But I'm new in ffmpeg. can you tell me where the first encoder </div><div>is initialised in the transcodig.c example please?</div><div>Thank you a lot.</div><div><br></div><div>Regards </div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 23 janv. 2019 à 23:28, Carl Eugen Hoyos <<a href="mailto:ceffmpeg@gmail.com">ceffmpeg@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2019-01-23 15:56 GMT+01:00, NDJORE BORIS <<a href="mailto:ndjoreboris@gmail.com" target="_blank">ndjoreboris@gmail.com</a>>:<br>
<br>
> I want to encode two times my input video file while decoding it juste one<br>
> time.<br>
> I use doc/examples/transcoding.c<br>
> <<a href="https://ffmpeg.org/doxygen/trunk/doc_2examples_2transcoding_8c-example.html" rel="noreferrer" target="_blank">https://ffmpeg.org/doxygen/trunk/doc_2examples_2transcoding_8c-example.html</a>><br>
> What I want to do is to decode and encode like the transcoding.c examples<br>
> does.<br>
> Then, when I finished the decoding and encoding loop (while(1)).<br>
> I want to call only the encoding function again in an other loop to encode<br>
> a second time without<br>
> decoding.<br>
> Ex:<br>
> First time :<br>
> while(1)<br>
> {<br>
>        if (there is a frame in the input file)<br>
>         {<br>
>               decode input video;<br>
>               encode output file;<br>
>               next streamindex;<br>
>          }<br>
><br>
> }<br>
><br>
> Second time :<br>
> while(1)<br>
> {       encode another outputfile;<br>
> }<br>
><br>
> What I want to know, is if it's possible to do that (decode only one time<br>
> an input file in a whille loop and encode it two times).<br>
> If yes, can you tell me how to do it ?<br>
<br>
You can create a second encoder and call it with every decoded frame<br>
parallel to the first encode.<br>
<br>
If you want to encode sequentially this should also be possible but<br>
please calculate first if the memory requirements are acceptable<br>
for you - you need memory for all uncompressed frames, not<br>
compressed as they are on your harddisk.<br>
<br>
Carl Eugen<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div>