Michael Niedermayer
88956f73f2
ffmpeg: use timestamp from before and after the decoder to detect backward moving dts for discontinuity detection
...
This should make discontinuity detection more robust and detect
more cases. Timestamps after the decoder can be delayed due to threads,
timestamps before can be missing
no testcase available/known
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Jan Gerber
200cfab8c4
remuxing .opus files to .webm codec->delay must be copied too
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Marton Balint
31bb172be2
ffmpeg: ensure that -fix_sub_duration doesnt create subtitles with zero duration
...
When fix_sub_duration is used, and the duration fixing code is generating 0
duration, that is definitely zero, and not undefined or infinite (which may be
the case for decoded AVSubtitles depending on the codec), so it is safe to drop
it.
It fixes teletext subtitle sources, when the subtitles are transmitted twice
after each other for some reason.
Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Nicolas George <george@nsup.org>
11 years ago
Marton Balint
4d6f2ff524
ffmpeg: free empty subtitles as well in transcode_subtitles
...
Even if it does not matter at the moment, because subtitles with num_rect == 0
have no memory allocated, this is how we expect the users to use the API, a
returned AVSubtitle should be freed with avsubtitle_free.
Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Nicolas George <george@nsup.org>
11 years ago
Marton Balint
3e396ca8ed
ffmpeg: do not pass possibly undefined subtitles to sub2video_update
...
It should not matter for real-life usage, it is just cleaner this way.
Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Nicolas George <george@nsup.org>
11 years ago
Michael Niedermayer
738ebb4a0e
ffmpeg: set VCFR when copying timestamps
...
This fixes unreasonable initial frame repeats
Fixes Ticket3176
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d7ac887cd6
cmdutils&ffmpeg: use av_fopen_utf8() for passlogfile
...
might fix Ticket3056
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
df87cfd798
ffmpeg: fix do_streamcopy() so it copies side data too
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d7ebeba80c
ffmpeg: Do not fill gap before the first decodable frame on single stream input files unless the user explicitly requests it.
...
Fixes different behavior to JM and probably several if not all
reference decoders.
We cannot just do this unconditionally as it would ruin AV sync in
some use cases.
Bug-Found-by: BugMaster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8cdf4e0823
ffmpeg: remove unneeded include "libswscale/swscale.h"
...
Found-by: ramiro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9c52ab6f4f
ffmpeg: treat avi as VFR in framerate conversion code
...
It can be debated if avi is vfr or cfr, it can be either depending
on the definition of vfr and cfr.
This commit ensures that avi is treated correctly independent of
the AVFMT_VARIABLE_FPS value.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a443b9732f
ffmpeg: make stream default if its the only of its kind and no source can be unambigously assigned to it
...
Fixes Ticket2969
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b36257921e
ffmpeg: Dont crash on unconnected output pads before an error is printed
...
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a72bf5fd11
ffmpeg: set the source_index for trivial filter graphs
...
Fixes one testcase in Ticket2969
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b6b9c150f0
ffmpeg: add max_error_rate to allow tuning the point decoding errors are considered a failure of the whole transcoding.
...
Suggested-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
38e13f55a5
ffmpeg: dont detect slight (0.1sec) backward moving dts as discontinuity
11 years ago
Michael Niedermayer
0425fd7eb2
ffmpeg: dont return reserved values
...
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7883827cb7
ffmpeg: check for unsupported "queing of command on first filter supporting the specific commend"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1525107313
ffmpeg: improve built in docs for passing commands
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f8f4e48b6d
ffmpeg: print command replies starting on column 0
...
This fixes formating issues with multi-line replies
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
47f9a5b737
Warn the user if a pix_fmt != yuv420p was chosen for MPEG-2 video encoding.
...
Fixes ticket #2870 .
11 years ago
Stefano Sabatini
f118b41759
ffmpeg: raise level for message printed in case of auto-select pixel format
...
Increase visibility, in order to decrease troubleshooting for
users generating non playable H.264 content.
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
11 years ago
Derek Buitenhuis
58950ca0df
ffmpeg: Don't include colorspace.h
...
The header is private, and ffmpeg.c doesn't use it
for anything.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Nicolas George
fc82f4a1f8
ffmpeg: ignore EOF when pushing frames to filters.
...
EOF is not a fatal condition, it is normally produced
by a few filters.
TODO: take it into account to avoid useless decoding.
12 years ago
Justin Ruggles
e816a8bc26
ffmpeg: use actual packet pts when discarding for the copypriorss option
...
The ist->pts value at this point does not necessarily match the actual packet
pts, which is what should be used to decide whether to discard the packet.
Without this change, some video packets that have pts on or after the start
time are getting discarded when they should not be.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Michael Niedermayer
1a36c756d8
ffmpeg: free threads on error conditions.
...
Fixes Ticket2562
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
33ff943f70
ffmpeg: add -apad option which injects a apad filter only in the presence of video streams
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
410905f7fd
ffmpeg: use av_freep() for forced_kf_pts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0966623604
ffmpeg: drop old non monotone dts workaround.
...
All bugs should now be fixed in the new so the old can be droped.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
af2d964336
ffmpeg: set correct log context for non monotone dts workaround warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b2a1d92b7b
ffmpeg: port loglevel selection code to new dts workaround code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
30c05f6b02
ffmpeg: fix pts handling in the non monotone dts workaround
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
007ee09d7c
ffmpeg: fix the used maximum dts in the monotone dts workaround
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
26b89f6274
ffmpeg: use a max variable to hold the maximum dts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6b2fbdb047
ffmpeg: Check dts before use in non monotone dts workaround
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ee3824f6f6
ffmpeg: limit non monotone workaround to audio & video streams
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9fe2a62cc4
ffmpeg: move non monotone prevention code down
...
This moves the code to after the bitstream filters
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
49ec4c7e49
ffmpeg: fix segfault with random output
...
Found-by: <durandal_1707>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
b1cc12d0e3
ffmpeg: make -aspect work with -vcodec copy.
12 years ago
Stefano Sabatini
f6c9a325b7
ffmpeg: show error message in case of av_buffersrc_add_frame_flags() failure
12 years ago
Stefano Sabatini
270217908b
ffmpeg: update error message, and make use of av_err2str() to simplify
12 years ago
Michael Niedermayer
6a78ec180e
ffmpeg: print frame decoding error statistic
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
eedcac68f3
ffmpeg: dont exit 0 if fewer than 1/3 of the input could be decoded.
...
Fixes Ticket2405
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
de38e7c8c3
ffmpeg: use a rational for -aspect option.
12 years ago
Carl Eugen Hoyos
1c0d8f2563
Add a work-around for msvc compilation until c99-to-c89 issue 7 is fixed.
...
Tested-by: Nevcairiel
12 years ago
Michael Niedermayer
356363c898
ffmpeg: Fix forcing of the framerate for stream copy on input
...
Fixes Ticket2211
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f7a02d5d69
ffmpeg: initialize got_output, this silences a compiler warning from icc
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Thierry Foucu
fcf73f9c01
Call do_video_stats when duplicating frame
...
When multiple frame are encoded during vsync, current code only
do_video_stats once. This need to do it every frame.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4c1f61b1e8
ffmpeg: Correct inter stream timestamp discontinuities
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4257b804e2
ffmpeg: Replace -deinterlace (which was broken by the buffer ref stuff) with yadif injection
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago