
Recherche avancée
Autres articles (31)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (5660)
-
FFmpeg 5 C api codec : how many times will EOF be returned by the receiving end ?
3 février 2024, par Guanyuming HeEdit : I may have written my questions unclearly at first, so I rewrote them. Sorry if you had found my questions confusing.


I'm new to FFmpeg api programming (I'm using version 5.1) and am learning from the documentation and official examples.


In the documentation page about send/receive encoding and decoding API overview, end of stream situation is discussed briefly :




End of stream situations. These require "flushing" (aka draining) the codec, as the codec might buffer multiple frames or packets internally for performance or out of necessity (consider B-frames). This is handled as follows :






Instead of valid input, send
NULL
to theavcodec_send_packet()
(decoding) oravcodec_send_frame()
(encoding) functions. This will enter draining mode.
Callavcodec_receive_frame()
(decoding)
oravcodec_receive_packet()
(encoding) in a loop untilAVERROR_EOF
is returned. The functions will not returnAVERROR(EAGAIN)
, unless you forgot to enter draining mode.
Before decoding can be resumed again, the codec has to be reset withavcodec_flush_buffers()
.



As I understand it, when I get
AVERROR_EOF
, I have reached a special point where I need to drain buffered data from the codec and finally reset the codec withavcodec_flush_buffers()
. Without doing it, I cannot continue decoding/encoding.

Is my understanding correct ?


If so, then I have some questions :


- 

- How many times at most can EOF be returned by the receiving end during one complete process, for example, decoding ?
- If the answer to the first question is infinity, then : If I received an EOF from the receiving end when I already finished sending data (e.g. when after EOF is returned by
av_read_frame()
), how should I tell if it's really finished ? Here there is no return code only for indicating if the receiving is finished. - The data returned from the
receive_...
functions during draining, should I take them as valid ?








I might have found answers to those in the official examples, but I'm not sure if the answer is universally true. I noticed that in some official examples, like in transcode_aac.c, draining is only done for the first EOF reached, and then after the second one is received, it is regarded that there are really nothing left. Any data received during draining is also written to the final output.


Am I correct on interpreting the example ? If so, can I say that the answer to question 1 is once, and the answer to question 3 is yes ?


I appreciate your response and time in advance. :)


-
mp4 video file with gps location
4 mars 2017, par Charles ChayI had a understanding that there is no official support to insert gps location metadata into .mp4 files. However, I see a gps location metadata inserted into the video file while I was using my Sony Z2 with geotagging on. ffmpeg was able to detect the metadata after exporting the same file to my laptop. Anyone knows if there a new interface method or api declared for such purpose in andriod ndk ?
-
How to transcode video in android in multiple formats [on hold]
25 novembre 2016, par adilyousufI am new to android development. I am working on Video Converter(Transcoder), I applied different api (MediaCodec,FFMPEG) But I didn’t understand what to do.
I didn’t get any special help from android official website and also i didn’t get complete help from google. I also used projects from github but they are very difficult(error) or out of understanding, If someone has work on project like this please tell me what should I learn and do