aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* doc/examples: Add qsv_transcode exampleWenbin Chen2022-11-223-0/+442
| | | | | | | | | | | | | | | | | | | Add qsv_transcode example which shows how to use qsv to do hardware accelerated transcoding, also show how to dynamically set encoding parameters. examples: Normal usage: qsv_transcode input.mp4 h264_qsv output.mp4 "g 60" Dynamic setting usage: qsv_transcode input.mp4 hevc_qsv output.mp4 "g 60 asyne_depth 1" 100 "g 120" This command initializes codec with gop_size 60 and change it to 120 after 100 frames Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* doc/examples/muxing: Remove unnecessary retJun Zhao2022-10-291-4/+1
| | | | | | Remove unnecessary ret and make the code more compact Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* doc/examples/extract_mvs: add motion informationChema Gonzalez2022-09-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that the motion information includes subpel motion information This was likely forgotten in 56bdf61baa04c4fd8d165f34499115ce0aa97c43. Tested: ``` $ make examples -j ... $ doc/examples/extract_mvs in.264 | head -40 | \ csvcut -C framenum,source,flags |csvlook | blockw | blockh | srcx | srcy | dstx | dsty | motion_x | motion_y | motion_scale | | ------ | ------ | ----- | ---- | ----- | ---- | -------- | -------- | ------------ | | 16 | 16 | 20 | 26 | 8 | 8 | 49 | 72 | 4 | | 16 | 16 | 152 | 15 | 136 | 8 | 65 | 28 | 4 | | 16 | 8 | 360 | 3 | 360 | 4 | 1 | -6 | 4 | | 16 | 8 | 360 | 13 | 360 | 12 | -1 | 4 | 4 | | 16 | 16 | 440 | 10 | 440 | 8 | 3 | 10 | 4 | | 8 | 16 | 829 | 7 | 836 | 8 | -31 | -6 | 4 | | 8 | 16 | 844 | 7 | 844 | 8 | -1 | -4 | 4 | | 16 | 16 | 1,004 | 14 | 1,048 | 8 | -177 | 24 | 4 | | 16 | 16 | 1,096 | 8 | 1,096 | 8 | -1 | 0 | 4 | | 16 | 8 | 1,417 | 24 | 1,416 | 4 | 7 | 82 | 4 | | 16 | 8 | 1,416 | 13 | 1,416 | 12 | 0 | 6 | 4 | | 16 | 8 | 87 | 20 | 88 | 20 | -7 | 0 | 4 | | 16 | 8 | 99 | 44 | 88 | 28 | 45 | 66 | 4 | ... ``` Also: ``` $ make fate -j ... ``` Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/examples/transcode_aac: Bump dateAndreas Unterweger2022-05-021-1/+1
| | | | Signed-off-by: Andreas Unterweger <dustsigns@gmail.com>
* doc/examples/transcode_aac: AAC encoder is no longer experimentalAndreas Unterweger2022-05-021-3/+0
| | | | Signed-off-by: Andreas Unterweger <dustsigns@gmail.com>
* doc/examples/transcode_aac: Set decoder packet timebaseAndreas Unterweger2022-05-021-2/+8
| | | | | | Previously, the default timebase caused two warnings during decoding about not being able to update timestamps for skipped and discarded samples, respectively. Signed-off-by: Andreas Unterweger <dustsigns@gmail.com>
* doc/examples/transcode_aac: Don't ignore last encoded frameAndreas Unterweger2022-05-021-10/+10
| | | | | | The last encoded frame is now fetched on EOF. It was previously left in the encoder and caused a "1 frame left in queue" warning. Signed-off-by: Andreas Unterweger <dustsigns@gmail.com>
* examples/decode_video: flush parser to fix missing frameZhao Zhili2022-04-221-4/+8
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* doc/examples/muxing: Remove outdated commentAndreas Rheinhardt2022-03-251-4/+0
| | | | | | | | | | This comment only applies to the scenario in which one uses the AVCodecContexts embedded in AVStreams. Yet this code sample stopped doing so in 9897d9f4e074cdc6c7f2409885ddefe300f18dc7; and the last major version bump even removed the public AVCodecContexts in AVStreams. So just remove this comment. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc/examples: convert to new channel layout-APIJames Almer2022-03-159-81/+73
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/metadata: Constify values from av_dict_get()Chad Fraleigh2021-11-181-1/+1
| | | | | | | | Treat values returned from av_dict_get() as const, since they are internal to AVDictionary. Signed-off-by: Chad Fraleigh <chadf@triularity.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/remuxing: Fix use of uninitialized valueAndreas Rheinhardt2021-10-071-1/+1
| | | | | | | Fixes Coverity ticket 1492326. Regression since 53f374c08d5cc97158c17ea34b1c8ee0116c0578. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/qsvdec: Don't use stack packetAndreas Rheinhardt2021-10-031-9/+9
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/hw_decode: Don't use stack packetAndreas Rheinhardt2021-10-031-9/+13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/filtering_video: Don't use stack packetAndreas Rheinhardt2021-10-031-7/+9
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/filtering_audio: Don't use stack packetAndreas Rheinhardt2021-10-031-7/+8
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/extract_mvs: Do not use stack packetAndreas Rheinhardt2021-10-031-5/+13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/muxing: Don't use stack packetAndreas Rheinhardt2021-10-031-10/+17
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/remuxing: Don't use stack packetAndreas Rheinhardt2021-10-031-13/+20
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/remuxing: Use av_packet_rescale_ts()Andreas Rheinhardt2021-10-031-3/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg, doc/examples: Remove redundant av_packet_unrefAndreas Rheinhardt2021-10-032-2/+6
| | | | | | av_interleaved_write_frame() already returns blank packets. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-202-2/+2
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc/examples/encode_video: add explanations in comments.Nicolas George2021-08-201-3/+21
|
* doc/examples/qsvdec: simplify this example via hw_device_ctx interfaceHaihao Xiang2021-08-111-36/+9
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-223-0/+3
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/muxing: add missing headerJames Almer2021-06-101-0/+1
| | | | | | Fixed compilation broken by e67e02d15672. Signed-off-by: James Almer <jamrial@gmail.com>
* examples/extract_mvs: add missing headerJames Almer2021-06-101-0/+1
| | | | | | Fixed compilation broken by e67e02d15672. Signed-off-by: James Almer <jamrial@gmail.com>
* examples/demuxing_decoding: add missing headerJames Almer2021-06-101-0/+1
| | | | | | Fixed compilation broken by e67e02d15672. Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/extract_mvs: Explicitly free optionsAndreas Rheinhardt2021-06-081-1/+3
| | | | | | | The user should not rely on all options always being recognized (in particular not on error). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc/examples/demuxing_decoding: Remove unused optionsAndreas Rheinhardt2021-06-081-2/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avformat, utils: Make av_find_best_stream const-correctAndreas Rheinhardt2021-04-275-5/+5
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/codec, allcodecs: Constify the AVCodec APIAndreas Rheinhardt2021-04-276-12/+14
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify the API wrt AV(In|Out)putFormatAndreas Rheinhardt2021-04-272-2/+2
| | | | | | | Also constify AVProbeData. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/vaapi_transcode: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-20/+22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/vaapi_encode: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-8/+8
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/transcoding: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-20/+28
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/transcode_aac: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-19/+27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/demuxing_decoding: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-11/+14
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/transcoding: switch to the new encoding APIAnton Khirnov2020-11-201-42/+33
|
* doc/examples/transcoding: stop constantly allocating AVFramesAnton Khirnov2020-11-201-29/+31
| | | | Allocate just one and reuse it.
* examples/muxing: misc style fixesJun Zhao2020-09-281-24/+23
| | | | | | | misc style fixes. Reviewed-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* doc/examples: Always open files as "binary", not "text".Carl Eugen Hoyos2020-08-252-2/+2
| | | | Fixes ticket #8638.
* Stop hardcoding align=32 in av_frame_get_buffer() calls.Anton Khirnov2020-05-223-3/+3
| | | | Use 0, which selects the alignment automatically.
* doc/examples/muxing: convert to new encoding APIAnton Khirnov2020-05-121-56/+39
|
* doc/examples/demuxing_decoding: convert to new decoding APIAnton Khirnov2020-05-121-86/+91
|
* doc/examples/demuxing_decoding: drop -refcountAnton Khirnov2020-05-121-22/+6
| | | | | Non-refcounted frames are deprecated and there is no good reason to use them.
* examples/avio_dir_cmd: drop support for move/delete operationsAnton Khirnov2020-03-164-55/+7
| | | | | | | | They use non-public functions, which is unacceptable for a public API example. Rename the example back to avio_list_dir. This effectively reverts c84d208c275d6a43b3c3421d38772179abf8acee and 767d780ec001167b2fd8f6cfe4ef78a3a8b1e34c.
* doc/examples/muxing: fix underflow in duration of encoded streamsPaul B Mahol2019-09-291-2/+2
| | | | | | Now they are exactly 10 seconds long. Fixes #5684.
* doc/examples/decode_audio: Fix "warning: ISO C90 forbids mixed declarations ↵Michael Niedermayer2019-09-161-3/+4
| | | | | | and code" Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/examples/decode_video: add input file format information for usageSteven Liu2019-08-261-1/+2
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>