| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Currently NULL would be passed for simple filtergraphs, which would
make the filter code extract the graph description from the output
stream when needed. This is unnecessarily convoluted.
|
| |
|
|
|
|
|
| |
Start by moving OutputStream.filtered_frame to it, which really belongs
to the filtergraph rather than the output stream.
|
|
|
|
| |
It will be made private to Encoder in the future.
|
| |
|
|
|
|
|
|
| |
Fix #10327.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove now-obsolete code setting packet durations pre-muxing for CFR
encoded video.
Changes output in the following FATE tests:
* numerous adpcm tests
* ffmpeg-filter_complex_audio
* lavf-asf
* lavf-mkv
* lavf-mkv_attachment
* matroska-encoding-delay
All of these change due to the fact that the output duration is now
the actual input data duration and does not include padding added by
the encoder.
* apng-osample: less wrong packet durations are now passed to the muxer.
They are not entirely correct, because the first frame duration should
be 3 rather than 2. This is caused by the vsync code and should be
addressed later, but this change is a step in the right direction.
* tscc2-mov: last output frame has a duration of 11 rather than 1 - this
corresponds to the duration actually returned by the demuxer.
* film-cvid: video frame durations are now 2 rather than 1 - this
corresponds to durations actually returned by the demuxer and matches
the timestamps.
* mpeg2-ticket6677: durations of some video frames are now 2 rather than
1 - this matches the timestamps.
|
|
|
|
| |
It is no longer used outside of ffmpeg_mux*
|
|
|
|
| |
It is no longer used outside of ffmpeg_mux*
|
|
|
|
| |
It is no longer used outside of ffmpeg_mux*
|
|
|
|
| |
It is no longer used outside of ffmpeg_mux*
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That field was added to store timestamp conversion state for audio
decoding code. Later it started being used by streamcopy as well, but
that use is wrong because, for a given input stream, both decoding and
an arbitrary number of streamcopies may be performed simultaneously.
They would then all overwrite the same state variable.
Store this state in MuxStream instead.
This is the last use of InputStream in of_streamcopy(), so the ist
parameter can now be removed.
|
|
|
|
|
| |
They should always be the same as the input stream parameters, but this
reduces the need to access InputStream in muxing code.
|
|
|
|
|
|
| |
do_streamcopy() is muxing code, so this is a more appropriate place for
this. The last uses of InputStream in it will be removed in following
commits.
|
|
|
|
|
|
|
|
|
|
|
| |
It stores codec parameters of the stream submitted to the muxer, which
may be different from the codec parameters in AVStream due to bitstream
filtering.
This avoids the confusing back and forth synchronisation between the
encoder, bitstream filters, and the muxer, now information flows only in
one direction. It also reduces the need for non-muxing code to access
AVStream.
|
|
|
|
|
|
|
|
|
| |
Reduces access to a deeply nested muxer property
OutputStream.st->codecpar->codec_type for this fundamental and immutable
stream property.
Besides making the code shorter, this will allow making the AVStream
(OutputStream.st) private to the muxer in the future.
|
|
|
|
| |
It is no longer used outside of this file.
|
|
|
|
|
|
|
|
|
|
| |
Current code in print_final_stats(), printing the final summary such as
video:8851kB audio:548kB subtitle:0kB other streams:0kB global headers:20kB muxing overhead: 0.559521%
was written with a single output file in mind and makes very little
sense otherwise.
Print this information in mux_final_stats() instead, one line per output
file. Use the correct filesize, if available.
|
| |
|
| |
|
|
|
|
| |
This is a more appropriate place for this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is currently done in two places:
* at the end of print_final_stats(), which merely prints a warning if
the total size of all written packets is zero
* at the end of transcode() (under a misleading historical 'close each
encoder' comment), which instead checks the packet count to implement
-abort_on empty_output[_stream]
Consolidate both of these blocks into a single function called from
of_write_trailer(), which is a more appropriate place for this. Also,
return an error code rather than exit immediately, which ensures all
output files are properly closed.
|
|
|
|
|
|
|
|
| |
Properly pass muxing return codes through the call stack instead.
Slightly changes behavior in case of errors:
* the output IO stream is closed even if writing the trailer returns an
error, which should be more correct
* all files get properly closed with -xerror, even if one of them fails
|
|
|
|
|
| |
It is audio/video encoding-only and does not need to be visible outside
of ffmpeg_enc.c
|
|
|
|
|
| |
Start by moving OutputStream.last_frame to it. In the future it will
hold other encoder-internal state.
|
|
|
|
|
| |
They are always properly set now. Avoid a separate timebase-setting
call, which duplicates the knowledge of the timebase being used.
|
|
|
|
|
|
|
| |
Individual streams should be terminated in the former case, the whole
muxing process in the latter.
Reported-by: Gyan Doshi
|
|
|
|
|
|
| |
Analogous to -enc_stats*, but happens right before muxing. Useful
because bitstream filters and the sync queue can modify packets after
encoding and before muxing. Also has access to the muxing timebase.
|
|
|
|
| |
Useful to keep track of what timebase the packet's timestamps are in.
|
|
|
|
|
| |
Use it for logging. This makes log messages related to this output
stream more consistent.
|
|
|
|
|
| |
Use it for logging. This makes log messages related to this output file
more consistent.
|
|
|
|
|
|
|
| |
Similar to -vstats, but more flexible:
- works for audio as well as video
- frame and/or packet information
- user-specifiable format
|
|
|
|
|
| |
It is not needed after the spec is parsed. Also avoids ugly string
comparisons for each video frame.
|
|
|
|
| |
Allows to remove the ugly of_get_chapters() wrapper.
|
|
|
|
|
|
| |
There are 8 of them and they are typically used together. Allows to pass
just this struct to forced_kf_apply(), which makes it clear that the
rest of the OutputStream is not accessed there.
|
|
|
|
|
|
|
|
|
| |
Do it in set_dispositions() rather than during stream creation.
Since at this point all other stream information is known, this allows
setting disposition based on metadata, which implements #10015. This
also avoids an extra allocated string in OutputStream that was unused
after of_open().
|
|
|
|
| |
It no longer needs to be visible outside of the muxing code.
|
| |
|
|
|
|
|
| |
They are private to the muxer and do not need to be visible outside of
it.
|
|
|
|
|
| |
It is private to the muxer and does not need to be visible outside of
it.
|
|
|
|
|
|
|
|
| |
This is now possible since OutputStream is a child of OutputFile and the
code allocating it can access MuxStream. Avoids the overhead and extra
complexity of allocating two objects instead of one.
Similar to what was previously done for OutputFile/Muxer.
|
|
|
|
|
| |
Output streams are now children of OutputFile, so it makes more sense to
free them there.
|
|
|
|
|
|
|
| |
Replace it with an array of streams in each OutputFile. This is a more
accurate reflection of the actual relationship between OutputStream and
OutputFile. This is easier to handle and will allow further
simplifications in future commits.
|
|
|
|
|
| |
Bitstream filtering is done as a part of muxing, so this is the more
proper place for this.
|
|
|
|
|
| |
It is internal to ffmpeg_mux* and does not need to be visible to other
code.
|
|
|
|
| |
mux_free() is no longer called from anywhere else.
|
|
|
|
|
| |
A separate muxer init is no longer necessary, now that of_open() has
access to Muxer.
|
|
|
|
| |
This is now possible since setup_sync_queues() can interact with Muxer.
|
|
|
|
|
|
|
|
| |
This is now possible since the code allocating OutputFile can see
sizeof(Muxer). Avoids the overhead and extra complexity of allocating
two objects instead of one.
Similar to what is done e.g. for AVStream/FFStream in lavf.
|
|
|
|
| |
This will allow ffmpeg_mux_init.c to work with these structs.
|