Commit Graph

34 Commits

Author SHA1 Message Date
pkviet 77b6e3ee27 ffmpeg: add ui64 type to SpecifierOpt
Adds ui64 (uint64_t) as a possible type for SpecifierOpt. This enables
 use of uint64_t options with SpecifierOpt such as channel_layout
 when expressed as a 64 bit channel mask.

Signed-off-by: pkviet <pkv.stream@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-20 02:40:30 +01:00
Vitaly _Vi Shukela 80ef3c8360 ffmpeg: Allow "-to" on input files in addition to "-t"
For some strange reason "-t" option was only implemented
for input files while both "-t" and "-to" were available
for use for output files. This made extracting a range from
input file inconvenient.

This patch enables -to option for input so one can do

    ffmpeg -ss 1:23:20 -to 1:27:22.3 -i myinput.mkv ...

Signed-off-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-19 04:38:29 +01:00
DHE ae61bcbdf8 ffmpeg_filter: use nb_threads=1 on unused filtergraph
Signed-off-by: DHE <git@dehacked.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-19 04:38:29 +01:00
James Almer e61825d5b4 ffplay: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
James Almer b2731bcd1d ffprobe: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
James Almer e9025beacb ffmpeg: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
Timo Rothenpieler 6a4d1c9063 ffmpeg: use explicitly requested hwaccel only
With there being two hwaccels that use the CUDA pix_fmt now, just
relying on the pix_fmt to identify the selected hwaccel is not enough
anymore.

So this checks if the user explicitly selected a hwaccel, and only
accepts that one.
2017-11-11 14:19:05 +01:00
James Almer 09100ccc14 Merge commit 'a58873b11198d04670b7f98f5a8a749d742db7c5'
* commit 'a58873b11198d04670b7f98f5a8a749d742db7c5':
  avconv: when using -loop option bail out if seek to start fails

Merged-by: James Almer <jamrial@gmail.com>
2017-11-10 20:24:37 -03:00
Anton Khirnov 0e00624389 h264dec: add a NVDEC hwaccel
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>

Merges Libav commit b9129ec466.

Due to the name clash with our cuvid decoder, rename it to nvdec.

This commit also changes the Libav code to dynamic loading of the
cuda/cuvid libraries.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-11-10 22:48:53 +01:00
Marton Balint d68a557df4 ffplay: use SDL2 audio API
It allows us to specify what kind of audio parameter changes are allowed.

Should fix ticket #6721.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-06 00:00:38 +01:00
Peter Große 0ae1f6ddeb ffmpeg.c: fix code style in seek_to_start
Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-05 03:14:29 +01:00
Peter Große 3ddb887c88 ffmpeg.c: fix calculation of input file duration in seek_to_start()
Fixes looping files without audio or when using stream_copy, where
ist->nb_samples is not set since no decoding is done.

This fixes ticket #5719 and also fixes an endless loop with the sample
in ticket #6139.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-05 03:14:29 +01:00
Marton Balint 415038f2bd ffplay: only use hardware accelerated SDL texture formats
Typically only a small subset of the SDL texture formats are supported directly
by the SDL renderer drivers, the rest is software emulated. It's better if
libswscale does the format conversion to a hardware-accelerated texture format
instead of SDL.

This should fix video render slowdowns with some texture formats after
3bd2228d05.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-04 19:27:37 +01:00
Marton Balint 84d31e2475 ffplay: create the window and the renderer before starting playback
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-04 19:27:37 +01:00
James Almer 26868f80e0 Merge commit '908f737d6c2900b5d34319ca6ea1d1cb71221463'
* commit '908f737d6c2900b5d34319ca6ea1d1cb71221463':
  cmdutils: Mark conditionally used variable as av_unused

Merged-by: James Almer <jamrial@gmail.com>
2017-11-01 18:01:32 -03:00
Mark Thompson cf17086982 ffmpeg: Fix flush packet stream copy input timestamp handling
Since a7da134742, flush packets are passed
to process_input_packet() during stream copy.  This modifies the input
timestamp handling to ignore them - since they contain no data, timestamps
should not be affected.
2017-11-01 19:55:56 +00:00
James Almer 88c7aa13dd Merge commit '91622f6446b463abe6507ad2cd5d1fbf7e49c424'
* commit '91622f6446b463abe6507ad2cd5d1fbf7e49c424':
  avconv: Always initialize the opkt struct on streamcopy

