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
James Almer
260dc1c5f3
examples/extract_mvs: add missing header
...
Fixed compilation broken by e67e02d156
.
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
James Almer
3191bb5c35
examples/demuxing_decoding: add missing header
...
Fixed compilation broken by e67e02d156
.
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Andreas Rheinhardt
3a5412b39e
doc/examples/extract_mvs: Explicitly free options
...
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>
3 years ago
Andreas Rheinhardt
933308a290
doc/examples/demuxing_decoding: Remove unused options
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
46dac8cf3d
avformat/avformat, utils: Make av_find_best_stream const-correct
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Andreas Rheinhardt
626535f6a1
avcodec/codec, allcodecs: Constify the AVCodec API
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Andreas Rheinhardt
56450a0ee4
avformat: Constify the API wrt AV(In|Out)putFormat
...
Also constify AVProbeData.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
James Almer
d492b17024
doc/examples/vaapi_transcode: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
James Almer
6394c7d51a
doc/examples/vaapi_encode: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
James Almer
b896832b78
doc/examples/transcoding: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
James Almer
16dba17329
doc/examples/transcode_aac: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
James Almer
07b788c8af
doc/examples/demuxing_decoding: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Anton Khirnov
ce0f5397a8
doc/examples/transcoding: switch to the new encoding API
4 years ago
Anton Khirnov
29f33c1076
doc/examples/transcoding: stop constantly allocating AVFrames
...
Allocate just one and reuse it.
4 years ago
Jun Zhao
ef868fa4a1
examples/muxing: misc style fixes
...
misc style fixes.
Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years ago
Carl Eugen Hoyos
68f637b6f9
doc/examples: Always open files as "binary", not "text".
...
Fixes ticket #8638 .
4 years ago
Anton Khirnov
f30a41a608
Stop hardcoding align=32 in av_frame_get_buffer() calls.
...
Use 0, which selects the alignment automatically.
5 years ago
Anton Khirnov
d8de9d46f2
doc/examples/muxing: convert to new encoding API
5 years ago
Anton Khirnov
3bfe20389d
doc/examples/demuxing_decoding: convert to new decoding API
5 years ago
Anton Khirnov
e4edf220e5
doc/examples/demuxing_decoding: drop -refcount
...
Non-refcounted frames are deprecated and there is no good reason to use
them.
5 years ago
Anton Khirnov
15546f772c
examples/avio_dir_cmd: drop support for move/delete operations
...
They use non-public functions, which is unacceptable for a public API
example. Rename the example back to avio_list_dir.
This effectively reverts c84d208c27
and
767d780ec0
.
5 years ago
Paul B Mahol
4a51075f4d
doc/examples/muxing: fix underflow in duration of encoded streams
...
Now they are exactly 10 seconds long.
Fixes #5684 .
5 years ago
Michael Niedermayer
c80715f153
doc/examples/decode_audio: Fix "warning: ISO C90 forbids mixed declarations and code"
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Steven Liu
6d1009cb9d
doc/examples/decode_video: add input file format information for usage
...
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years ago
Steven Liu
7c2ff06b6e
doc/examples/decode_audio: print message about how to play the output file
...
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years ago
Jun Zhao
e512d893bf
examples/encode_video: only add sequence end code for mpeg1/2 video
...
Only add sequence end code for mpeg1/mpeg2 video, or else use the encoder
libx264 or libx265 in this sample, decoding the output file will get
unknow NALU type error.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years ago