summaryrefslogtreecommitdiff
path: root/ffmpeg.c
Commit message (Collapse)AuthorAge
* ffmpeg: honor -ss and -t parameters with muxed subtitles.Clément Bœsch2012-08-01
| | | | | | | | | | | | | | | | | | | 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.
* ffmpeg: avoid bogus error with "test.flac -c copy -f null -"Michael Niedermayer2012-08-01
| | | | | Reported-by: durandal_1707 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ffmpeg: init simple filter graph before trying to extract framerate from its ↵Michael Niedermayer2012-07-30
| | | | | | output. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: flvdec: remove spurious use of stream id lavf: deprecate r_frame_rate. lavf: round estimated average fps to a "standard" fps. Conflicts: ffmpeg.c ffprobe.c libavformat/avformat.h libavformat/electronicarts.c libavformat/flvdec.c libavformat/rawdec.c libavformat/utils.c tests/ref/fate/iv8-demux Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'fe1c1198e670242f3cf9e3e1eef27cff77f3ee23'Michael Niedermayer2012-07-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'fe1c1198e670242f3cf9e3e1eef27cff77f3ee23': lavf: use dts difference instead of AVPacket.duration in find_stream_info() avf: introduce nobuffer option fate: make yadif tests consistent across systems vf_hqdn3d: support 9 and 10bit colordepth vf_hqdn3d: reduce intermediate precision vf_hqdn3d: simplify and optimize factor identical ff_inplace_start_frame out of two filters vf_hqdn3d: cosmetics avprobe/avconv: fix tentative declaration compile errors on MSVS. Conflicts: doc/APIchanges ffmpeg.c ffprobe.c libavformat/avformat.h libavformat/options_table.h libavformat/utils.c libavformat/version.h tests/fate/filter.mak tests/ref/fate/filter-yadif-mode0 tests/ref/fate/filter-yadif-mode1 Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: allow using the r_frame_rate as fundamental timebase for stream copy ↵Michael Niedermayer2012-07-28
| | | | | | | | | | | | | | | | in avi Fixes Ticket1434 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: add code to perform ts wrap correctionMichael Niedermayer2012-07-28
| | | | | | | | | | | | Fixes ticket1385 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: doxyfy some comments and mention the timebase used in various ↵Michael Niedermayer2012-07-26
| | | | | | | | | | | | timestamp fields. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: move decoded_frame->pts computation togetherMichael Niedermayer2012-07-26
| | | | | | | | | | | | This clarifies the code. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: Fix rounding errors in decoded_frame->pts computationMichael Niedermayer2012-07-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: fix assumed decoded_frame->pts timebaseMichael Niedermayer2012-07-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: reset decoded_frame->pts after rescaling.Michael Niedermayer2012-07-26
| | | | | | | | | | | | | | 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>
* | ffmpeg: fix units of next_?ts in debug printing routine.Michael Niedermayer2012-07-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: warn about new streams after startup.Nicolas George2012-07-26
| |
* | ffmpeg: keep packet/frame availability in global structures.Nicolas George2012-07-24
| | | | | | | | This replaces the use of the no_packet and no_frame arrays.
* | ffmpeg: select input file based on output time.Nicolas George2012-07-23
| | | | | | | | | | | | | | | | | | 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.
* | ffmpeg: probe buffersinks once more after EOF.Nicolas George2012-07-20
| | | | | | | | | | | | | | | | 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.
* | Revert "ffmpeg: set pkt_timebase"Nicolas George2012-07-19
| | | | | | | | | | | | | | | | This reverts commit 744bd8d08c18d68d92ead091c7e335b4b07459aa. 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.
* | ffmpeg: add -(no)stdin option.Nicolas George2012-07-19
| | | | | | | | | | | | | | 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.
* | ffmpeg: invert using_stdin and rename accordingly.Nicolas George2012-07-19
| | | | | | | | There are other reasons not to use stdin than having it as an input.
* | ffmpeg: revert 3ba90d9 (cosmetics to reduce difference to qatar by about 90 ↵Michael Niedermayer2012-07-18
| | | | | | | | | | | | | | | | lines) This commit caused Ticket1490 (Infinity loop / lock in export image) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libopenjpeg: introduce encoding support libopenjpeg: rename decoder source file. RTMPTS protocol support RTMPS protocol support avconv: print an error message when demuxing fails. tscc2: DCT output should not be clipped rtmp: Rename rtmphttp to ffrtmphttp Conflicts: Changelog configure doc/general.texi libavcodec/libopenjpegenc.c libavcodec/version.h libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: fix streamcopy of some mp3 in aviMichael Niedermayer2012-07-16
| | | | | | | | | | | | | | 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>
* | ffmpeg: add -progress option.Nicolas George2012-07-14
| | | | | | | | | | It allows to send program-friendly (easy to parse) progress information to a file or an URL.
* | ffmpeg: use pkt_pts before pkt->pts for audioMichael Niedermayer2012-07-14
| | | | | | | | | | | | This fixes the timestamp of the first packet when samples have been skiped. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: set pkt_timebaseMichael Niedermayer2012-07-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: fix type of av_log() argumentMichael Niedermayer2012-07-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | add output for frame timestampsRobert Krüger2012-07-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: poll filters even after -t limit.Nicolas George2012-07-06
| | | | | | | | | | If not, frames can still arrive to the sink and accumulate. The frames past recording time will be ignored in do_*_out.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: qdm2: remove broken and disabled dump_context() debug function x86: h264_intrapred: use newly introduced SPLAT* and PSHUFLW macros x86inc: add SPLATB_LOAD, SPLATB_REG, PSHUFLW macros x86inc: modify ALIGN to not generate long nops on i586 x86: h264_intrapred: port to cpuflag macros avplay: update input filter pointer when the filtergraph is reset. avconv: fix parsing of -force_key_frames option. h264: use templates to avoid excessive inlining xtea: Make the count parameter match the documentation blowfish: Make the count parameter match the documentation mpegvideo: Don't use ff_mspel_motion() for vc1 xtea: invert branch and loop precedence blowfish: invert branch and loop precedence flvdec: optionally trust the metadata avconv: Set audio filter time base to the sample rate vp8: Add ifdef guards around the sse2 loopfilter in the sse2slow branch too Conflicts: ffmpeg.c ffplay.c libavcodec/h264.c libavcodec/mpegvideo_common.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: rework checks for the -t option.Nicolas George2012-07-04
| | | | | | | | | | | | | | | | | | | | | | 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.
* | ffmpeg: Add sanity check on frame duplicationMichael Niedermayer2012-07-04
| | | | | | | | | | | | | | This prevents long loops and OOM in case of damaged timestamps in some cases Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dsputilenc_mmx: split assignment of ff_sse16_sse2 to SSE2 section. dnxhdenc: add space between function argument type and comment. x86: fmtconvert: add special asm for float_to_int16_interleave_misc_* attributes: Add a definition of av_always_inline for MSVC cmdutils: Pass the actual chosen encoder to filter_codec_opts os_support: Add fallback definitions for stat flags os_support: Rename the poll fallback function to ff_poll network: Check for struct pollfd os_support: Don't compare a negative number against socket descriptors os_support: Include all the necessary headers for the win32 open function x86: vc1: fix and enable optimised loop filter Conflicts: cmdutils.c cmdutils.h ffmpeg.c ffplay.c libavformat/os_support.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: re-set frame_size after filter graph reset.Nicolas George2012-06-30
| | | | | | | | | | The filter contexts are completely cleared, so the frame size can not be kept.
* | ffmpeg: use the more powerful version of abuffersink.Nicolas George2012-06-30
| |
* | ffmpeg: fix parsing of -force_key_frames option.Nicolas George2012-06-30
| | | | | | | | | | Identical to commit 4f6a1c9 by Reimar Döffinger, that was lost after the merge of 19ad567.
* | ffmpeg: fix a memleak in subtitles decoding.Clément Bœsch2012-06-29
| |
* | ffmpeg: warn that -t does not work with -filter_complex.Nicolas George2012-06-28
| |
* | ffmpeg: warn when -t is used for inputs.Nicolas George2012-06-28
| | | | | | | | | | | | | | | | | | 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.
* | ffmpeg: dont copy creation_time as the destination file is not created at ↵Michael Niedermayer2012-06-28
| | | | | | | | | | | | | | | | that time Fixes Ticket1439 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avconv: add an assert to silence an uninitialized variable warning. avconv: shut up an uninitialized variable warning. avfiltergraph: shut up uninitialized variable warning. af_join: initialize a variable to shut up gcc warning. amix: fix format specifier for AVFilterLink.sample_rate. lavfi: make filters less verbose. mpc8: read APE tags. lavr: x86: fix ff_conv_fltp_to_flt_6ch function prototypes libm: provide fallback definition for cbrtf() using powf() network: Don't redefine error codes if they already exist in errno.h configure: Check for sys/time.h network: Include unistd.h from network.h avconv: don't include vsrc_buffer.h, which doesn't exist anymore lavfi: reorder AVFilterLink fields. lavfi: reorder AVFilterContext fields. lavfi: reorder AVFilter fields. lavfi: reorder AVFilterBufferRef fields. lavfi: reorder AVFilterBuffer fields. Conflicts: configure libavcodec/v210dec.h libavfilter/asrc_anullsrc.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_crop.c libavfilter/vf_drawbox.c libavfilter/vf_fade.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vsrc_color.c libavformat/network.h libavutil/libm.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a'Michael Niedermayer2012-06-26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a': lavfi: remove 'opaque' parameter from AVFilter.init() mov: do not try to read total disc/track number if data atom is too short. avconv: fix -force_key_frames dxva2_h264: fix signaling of mbaff frames x86: fft: elf64: fix PIC build Conflicts: ffmpeg.c libavcodec/v210dec.h libavfilter/asrc_anullsrc.c libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_overlay.c libavfilter/vsrc_color.c libavfilter/vsrc_testsrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | lavfi/avcodec: deprecate avfilter_fill_frame_from_*_buffer_ref APIStefano Sabatini2012-06-25
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: log: Only include unistd.h if configure found it ape: create audio stream before reading tags. mov: make a length variable larger. image2: Add "start_number" private option to the demuxer image2: Add "start_number" private option to the muxer avconv: remove a forgotten debugging printf. avconv: use more descriptive names for hardcoded filters. avconv: remove redundant handling of async. doc/filters: fix typo. h264: use asm cabac reader under a generic condition Conflicts: ffmpeg.c libavformat/img2dec.c libavformat/img2enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: fix indent of 1 lineMichael Niedermayer2012-06-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: fix FF_API_OLD_VSINK_API=0 caseMichael Niedermayer2012-06-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: fix mixup of old and new sinksMichael Niedermayer2012-06-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libspeexenc: add supported sample rates and channel layouts. Replace usleep() calls with av_usleep() lavu: add av_usleep() function utvideo: mark interlaced frames as such utvideo: Fix interlaced prediction for RGB utvideo. cosmetics: do not use full path for local headers lavu/file: include unistd.h only when available configure: check for unistd.h log: include unistd.h only when needed lavf: include libavutil/time.h instead of redeclaring av_gettime() Conflicts: configure doc/APIchanges ffmpeg.c ffplay.c libavcodec/utvideo.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | ffmpeg: remove unused buffer_size in InputFile.Clément Bœsch2012-06-22
| |
* | ffmpeg: print swr options in --help tooMichael Niedermayer2012-06-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>