You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -783,11 +783,11 @@ The previous section showed a simple transmuxer program, now we're going to add
783
783
784
784
After we prepared the decoder but before we arrange the output media file we're going to set up the encoder.
785
785
786
-
* Create the video `AVStream` in the encoder,
787
-
* Use the `AVCodec` called `libx265`,
788
-
* Create the `AVCodecContext` based in the created codec,
786
+
* Create the video `AVStream` in the encoder,[`avformat_new_stream`](https://www.ffmpeg.org/doxygen/trunk/group__lavf__core.html#gadcb0fd3e507d9b58fe78f61f8ad39827)
787
+
* Use the `AVCodec` called `libx265`,[`avcodec_find_encoder_by_name`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__encoding.html#gaa614ffc38511c104bdff4a3afa086d37)
788
+
* Create the `AVCodecContext` based in the created codec,[`avcodec_alloc_context3`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__core.html#gae80afec6f26df6607eaacf39b561c315)
789
789
* Set up basic attributes for the transcoding session, and
790
-
* Open the codec and copy parameters from the context to the stream.
790
+
* Open the codec and copy parameters from the context to the stream.[`avcodec_open2`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__core.html#ga11f785a188d7d9df71621001465b0f1d) and [`avcodec_parameters_from_context`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__core.html#ga0c7058f764778615e7978a1821ab3cfe)
We need to expand our decoding loop for the video stream transcoding:
824
824
825
-
* Send the empty `AVPacket` to the decoder,
826
-
* Receive the uncompressed `AVFrame`,
825
+
* Send the empty `AVPacket` to the decoder, [`avcodec_send_packet`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga58bc4bf1e0ac59e27362597e467efff3)
826
+
* Receive the uncompressed `AVFrame`, [`avcodec_receive_frame`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga11e6542c4e66d3028668788a1a74217c)
827
827
* Start to transcode this raw frame,
828
-
* Send the raw frame,
829
-
* Receive the compressed, based on our codec, `AVPacket`,
830
-
* Set up the timestamp, and
831
-
* Write it to the output file.
828
+
* Send the raw frame, [`avcodec_send_frame`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga9395cb802a5febf1f00df31497779169)
829
+
* Receive the compressed, based on our codec, `AVPacket`, [`avcodec_receive_packet`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga5b8eff59cf259747cf0b31563e38ded6)
830
+
* Set up the timestamp, and [`av_packet_rescale_ts`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__packet.html#gae5c86e4d93f6e7aa62ef2c60763ea67e)
831
+
* Write it to the output file. [`av_interleaved_write_frame`](https://www.ffmpeg.org/doxygen/trunk/group__lavf__encoding.html#ga37352ed2c63493c38219d935e71db6c1)
0 commit comments