aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
Commit message (Collapse)AuthorAgeFilesLines
* examples/transcode: flush decoder on EOFZhao Zhili2023-08-261-2/+29
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* examples: fix build of mux and resample_audioSebastian Ramacher2023-07-281-2/+2
| | | | | | | | | The commits eac4324bfbe452f0292b48b2f1dc37b5052ec0be and cd8211527efbb9cad19db1c0d033da0749836e43 renamed the examples, but the targets were not updated. Hence, the builds are missing -lm. Signed-off-by: Sebastian Ramacher <sramacher@debian.org> Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/transcode: convert timestamps between filtering and encodingAnton Khirnov2023-06-031-0/+5
| | | | The timebases do not have to match.
* doc/examples/transcode: stop using decoder's AVCodecContext.time_baseAnton Khirnov2023-06-031-5/+2
| | | | | | | | The contents of this field are not defined for decoding. Use pkt_timebase, which is the timebase of demuxed packets. Drop a tautological av_packet_rescale_ts() call, as the stream and decoder timebases are the same.
* doc/examples/transcode: set packet timebase for decodingAnton Khirnov2023-06-031-0/+5
| | | | It is recommended for callers to set it, though not required.
* doc/examples/transcode_aac: use av_samples_alloc_array_and_samples to ↵James Almer2023-05-051-15/+5
| | | | | | | | allocate the input samples buffer and pointers Fixes -Wuse-after-free warnings and simplifies code. Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/qsv_transcode: Fix a bug when use more than one parameter setWenbin Chen2023-03-171-1/+1
| | | | Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
* doc/examples/mux: rename alloc_picture to alloc_frameStefano Sabatini2023-03-121-12/+12
| | | | The new name is consistent with the updated API.
* avutil/frame: deprecate AVFrame.coded_picture_number and display_picture_numberMarton Balint2023-02-131-2/+2
| | | | | | | | Their usefulness is questionable, very few decoders set them, and their type should have been int64_t. A replacement field can be added later if a valid use case is found. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: add AVCodecContext.frame_num as 64 bit variant to frame_numberMarton Balint2023-02-131-2/+2
| | | | | | | | | | Frame counters can overflow relatively easily (INT_MAX number of frames is slightly more than 1 year for 60 fps content), so make sure we use 64 bit values for them. Also deprecate the old 32 bit frame_number attribute. Signed-off-by: Marton Balint <cus@passwd.hu>
* doc/examples: fix make command, reference Makefile.exampleStefano Sabatini2023-02-111-3/+5
| | | | Fix regression since b25d6290c67e193.
* examples/Makefile.example: add note about missing entriesStefano Sabatini2023-02-111-1/+7
|
* examples: apply doxy entries consistency fixesStefano Sabatini2023-02-1123-84/+95
| | | | Use consistent format for the @file field and file description.
* examples: rename transcoding to transcodeStefano Sabatini2023-02-113-3/+3
|
* examples: rename scaling_video to scale_videoStefano Sabatini2023-02-113-3/+3
|
* examples: rename resampling audio to resample_audioStefano Sabatini2023-02-113-3/+3
|
* examples: rename remuxing to remuxStefano Sabatini2023-02-113-3/+3
|
* examples: rename qsvdec to qsv_decodeStefano Sabatini2023-02-112-2/+2
|
* examples: rename muxing to muxStefano Sabatini2023-02-114-4/+4
|
* examples: rename metadata to show_metadataStefano Sabatini2023-02-113-3/+3
|
* examples: rename http_multiclient to avio_http_serve_filesStefano Sabatini2023-02-113-4/+5
|
* examples: rename filtering_video to decode_filter_videoStefano Sabatini2023-02-113-3/+3
|
* examples: rename filtering_audio to decode_filter_audioStefano Sabatini2023-02-113-3/+3
|
* examples: rename demuxing_decoding to demux_decodeStefano Sabatini2023-02-113-4/+4
| | | | Follow general scheme VERB_OBJECT.
* examples: rename avio_reading to avio_read_callbackStefano Sabatini2023-02-113-3/+3
| | | | Adopt general scheme VERB_OBJECT.
* doc/examples/metadata: use av_dict_iterateMarvin Scholz2022-12-011-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* 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>