summaryrefslogtreecommitdiffstats
path: root/common/encode_lavc.c
Commit message (Collapse)AuthorAgeFilesLines
* encode: get rid of AVDictionary setter helperwm42018-04-291-73/+13
| | | | | | | | | | | | Removes a good hunk of weird code. This loses qscale "emulation", some logging, and the fact that duplicate keys for values starting with +/- were added with AV_DICT_APPEND. I don't assign those any importance, even if they are user-visible changes. The new M_OPT_ flag is just so that nothing weird happens for other key-value options, which do not interpret a "help" key specially.
* encode: some more cleanupswm42018-04-291-28/+6
|
* encode: simplify colorspace settingwm42018-04-201-30/+0
| | | | | This was also refactored at some point, and is now unnecessarily roundabout.
* encode: cosmeticswm42018-04-201-33/+48
| | | | Mostly whitespace changes; some semantic preserving transformations.
* encode: remove some unused functionswm42018-04-201-16/+0
|
* encoding: deprecate a bunch of obscure optionswm42018-04-201-4/+8
| | | | | --audio-delay does not work correctly yet, but hopefully this can be fixed later.
* Fix recent FFmpeg deprecationswm42018-02-131-31/+29
| | | | | | | | | This includes codec/muxer/demuxer iteration (different iteration function, registration functions deprecated), and the renaming of AVFormatContext.filename to url (plus making it a malloced string). Libav doesn't have the new API yet, so it will break. I hope they will add the new APIs too.
* encode: implement --oset-metadata, and --oremove-metadataTheAMM2017-12-261-1/+25
| | | | | | | | | | | | This commit introduces a new --oset-metadata key-value-list option, allowing the user to specify output metadata when encoding (eg. --oset-metadata=title="Hello",comment="World"). A second option --oremove-metadata is added to exclude existing metadata from the output file (assuming --ocopy-metadata is enabled). Not all output formats support all tags, but luckily libavcodec simply discards unsupported keys.
* encode: rename option --ometadata to --ocopy-metadataTheAMM2017-12-261-3/+3
| | | | | | --copy-metadata describes the result of the option better, (copying metadata from the source file to the output file). Marks the old --no-ometadata OPT_REMOVED with a suggestion for the new --no-ocopy-metadata.
* msg: reinterpret a bunch of message levelsNiklas Haas2017-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | I've decided that MP_TRACE means “noisy spam per frame”, whereas MP_DBG just means “more verbose debugging messages than MSGL_V”. Basically, MSGL_DBG shouldn't create spam per frame like it currently does, and MSGL_V should make sense to the end-user and provide mostly additional informational output. MP_DBG is basically what I want to make the new default for --log-file, so the cut-off point for MP_DBG is if we probably want to know if for debugging purposes but the user most likely doesn't care about on the terminal. Also, the debug callbacks for libass and ffmpeg got bumped in their verbosity levels slightly, because being external components they're a bit less relevant to mpv debugging, and a bit too over-eager in what they consider to be relevant information. I exclusively used the "try it on my machine and remove messages from MSGL_* until it does what I want it to" approach of refactoring, so YMMV.
* Replace remaining avcodec_close() callswm42017-07-161-8/+2
| | | | | | | | This API isn't deprecated (yet?), but it's still inferior and harder to use than avcodec_free_context(). Leave the call only in 1 case in af_lavcac3enc.c, where we apparently seriously close and reopen the encoder for whatever reason.
* options: handle suffixes like -add in a more generic waywm42017-06-261-3/+3
| | | | | | | | | | | | | | | | This affects options like --vf or --display-tags. These used a "*" suffix to match all options starting with a specific name, and handled the rest in the option parser. Change this to remove the "*" special case, and require every option parser to declare a list of allowed suffixes via m_option_type.actions. The new way is conceptually simpler, because we don't have to account for the "*" in a bunch of places anymore, and instead everything is centrally handled in the CLI part of the option parser, where it's actually needed. It automatically enables suffixes like -add for a bunch of other stringlist options.
* encode_lavc: move from GPL 2+ to LGPL 2.1+.Rudolf Polzer2017-06-131-7/+8
|
* encode_lavc: fix build failure after libavcodec major bumpwm42017-03-231-2/+2
|
* options: add M_OPT_FILE to some more file optionsPhilip Sequeira2017-03-061-1/+1
| | | | (Helps shell completion.)
* Prefix libavcodec CODEC_FLAG_ constants with AV_wm42016-12-291-1/+1
| | | | The unprefixed versions are silently deprecated.
* Remove compatibility thingswm42016-12-071-18/+0
| | | | | | Possible with bumped FFmpeg/Libav. These are just the simple cases.
* client API: more or less deprecate mpv_set_option()wm42016-09-211-19/+19
| | | | | | | | | | | | | | | | | | | | | | With the merging of options and properties, the mpv_set_option() function is close to being useless, and mpv_set_property() can be used for everything instead. There are certain conflicts remaining, which are explained in depth in the docs. For now, none of this should affect existing code using the client API. Make mpv_set_property() redirect to mpv_set_option() before initialization. Remove some options marked as M_OPT_FIXED. The "pause" and "speed" options cannot be written anymore without the playloop being notified by it, so the M_OPT_FIXED does nothing. For "vo-mmcss-profile", the problem was lack of synchronization, which has been added. I'm not sure what the problem was with "frames" - I think it was only marked as M_OPT_FIXED because changing it during playback will have no effect. Except for pause/speed, these changes are needed to make them writable as properties after mpv_initialize(). Also replace all remaining uses of CONF_GLOBAL with M_OPT_FIXED.
* encode_lavc: Migrate to codecpar API.Rudolf Polzer2016-04-111-148/+176
|
* mpv_talloc.h: rename from talloc.hDmitrij D. Czarkoff2016-01-111-1/+1
| | | | This change helps avoiding conflict with talloc.h from libtalloc.
* Update license headersMarcin Kurczewski2015-04-131-4/+3
| | | | Signed-off-by: wm4 <wm4@nowhere>
* video: remove vfcap.hwm42015-01-211-3/+2
| | | | | | | | | | | | | | | | | And remove all uses of the VFCAP_CSP_SUPPORTED* constants. This is supposed to reduce conversions if many filters are used (with many incompatible pixel formats), and also for preferring the VO's natively supported pixel formats (as opposed to conversion). This is worthless by now. Not only do the main VOs not use software conversion, but also the way vf_lavfi and libavfilter work mostly break the way the old MPlayer mechanism worked. Other important filters like vf_vapoursynth do not support "proper" format negotation either. Part of this was already removed with the vf_scale cleanup from today. While I'm touching every single VO, also fix the query_format argument (it's not a FourCC anymore).
* Silence some Coverity warningswm42014-11-211-0/+1
| | | | None of this really matters.
* encode: deal with codec->time_base deprecationwm42014-07-221-5/+4
| | | | This seems to work with both Libav 10 and FFmpeg d3e51b41.
* Revert "encode: make the central lock recursive"Rudolf Polzer2014-06-121-2/+1
| | | | This reverts commit 231c6672140f019257edd26db20fbcfc2554258f.
* encode: make the central lock recursivewm42014-06-121-1/+2
| | | | | | | | Unfortunately, there's a recursive function call in ao_lavc.c (play function), leading to a deadlock. The locking is getting a bit messy, so just make the lock recursive. This fixes #844.
* encode: make option struct localwm42014-06-111-2/+33
| | | | Similar to previous commits.
* encoding: No error when the output format doesn't support a stream type at all.Rudolf Polzer2014-05-161-8/+20
| | | | | | | | When writing a video to foo.mp3, the user's intention is clearly to drop the video stream, and similarly, when writing to foo-%d.png, the intention is clearly to drop the audio stream. Now, explicit specification of --no-audio or --no-video is no longer necessary in these cases.
* New option --no-ometadata to opt out of including metadata when encoding.Rudolf Polzer2014-04-141-1/+2
| | | | | | | This re-allows the previous behaviour of being able to reencode with metadata removed, which is useful when encoding "inconsistently" tagged data for a device/player that shows file names when tags are not present.
* encode_lavc: copy metadata to output fileAlessandro Ghedini2014-03-301-1/+15
| | | | | | | | Closes #684 Signed-off-by: wm4 <wm4@nowhere> Includes some minor cosmetic changes additional to the original PR.
* encode: add lockingwm42014-03-091-4/+36
| | | | | | | | | | Since the AO will run in a thread, and there's lots of shared state with encoding, we have to add locking. One case this doesn't handle correctly are the encode_lavc_available() calls in ao_lavc.c and vo_lavc.c. They don't do much (and usually only to protect against doing --ao=lavc with normal playback), and changing it would be a bit messy. So just leave them.
* encode: don't access ao->ptswm42014-03-071-0/+8
| | | | | | | | | | This field will be moved out of the ao struct. The encoding code was basically using an invalid way of accessing this field. Since the AO will be moved into its own thread too and will do its own buffering, the AO and the playback core might not even agree which sample a PTS timestamp belongs to. Add some extrapolation code to handle this case.
* msg: move special declarations to msg_control.hwm42014-01-161-0/+1
| | | | | While almost everything uses msg.h, the moved definitions are rarely needed by anything.
* msg: remove global statewm42013-12-211-1/+1
|
* msg: rename mp_msg_log -> mp_msgwm42013-12-211-1/+1
| | | | Same for companion functions.
* stream: mp_msg conversionswm42013-12-211-5/+4
| | | | We also drop some slave mode stuff from stream_vcd.
* encode_lavc: mp_msg conversionswm42013-12-211-106/+94
| | | | Miss two mp_msg calls, because these conflict with future commits.
* Remove the _ macrowm42013-12-181-4/+4
| | | | | This was a gettext-style macro to mark strings that should be translated.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-0/+1115