Merged-by: James Almer <jamrial@gmail.com>
2017-10-31 13:41:37 -03:00
James Almer a7da134742 Merge commit '4d56f7ab8f627aa140c1ede1bb61305f01cefcdd'
* commit '4d56f7ab8f627aa140c1ede1bb61305f01cefcdd':
  avconv: Flush output BSFs when stream copy reaches EOF

Merged-by: James Almer <jamrial@gmail.com>
2017-10-30 23:07:15 -03:00
Michael Niedermayer f1251a6b9c ffmpeg: Fix stored encoder metadata with -bitexact
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-30 21:32:26 +01:00
James Almer 5cc5130c81 ffmpeg: remove usage of deprecated getter functions
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-29 14:42:48 -03:00
James Almer ddd0b19169 ffprobe: remove usage of deprecated getter functions
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-29 14:42:48 -03:00
James Almer ca2b779423 avformat: remove use of deprecated AVFMT_FLAG_KEEP_SIDE_DATA flag
It has no effect whatsoever since the major bump.
Replace the flag's documentation to reflect this as well.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-29 00:09:52 -03:00
Carl Eugen Hoyos 693a11b8a2 lavf: Remove AVFMT_RAWPICTURE.
Deprecated since October 2015.
2017-10-26 23:43:11 +02:00
Michael Niedermayer 617f0c65e1 ffserver: Fix off by 1 error in path
Code suggested by ubitux

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-25 00:18:33 +02:00
James Almer 7b550c5f84 Merge commit 'b3739599bda740ac12d3dde31a331b744df99123'
* commit 'b3739599bda740ac12d3dde31a331b744df99123':
  lavc: Drop deprecated emu edge functionality

Merged-by: James Almer <jamrial@gmail.com>
2017-10-23 16:04:31 -03:00
Michael Niedermayer 2c9fa4162b ffmpeg: add -bitexact flag to simplify enabling bitexact mode in (de)muxer and (de/en)coder
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-23 12:41:04 +02:00
Clément Bœsch 2b32031827 lavc: drop VDA
Deprecated (aka removed) in OSX 10.11, and we have a replacement for it
(VideoToolbox).
2017-10-23 11:56:15 +02:00
James Almer d3a3ee9c7a ffserver: remove usage of deprecated rc_eq option
The private codec option will be used instead when available.
2017-10-21 18:07:54 -03:00
Marton Balint f4090940bd ffmpeg: always init output stream before reaping filters
Otherwise the frame size of the codec is not set in the buffersink.

Fixes ticket #6603 and the following simpler case:

ffmpeg -c aac -filter_complex "sine=d=0.1,asetnsamples=1025" out.aac

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-18 21:52:47 +02:00
Jun Zhao 2e94490225 ffmpeg: remove hwaccel_lax_profile_check option
This has been unused for a long time, and the original purpose has been
replaced by the per-stream hwaccel_flags.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-10-16 22:38:11 +01:00
Sasi Inguva 2b006ccf83 ffmpeg.c: Fallback to duration_dts, when duration_pts can't be determined.
This is required for FLV files, for which duration_pts comes out to be zero.

Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-12 01:27:52 +02:00
Marton Balint 41569bbc66 ffmpeg: always use single threaded decoding for attached pictures
Since af1761f7b5 ffmpeg waits for a frame in each
stream before writing the output header. If we are using threaded decoding for
attached pictures, we have to read till EOF to be able to finally flush the
decoder and output the decoded frame. This essentially makes ffmpeg buffer all
non-attached picture packets, which will cause a "Too many packets buffered for
output stream" eventually.

By forcing single threaded decoding, we get a frame from a single packet as
well and we can avoid the error.

Fixes part of ticket #6375:
ffmpeg -i 46564100.mp3 -acodec libmp3lame -ab 128k -ac 2 out.mp3

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-08 22:32:13 +02:00
James Almer 3e6829a8aa build: fix compilation of tools with OpenCL enabled
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-03 11:56:56 -03:00
James Almer fd5f4ac081 Merge commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524'
* commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524':
  build: Move cli tool sources to a separate subdirectory

Merged-by: James Almer <jamrial@gmail.com>
2017-10-01 18:26:36 -03:00