[Libav-user] Simplified demux/decode/encode/mux

Harald Schlangmann harry at gps-laptimer.de
Sat Mar 1 17:50:03 CET 2014


I use the FFmpeg libs to read a video file, apply changes to the video stream, and write both the changed video frames and *unchanged* audio frames to another file. All of this is done on Android (NDK). Currently, I do have the video part running and wanted to start the audio part now. 2 questions:

#1: As I do not want to change the audio part, what is the preferred and fastest way to pass this stream through? Is it valid to simply read audio packets (not frames) and write them unchanged? To me it seems it does not make too much sense to first decode them and encode them later? Or am I missing something? 

#2: I have learned about pts/dts and roughly understand what it is all about. Samples I have seen do quite sophisticated things to derive a PTS for real time display and so on… In my scenario (which is a simple batch process), is it a valid approach to ignore that stuff completely and simple copy over the original pts/dts fields on packet level (both audio and video) when writing them to the second file?

I’m looking forward to any feedback.

Greetings Harald

Harald Schlangmann
Antwerpener Str. 52, 50672 Köln, Germany
+49 151 2265 4439
Harry at gps-laptimer.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140301/91619db0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140301/91619db0/attachment.p7s>

More information about the Libav-user mailing list