Hi all.
I am writing an application, capturing an MPEG-2 transport stream from the DVB-
S card and saving its parts (for example, a video stream and one of 
accompanying audio streams) to disk files, according to the user defined 
schedule. The files should be playable with a usual software video player (say, 
Windows MediaPlayer).

I have already developed a code which extracts from the transport stream the 
packets with needed PIDs (desired elementary PIDs, carrying audio and video 
streams).

I am rather new to FFmpeg. Thanks to Andreas Ă–man, I have obtained some 
knowledge about its data structures.

Now I have come to the following algorithm.

  Accumulate packets with desired PIDs (in separate buffer for each PID)
  Try to decode the buffers periodically using 
    avcodec_decode_audio2 and avcodec_decode_video.
  When decoding was successful,
   av_init_packet

    [ fill packet's fields ]

   av_interleaved_write_frame

However, I have some doubts about if I need decoding. 
According to the task, I don't have to decode or re-encode video or audio 
frames.
I think I need simple multiplexing of audio and video data, come in the stream.

FFmpeg is certainly capable to multiplex audio and video data. 

Could anyone direct me to the necessary functions?


_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to