summaryrefslogtreecommitdiff
path: root/doc/examples/muxing.c
Commit message (Collapse)AuthorAgeFilesLines
* doc/examples/muxing: re-indent blockMatthieu Bouron2017-03-281-9/+9
|
* doc/examples/muxing: Fix av_frame_make_writable usageSam Hocevar2016-11-231-9/+6
| | | | | | | | | | | | | This patch moves the av_frame_make_writable() call from fill_yuv_image to get_video_frame so that its argument can be the actual frame that will be sent to the encoder. This fixes data corruption issues in codecs that keep references on one or several previous frames. Signed-off-by: Sam Hocevar <sam@hocevar.net> Reviewed-by: wm4 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
| | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
* doc/examples/muxing: Add support to pass flags to muxer as since codecpar ↵Michael Niedermayer2016-04-111-2/+4
| | | | | | the codec flags are not available to the muxer anymore Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '9897d9f4e074cdc6c7f2409885ddefe300f18dc7'Derek Buitenhuis2016-04-111-13/+33
| | | | | | | * commit '9897d9f4e074cdc6c7f2409885ddefe300f18dc7': examples/output: convert to codecpar Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* doc/examples/muxing: Fix mixed declaration and codeMichael Niedermayer2015-10-151-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e'Hendrik Leppkes2015-10-141-30/+11
| | | | | | | | | | * commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e': avformat: Do not use AVFMT_RAWPICTURE Removal from ffmpeg.c not merged because some parts of avdevice still use it Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/examples/muxing: Use avio_closep() in examples as it avoids leaving ↵Michael Niedermayer2015-01-081-1/+1
| | | | | | stale pointers Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: fix "-flags" optionMichael Niedermayer2014-07-271-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: Exchange tmp_frame and frameMichael Niedermayer2014-07-271-11/+12
| | | | | | Reduces difference to 56f98e340fca894a76d1ddbe33118b8d8c4db34a Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: mark correct frame as writeableMichael Niedermayer2014-07-271-9/+9
| | | | | Bug found from comparing 56f98e340fca894a76d1ddbe33118b8d8c4db34a to HEAD Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: Always use swr, simplifies code slightlyMichael Niedermayer2014-07-271-6/+0
| | | | | Idea-from: 56f98e340fca894a76d1ddbe33118b8d8c4db34a Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: add alloc_audio_frame() and use it to simplify code.Anton Khirnov2014-07-271-29/+35
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: Move samples_count to OutputStreamMichael Niedermayer2014-07-271-4/+3
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: free swr context at the endMichael Niedermayer2014-07-271-0/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: Support setting flags, for example for setting bitexactMichael Niedermayer2014-07-261-8/+19
| | | | | | This would allow the example to be used in regression tests Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: select a supported sample rate for the encoder, favor 44100Michael Niedermayer2014-07-261-0/+8
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: pick a supported channel layout if stereo isnt ↵Michael Niedermayer2014-07-261-1/+9
| | | | | | supported by the encoder Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: move swr context to OutputStreamMichael Niedermayer2014-07-261-14/+13
| | | | | Idea from: 56f98e340fca894a76d1ddbe33118b8d8c4db34a Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '884f7c975f0af25febe86660e87bf3b2165a0309'Michael Niedermayer2014-07-261-2/+4
| | | | | | | | | | * commit '884f7c975f0af25febe86660e87bf3b2165a0309': output example: set the stream timebase Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples/muxing: remove unused variableMichael Niedermayer2014-06-281-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '182d3f8221c23716ea4eafa460bdb94968f71f26'Michael Niedermayer2014-06-271-80/+108
| | | | | | | | | | * commit '182d3f8221c23716ea4eafa460bdb94968f71f26': output example: rewrite encoding logic Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'a7fcd4122b19b0f934020f4e261d0c44c4c32e11'Michael Niedermayer2014-06-271-7/+10
| | | | | | | | | | * commit 'a7fcd4122b19b0f934020f4e261d0c44c4c32e11': output example: store the scaling context in the stream context Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '6a927d7aaf5625e83a674072913b9e292a303fd1'Michael Niedermayer2014-06-261-2/+2
| | | | | | | | | | * commit '6a927d7aaf5625e83a674072913b9e292a303fd1': output example: use a macro instead of a static variable Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '63fd0d866c8300a8f251a15b1535e9ce40a407fb'Michael Niedermayer2014-06-261-42/+45
| | | | | | | | | | * commit '63fd0d866c8300a8f251a15b1535e9ce40a407fb': output example: allocate the audio frame only once Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'edd5f957646dcbf1bb55718bc7bf1e5481c25bcb'Michael Niedermayer2014-06-261-46/+40
| | | | | | | | | | * commit 'edd5f957646dcbf1bb55718bc7bf1e5481c25bcb': output example: use OutputStream for audio streams as well Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '5e7b125b6ae36893dfd9cb5661c99b67363cbb38'Michael Niedermayer2014-06-261-69/+47
| | | | | | | | | | * commit '5e7b125b6ae36893dfd9cb5661c99b67363cbb38': output example: use the new AVFrame API to allocate audio frames Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'ac85f631c9a9cc59aaca1c8dd6894fb1f701c594'Michael Niedermayer2014-06-261-0/+2
| | | | | | | | | | * commit 'ac85f631c9a9cc59aaca1c8dd6894fb1f701c594': output example: set output channel layout Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '294daf71a7a1303b5ddd3cbefebed3b732d610f3'Michael Niedermayer2014-06-261-45/+58
| | | | | | | | | | * commit '294daf71a7a1303b5ddd3cbefebed3b732d610f3': output example: use a struct to bundle the video stream variables together Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '38d044429dabcd28928693240e955c6d4430cca9'Michael Niedermayer2014-06-261-33/+49
| | | | | | | | | | * commit '38d044429dabcd28928693240e955c6d4430cca9': output example: use the new AVFrame API for allocating the video frame Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '452860d7e056f9a894cac2fe52cdedeae4c38251'Michael Niedermayer2014-06-201-3/+1
| | | | | | | | | | | * commit '452860d7e056f9a894cac2fe52cdedeae4c38251': Use av_packet_rescale_ts() to simplify code. Conflicts: doc/examples/muxing.c ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples: remove pathes from doxy examplesMichael Niedermayer2014-02-171-1/+1
| | | | | | | This makes the examples page less cluttered Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-02-141-2/+2
| | | | | | | | | | | * qatar/master: doc/examples: misc Doxygen markup improvements Conflicts: doc/examples/muxing.c doc/examples/transcode_aac.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* examples/muxing: reindent after previous commitStefano Sabatini2014-01-231-32/+32
|
* examples/muxing: flush encoders at the endStefano Sabatini2014-01-231-23/+30
|
* examples/muxing: reduce duration, remove wrong and misleading commentStefano Sabatini2014-01-211-2/+1
| | | | | | | | Set duration to 10 seconds, after it was increased from 5 to 200 seconds in 8d80f3cb877b890889b1673029387229648901ed. 200 seconds will generate too much data which is annoying especially when testing.
* examples/muxing: remove redundant {}Stefano Sabatini2014-01-201-6/+4
|
* examples/muxing: change error checks, from "ret != 0" to "ret < 0"Stefano Sabatini2014-01-201-2/+3
| | | | More consistent and more future-proof.
* examples/muxing: factorize write_interleave codeStefano Sabatini2014-01-201-17/+28
| | | | Also log output packet information.
* examples/muxing: simplify video PTS settingStefano Sabatini2014-01-121-3/+1
| | | | Rely on frame_count. Also more consistent with audio path.
* doc/examples/muxing: Fixes frame initialization.Andre Anjos2014-01-091-0/+3
| | | | | | | | | | | | | 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>
* examples/muxing: set timestamps in output audio packetStefano Sabatini2014-01-091-0/+7
| | | | In particular, fix trac ticket #3231.
* examples/muxing: use av_frame_free() in place of av_free()Stefano Sabatini2014-01-091-1/+1
|
* examples/muxing: reuse global audio frameStefano Sabatini2014-01-091-7/+13
| | | | Simplify logic, avoid multiple unnecessary alloc/free operations.
* examples/muxing: honour distinction between encoder PTS timebase and stream ↵Stefano Sabatini2014-01-091-1/+5
| | | | | | | | | | 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.
* examples/muxing: set sample formats from list of codec supported sample formatsStefano Sabatini2014-01-091-1/+2
| | | | | Avoid the need of tweaking, also show how to get list of supported sample formats.
* examples/muxing: fix memleaks in resamplerIlya Basin2013-12-211-12/+18
| | | | | | | - 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>
* examples/muxing: use S16 sample_fmt for resample src regardless of codec ↵Ilya Basin2013-12-211-1/+1
| | | | | | | | sample_fmt We generate S16 samples and we should allocate the right buffer Signed-off-by: Michael Niedermayer <michaelni@gmx.at>