Anton Khirnov
56f98e340f
output example: convert audio to the format supported by the encoder
10 years ago
Anton Khirnov
884f7c975f
output example: set the stream timebase
...
This is required by the new API.
10 years ago
Diego Biurrun
6cc1409ba8
examples/output: Remove unused variable
...
doc/examples/output.c:460:9: warning: unused variable ‘i’
11 years ago
Timothy Gu
3be90723e7
transcoding: fix Doxygen file path
...
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
cddbf95c5f
doc/examples/resampling_audio: use av_freep() for saftey
...
also its better in examples to use the safer functions.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4d3072ada3
doc/examples/muxing: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
a5864e9a25
output example: free the muxing format context properly
11 years ago
Anton Khirnov
182d3f8221
output example: rewrite encoding logic
...
Properly generate pts for the frames sent to the encoder, avoid
using private and deprecated AVStream.pts.
11 years ago
Anton Khirnov
a7fcd4122b
output example: store the scaling context in the stream context
11 years ago
Anton Khirnov
6a927d7aaf
output example: use a macro instead of a static variable
11 years ago
Anton Khirnov
63fd0d866c
output example: allocate the audio frame only once
11 years ago
Anton Khirnov
edd5f95764
output example: use OutputStream for audio streams as well
11 years ago
Anton Khirnov
5e7b125b6a
output example: use the new AVFrame API to allocate audio frames
11 years ago
Anton Khirnov
ac85f631c9
output example: set output channel layout
11 years ago
Anton Khirnov
294daf71a7
output example: use a struct to bundle the video stream variables together
11 years ago
Anton Khirnov
38d044429d
output example: use the new AVFrame API for allocating the video frame
11 years ago
Anton Khirnov
452860d7e0
Use av_packet_rescale_ts() to simplify code.
11 years ago
Lou Logan
88f2586adb
fix various typos
...
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
bf411fffd4
examples: rename avcodec.c to decoding_encoding.c
...
Restore the old name, which was more meaningful and consistent with the
names of the other examples.
11 years ago
Michael Niedermayer
9b467d3cd5
examples/transcoding: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
419800acc4
examples/avio_reading: fix null dereference on error
...
Fixed CID1197052
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anshul Maheshwari
6d25e90262
doc/examples/avcodec: information regarding gop_size ignored if frame->pic-type is AV_PICTURE_TYPE_I
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Andrey Utkin
e10ab43614
doc/examples: Add example transcoding.c
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
compn
84bccae8e9
doc: fix typo
11 years ago
Jason Hsu
8fb4dba89d
doc/examples/remuxing: dont use the input codec_tag, it may be invalid tor the output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
e7dfaf16a4
libavfilter: example audio filtering program
...
Based on a patch by Andrew Kelley <superjoe30@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
341639fe80
doc/examples: remove pathes from doxy examples
...
This makes the examples page less cluttered
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b339182eba
Move all example programs to doc/examples
...
Also drop support for building examples in library directories.
11 years ago
Diego Biurrun
0b9716c455
doc/examples: misc Doxygen markup improvements
...
Add properly formatted @example tag and fix Doxygen syntax.
11 years ago
Stefano Sabatini
60251c13e3
examples/avio_reading: remove stray empty line
11 years ago
Stefano Sabatini
5fc4dea39c
examples: add avio_reading.c example
11 years ago
Michael Niedermayer
a85a718f26
doc/examples/decoding_encoding: Check all av_samples_get_buffer_size() returns
...
Fixed CID1135755
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
ca57659440
examples/filtering_audio,video: do not call avcodec_register_all()
...
It is implied by av_register_all(). Simplify.
11 years ago
Stefano Sabatini
35fe88bb51
examples/muxing: reindent after previous commit
11 years ago
Stefano Sabatini
c92d2f98db
examples/muxing: flush encoders at the end
11 years ago
Stefano Sabatini
b539a72bba
examples/filtering_audio,video: drop call to avcodec_get_frame_defaults()
...
The avcodec_get_frame_defaults() function is deprecated and its use
doesn't seem required.
11 years ago
Stefano Sabatini
e34ad128a3
examples/muxing: reduce duration, remove wrong and misleading comment
...
Set duration to 10 seconds, after it was increased from 5 to 200 seconds
in 8d80f3cb87
.
200 seconds will generate too much data which is annoying especially when
testing.
11 years ago
Stefano Sabatini
9ab8f3738a
examples/muxing: remove redundant {}
11 years ago
Stefano Sabatini
b933c72b5e
examples/muxing: change error checks, from "ret != 0" to "ret < 0"
...
More consistent and more future-proof.
11 years ago
Stefano Sabatini
d72c742d47
examples/muxing: factorize write_interleave code
...
Also log output packet information.
11 years ago
Stefano Sabatini
5e2b8e4934
examples: add remuxing example
...
Show how to perform streamcopy from one container to another.
11 years ago
Stefano Sabatini
d497141b85
examples/muxing: simplify video PTS setting
...
Rely on frame_count. Also more consistent with audio path.
11 years ago
Andre Anjos
23ffc4c70d
doc/examples/muxing: Fixes frame initialization.
...
Fixes use of the example with encoders which use tha AVFrame w/h/pix_fmt fields
FFV1 is one of these codecs
We cannot easily workaround the not set fields in common code because the API
has AVFrame constant for the encoders.
Alternatives would be to fix the API or to duplicate the struct and fill in
missing fields. Or as is to require all user apps to set this correctly and
maybe simplify for that case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
094c500caf
examples/muxing: set timestamps in output audio packet
...
In particular, fix trac ticket #3231 .
11 years ago
Stefano Sabatini
8d22d37e54
examples/muxing: use av_frame_free() in place of av_free()
11 years ago
Stefano Sabatini
9abe4a10fd
examples/muxing: reuse global audio frame
...
Simplify logic, avoid multiple unnecessary alloc/free operations.
11 years ago
Stefano Sabatini
80bca6eabe
examples/muxing: honour distinction between encoder PTS timebase and stream timebase
...
Fix PTS set on the frame when encoding, which must be specified in the
encoder timebase or this will confuse the encoder.
When muxing the packet, the PTS/DTS generated by the encoder is then
rescaled to the stream timebase.
11 years ago
Stefano Sabatini
eadc421259
examples/muxing: set sample formats from list of codec supported sample formats
...
Avoid the need of tweaking, also show how to get list of supported sample
formats.
11 years ago
Stefano Sabatini
2503928a2f
examples/decoding_encoding: fix style nits
11 years ago
Ilya Basin
d1b8e01ef1
examples/muxing: fix memleaks in resampler
...
- do not allocate resample dst buffer when resample is off
- free sample buffers in addition to freeing data pointer arrays
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago