Anton Khirnov
ba32f28498
doc/examples/transcode: convert timestamps between filtering and encoding
...
The timebases do not have to match.
1 year ago
Anton Khirnov
811b0e02be
doc/examples/transcode: stop using decoder's AVCodecContext.time_base
...
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.
1 year ago
Anton Khirnov
828d3b4432
doc/examples/transcode: set packet timebase for decoding
...
It is recommended for callers to set it, though not required.
1 year ago
James Almer
ed3691338b
doc/examples/transcode_aac: use av_samples_alloc_array_and_samples to allocate the input samples buffer and pointers
...
Fixes -Wuse-after-free warnings and simplifies code.
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
Wenbin Chen
2db22d14bf
doc/examples/qsv_transcode: Fix a bug when use more than one parameter set
...
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2 years ago
Stefano Sabatini
cd0d267b92
doc/examples/mux: rename alloc_picture to alloc_frame
...
The new name is consistent with the updated API.
2 years ago
Marton Balint
2296078397
avutil/frame: deprecate AVFrame.coded_picture_number and display_picture_number
...
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>
2 years ago
Marton Balint
6b6f7db819
avcodec: add AVCodecContext.frame_num as 64 bit variant to frame_number
...
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>
2 years ago
Stefano Sabatini
e3bbf5c17d
doc/examples: fix make command, reference Makefile.example
...
Fix regression since b25d6290c6
.
2 years ago
Stefano Sabatini
051e1ed1e2
examples/Makefile.example: add note about missing entries
2 years ago
Stefano Sabatini
34ff361921
examples: apply doxy entries consistency fixes
...
Use consistent format for the @file field and file description.
2 years ago
Stefano Sabatini
3d4dc6aa77
examples: rename transcoding to transcode
2 years ago
Stefano Sabatini
3856f82ef9
examples: rename scaling_video to scale_video
2 years ago
Stefano Sabatini
cd8211527e
examples: rename resampling audio to resample_audio
2 years ago
Stefano Sabatini
0a69ca656b
examples: rename remuxing to remux
2 years ago
Stefano Sabatini
ab2ec8ef01
examples: rename qsvdec to qsv_decode
2 years ago
Stefano Sabatini
eac4324bfb
examples: rename muxing to mux
2 years ago
Stefano Sabatini
7a53ae931d
examples: rename metadata to show_metadata
2 years ago
Stefano Sabatini
2e4694707e
examples: rename http_multiclient to avio_http_serve_files
2 years ago
Stefano Sabatini
1ae619e8ee
examples: rename filtering_video to decode_filter_video
2 years ago
Stefano Sabatini
3367bd56d1
examples: rename filtering_audio to decode_filter_audio
2 years ago
Stefano Sabatini
7f5630a899
examples: rename demuxing_decoding to demux_decode
...
Follow general scheme VERB_OBJECT.
2 years ago
Stefano Sabatini
f0a415c7eb
examples: rename avio_reading to avio_read_callback
...
Adopt general scheme VERB_OBJECT.
2 years ago
Marvin Scholz
4d1c9fa871
doc/examples/metadata: use av_dict_iterate
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Wenbin Chen
efe2b63c89
doc/examples: Add qsv_transcode example
...
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>
2 years ago
Jun Zhao
3497362be1
doc/examples/muxing: Remove unnecessary ret
...
Remove unnecessary ret and make the code more compact
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2 years ago
Chema Gonzalez
7adf7502b8
doc/examples/extract_mvs: add motion information
...
Note that the motion information includes subpel motion information
This was likely forgotten in 56bdf61baa
.
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>
2 years ago
Andreas Unterweger
40f2ea971f
doc/examples/transcode_aac: Bump date
...
Signed-off-by: Andreas Unterweger <dustsigns@gmail.com>
3 years ago
Andreas Unterweger
04642de4b4
doc/examples/transcode_aac: AAC encoder is no longer experimental
...
Signed-off-by: Andreas Unterweger <dustsigns@gmail.com>
3 years ago
Andreas Unterweger
3c7382e368
doc/examples/transcode_aac: Set decoder packet timebase
...
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>
3 years ago
Andreas Unterweger
e13429c9c4
doc/examples/transcode_aac: Don't ignore last encoded frame
...
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>
3 years ago
Zhao Zhili
d1a44f261a
examples/decode_video: flush parser to fix missing frame
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
3 years ago
Andreas Rheinhardt
23cb87bb3c
doc/examples/muxing: Remove outdated comment
...
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>
3 years ago
James Almer
f5ef91e020
doc/examples: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Chad Fraleigh
a90e41c590
doc/examples/metadata: Constify values from av_dict_get()
...
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>
3 years ago
Andreas Rheinhardt
b6aeee2d8b
examples/remuxing: Fix use of uninitialized value
...
Fixes Coverity ticket 1492326.
Regression since 53f374c08d
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
9190302b2e
examples/qsvdec: Don't use stack packet
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
e9182820ad
examples/hw_decode: Don't use stack packet
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
86ec1093eb
examples/filtering_video: Don't use stack packet
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
a75f518b65
examples/filtering_audio: Don't use stack packet
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
f495604361
examples/extract_mvs: Do not use stack packet
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
0230d125cb
examples/muxing: Don't use stack packet
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
53f374c08d
examples/remuxing: Don't use stack packet
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
78426da3f4
examples/remuxing: Use av_packet_rescale_ts()
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
8a23159797
fftools/ffmpeg, doc/examples: Remove redundant av_packet_unref
...
av_interleaved_write_frame() already returns blank packets.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
1ea3650823
Replace all occurences of av_mallocz_array() by av_calloc()
...
They do the same.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Nicolas George
1698cd8422
doc/examples/encode_video: add explanations in comments.
3 years ago
Haihao Xiang
c3ef9e0277
doc/examples/qsvdec: simplify this example via hw_device_ctx interface
...
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Andreas Rheinhardt
1be3d8a0cb
avcodec/avcodec: Stop including channel_layout.h in avcodec.h
...
Also include channel_layout.h directly wherever used.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
James Almer
ae0863b91d
examples/muxing: add missing header
...
Fixed compilation broken by e67e02d156
.
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago