summaryrefslogtreecommitdiff
path: root/avconv.c
Commit message (Collapse)AuthorAgeFilesLines
* avconv: Fix the audio next dts computationLuca Barbato2016-11-291-1/+1
| | | | | | Use the correct timebase. CC: libav-stable@libav.org
* avconv: Drop stray leftover debug outputDiego Biurrun2016-11-091-1/+0
|
* lavfi: Always propagate hw_frames_ctx through linksMark Thompson2016-11-021-1/+4
| | | | | | | | | | | | | | | Also adds a new flag to mark filters which are aware of hwframes and will perform this task themselves, and marks all appropriate filters with this flag. This is required to allow software-mapped hardware frames to work, because we need to have the frames context available for any later mapping operation in the filter graph. The output from the filter graph should only propagate further to an encoder if the hardware format actually matches the visible format (mapped frames are valid here and have an hw_frames_ctx, but this should not be given to the encoder as its hardware context).
* avconv: support parsing bitstream filter optionsJames Almer2016-11-021-13/+2
| | | | | | | | | Example usage: avconv -i INPUT -bsf filter[=opt1=val1:opt2=val2] OUTPUT Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avconv: only retry decoding on actual decoding errorsAnton Khirnov2016-10-021-10/+27
| | | | | | | | | Errors during decoding are currently considered non-fatal and do not terminate transcoding, so even if parts of the data are corrupted, the rest may be decodable. However, that should apply only to the actual decoding calls, not to the failures elsewhere (e.g. configuring filters).
* avconv: set the encoding framerate when the output is CFRAnton Khirnov2016-10-021-0/+2
|
* avconv: Make sure that inputless filtergraphs are configuredLuca Barbato2016-08-121-0/+9
| | | | | | Unbreak `avconv -filter_complex testsrc`. Regression introduced in a3a0230a9870b9018dc7415ae5872784d524cfe5
* avconv: Check that muxing_queue exists before reading from itDiego Biurrun2016-07-271-6/+8
| | | | This avoids a segfault on nonexisting codec names.
* avconv: stop using setpts for input framerate forced with -rAnton Khirnov2016-07-221-0/+2
| | | | | The setpts filter does not signal to the rest of the filtergraph that the stream is CFR. Just generate the timestamps manually instead.
* avconv: use avcodec_parameters_copy() with streamcopyAnton Khirnov2016-07-021-52/+12
| | | | | | | | | This preserves all the information in the codec parameters. The wavpack ref changes are caused by the fact that now the sample format is set, so matroskaenc can use it to set the bit depth. Bug-Id: 945, along with the previous commit
* avconv: restructure sending EOF to filtersAnton Khirnov2016-06-281-11/+32
| | | | | | | | | | | Be more careful when an input stream encounters EOF when its filtergraph has not been configured yet. The current code would immediately mark the corresponding output streams as finished, while there may still be buffered frames waiting for frames to appear on other filtergraph inputs. This should fix the random FATE failures for complex filtergraph tests after a3a0230a9870b9018dc7415ae5872784d524cfe5
* avconv: move flushing the queued frames to configure_filtergraph()Anton Khirnov2016-06-281-11/+0
| | | | | This is a more appropriate place for it, and will also be useful in the following commit.
* avconv: pass the hwaccel frames context to the decoderAnton Khirnov2016-06-251-0/+7
|
* avconv: init filtergraphs only after we have a frame on each inputAnton Khirnov2016-06-251-121/+124
| | | | | | | | | This makes sure the actual stream parameters are used, which is important mainly for hardware decoding+filtering cases, which would previously require various weird workarounds to handle the fact that a fake software graph has to be constructed, but never used. This should also improve behaviour in rare cases where avformat_find_stream_info() does not provide accurate information.
* avconv: do packet ts rescaling in write_packet()Anton Khirnov2016-06-251-11/+12
| | | | | This will be useful in the following commit, after which the muxer timebase is not always available when encoding.
* avconv: decouple configuring filtergraphs and setting output parametersAnton Khirnov2016-06-251-0/+3
| | | | | | | | | | Currently, a filtergraph will pull in the output constraints from its corresponding decoder context, which breaks proper layering. Instead, explicitly send the constaints on the output parameters to the filtergraph. This is similar to what is done for filtergraph inputs in 30ab4c51a180610d9f1720c75518d763515c0d9f
* avconv: factor out initializing stream parameters for encodingAnton Khirnov2016-06-251-152/+144
| | | | | | | | | | Setting the filter input parameters is moved to init_input_stream(), so that it is done before the decoder is opened, potentially overwriting the information from avformat_find_stream_info() with less accurate data. This commit temporarily disables QSV transcoding with hw frames. The functionality will be re-added in the following commits.
* avconv: decouple configuring filtergraphs and setting input parametersAnton Khirnov2016-06-251-0/+30
| | | | | | | | | | | | Currently, calling configure_filtergraph() will pull in the input parameters from the corresponding decoder context. This has the following disadvantages: - the decoded frame is a more proper source for this information - a filter accessing decoder data breaks proper layering Add functions for explicitly sending the input stream parameters to a filtergraph input - currently from a frame and a decoder. The decoder one will be dropped in future commits after some more restructuring.
* avconv: buffer the packets written while the muxer is not initializedAnton Khirnov2016-06-251-18/+58
|
* avconv: explicitly postpone writing the header until all streams are initializedAnton Khirnov2016-06-251-34/+63
| | | | | This should have no practical effect for now, but will make a difference in the following commits.
* Use AVFrame.pts instead of deprecated pkt_pts.Anton Khirnov2016-06-211-1/+1
|
* avconv: factor out initializing stream parameters for streamcopyAnton Khirnov2016-06-211-99/+110
|
* avconv: initialize output framerate earlierAnton Khirnov2016-06-211-34/+0
| | | | This will be needed in the following commits.
* avconv: do not set encoder options when streamcopy is usedAnton Khirnov2016-06-211-4/+0
|
* avconv: refactor selecting an encoderAnton Khirnov2016-06-211-11/+0
| | | | | Fail immediately if automatic encoder selection failed. Always set the stream_copy/encoding_needed flags in one place.
* avconv: fix handling attachments in init_output_streamAnton Khirnov2016-06-211-1/+1
| | | | | | The current code assumes that encoding_needed is simply an inverse of stream_copy, which is not true for manually attached files (for which neither of those is true).
* avconv: create simple filtergraphs earlierAnton Khirnov2016-06-211-5/+4
| | | | | | We already have all the necessary information in open_output_file(). This makes the information about the stream/filtergraph mappings available earlier.
* avconv: add a function for determining whether a filtergraph is simpleAnton Khirnov2016-06-211-2/+2
| | | | This makes the code easier to read.
* avconv: Do not copy extradata if source buffer is emptyVittorio Giovara2016-06-061-5/+8
| | | | | | | Fixes clang-usan runtime error "null pointer passed as argument 2, which is declared to never be null" while streamcopying. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avconv: Use more precise deprecation ifdefsDiego Biurrun2016-05-221-3/+3
| | | | This fixes compilation with the libavcodec version bumped to 58.
* avconv: stop using AVStream.codecAnton Khirnov2016-05-221-13/+8
| | | | | | | | It is now only used by the av_parser_change() call during streamcopy, so allocate a special AVCodecContext instance for this case. This instance should go away when the new parser API is finished. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Add some more deprecation guardsDiego Biurrun2016-05-111-0/+2
| | | | Avoids unused function/label/variable warnings after the next version bump.
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-4/+4
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avconv: Drop an unused variableLuca Barbato2016-04-011-1/+0
|
* avconv: fix -frames for videoAnton Khirnov2016-03-301-6/+6
| | | | | | For video, frame_number tracks the number of frames sent to the encoder. So it should be incremented when we submit a frame, not when we get a packet back.
* avconv: VAAPI hwcontext initialisation and hwaccel helperMark Thompson2016-03-301-0/+2
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avconv: use new encode APIwm42016-03-231-29/+51
| | | | | | | The flushing case is a bit strange; not simplifying it so the change is less noisy. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avconv: use new decode APIwm42016-03-231-24/+49
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avconv: switch to the new BSF APIAnton Khirnov2016-03-201-40/+107
|
* avconv: remove sub-frame warningwm42016-03-051-7/+0
| | | | | | It's not practical to keep this with the new decode API. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avconv: convert to codecparAnton Khirnov2016-02-231-52/+64
| | | | | The switch is not yet complete because the parsers and the bistream filters do not have a new AVCodecParam-based API yet.
* avconv: switch opening decoders and encodersAnton Khirnov2016-02-231-4/+5
| | | | | | Open decoders first, next encoders. This makes sure that that subtitle_header is always set properly, without relying on avformat_find_stream_info() setting it.
* avconv: pass the hw context from filters to the encoderAnton Khirnov2016-02-141-0/+6
|
* avconv: Drop an impossible checkLuca Barbato2016-01-041-2/+2
| | | | | | EAGAIN is already managed in poll_filters(). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avconv: Simplify poll_filters() return value checkLuca Barbato2016-01-041-9/+5
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avconv: pass the global codec side data to the muxerAnton Khirnov2015-12-061-0/+22
|
* avconv: set packet duration for CFR video streamsAnton Khirnov2015-11-081-0/+5
|
* avconv: support infinite loop for the loop optionAlexandra Hájková2015-10-261-2/+3
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-261-5/+5
| | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* avformat: Always return ref-counted AVPacketLuca Barbato2015-10-261-1/+0
| | | | And drop the av_dup_packet from the input_thread.