[Libav-user] converting avi audio and video to dvd mpeg2 with ac3 audio

0xnullptr 0xnullptr at gmail.com
Mon Jul 21 01:16:41 CEST 2014


Hi,

I've searched the archives for a solution but I couldn't anything relating
to this-

I'd like to know how I can programmatically do the same as the ffmpeg
command line option '-f dvd' with using the native libav* commands and
classes.

So far I have this code :-

pCodec = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);

pContext->bitrate = 48000000;
pContext->width = 720;
pContext->height = 576;

AVRational fps = {1,25};
pContext->time_base = fps;

pContext->gop_size = 15;
pContext->max_b_frmaes = 2;
pContext->pix_fmt = AV_PIX_FMT_YUV420P;

Ultimately I'd like to use the libav* library to convert an avi file ( movie
and sound ) to a dvd compliant mpeg2/ac3 that I can author and burn to a dvd
disc so that I can play it a standalone dvd player.

I know I need to at least set the packet size to 2048 bytes too. Where/what
parameters do I need to set to achieve the goal.

All help is greatly appreciated.

Dave.



--
View this message in context: http://libav-users.943685.n4.nabble.com/converting-avi-audio-and-video-to-dvd-mpeg2-with-ac3-audio-tp4660157.html
Sent from the libav-users mailing list archive at Nabble.com.


More information about the Libav-user mailing list