This patch fixes two things:
- in case of subtitles, check_recording_time() is comparing the current
PTS to the recording time (-t option, set to INT_MAX by default), so
the -ss option needs to be taken into account. It is not required in
do_{audio,video}_out() because this adjustment is set while polling
the filtergraph (see poll_filters()).
- It also adjusts the PTS sent to the encoder (and later transmitted to
the muxer) so the TS in the output make sense and are not kept
verbatim.
Note: this only works for muxers honoring the PTS, such as
lavf/matroskaenc. But for other such as the ASS muxer which just does a
verbatim copy, or the SubRip muxer which doesn't write the TS in some
cases, it will not work yet.
This ensures its not used afterwards.
This commit should not change anything as it should not have been used afterwards.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Filters can change the timings, so input files must not
necessarily be read at the same rythm. This patch select
the input file to read based on the timestamp at output
instead of input. With complex filter graphs, finding the
input for a given output is done by making a request and
checking to what buffer source it has been forwarded.
Reap buffers stored in the buffer sinks even when
the avfilter_graph_request_oldest() loop only returns EOF.
avfilter_graph_request_oldest() can cause frames to arrive
to the sinks even when it returns EOF.
This reverts commit 744bd8d08c.
pkt_timebase is now set by av_codec_set_pkt_timebase.
If some demuxer set AVStream.time_base directly,
it need to be fixed. There is a warning to detect it.
Allows to disable interaction from standard input.
Useful, for example, if ffmpeg is in the background process group.
Roughly the same result can be achieved with "ffmpeg ... < /dev/null"
but it requires a shell.
Fixes Ticket1432
Thanks-to: Mike Scheutzow <mike.scheutzow@alcatel-lucent.com> for some of the bug analysis
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is based on libav's implementation and
makes sure to compare output timestamps together.
It also reduces the differences with avconv.
The changes to the test reference files are caused
by an additional packet at the end, the timestamp
of the frame encoded by this packet is always
strictly below the limit stated by the -t option.
Using -t on an input already have surprising results.
Furthermore, using it on an input or an output makes
a real difference if there are speed-altering filters.
Implementing -t for inputs will probably result in some
behavour changes.
Deprecate functions:
avfilter_fill_frame_from_buffer_ref
avfilter_fill_frame_from_audio_buffer_ref
avfilter_fill_frame_from_video_buffer_ref
and schedule to drop them at the next API major bump.
The function avfilter_copy_buf_props() should be used instead.
With complex filters, an output can come from any input,
or several inputs, including inputs of a different type.
Copying the codec parameters from the first input with
the same type does not make any sense.
This does not change anything for simple 1->1 filters,
as source_index is set in that case.
This message is printed whenever the RAWVIDEO codec is used, whether the
output file contains any frames or not. Test command:
./ffmpeg -i infile.y4m outfile.y4m
Signed-off-by: Mike Scheutzow <mjs973@optonline.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>