Here is the output from gdb
Program received signal SIGSEGV, Segmentation fault.
ff_set_qscale (s=0xa5113d0, qscale=<value optimized out>)
at libavcodec/mpegvideo.c:2356
2356 s->y_dc_scale= s->y_dc_scale_table[ qscale ];
Current language: auto; currently c
(gdb) backtrace
#0 ff_set_qscale (s=0xa5113d0, qscale=<value optimized out>)
at libavcodec/mpegvideo.c:2356
#1 0x0814a385 in encode_thread (c=0xa511020, arg=0xa5114a4)
at libavcodec/mpegvideo_enc.c:2060
#2 0x080dbbda in avcodec_default_execute (c=0xa511020,
func=0x8149fd0 <encode_thread>, arg=0xa5114a4, ret=0x0, count=1, size=4)
at libavcodec/utils.c:411
#3 0x081340bf in MPV_encode_picture (avctx=0xa511020, buf=0xb7b04008 "",
buf_size=829440, data=0xa559a90) at libavcodec/mpegvideo_enc.c:2923
#4 0x080dd790 in avcodec_encode_video (avctx=0xa511020, buf=0xb7b04008 "",
buf_size=829440, pict=0xa559a90) at libavcodec/utils.c:527
#5 0x0804a310 in main () at ffmpeg-test2.cpp:175
I tried to rebuild with --disable-optimizations with the hope that it may
then show me the value of qscale but it would not build.
Let me know what you think
Thanks
Matt
2009/6/16 Baptiste Coudurier <[email protected]>
> Hi,
>
> On 6/16/2009 8:36 AM, Matthew Hallin wrote:
> > I am new to ffmpeg and am trying to encode to MPEG2 D10
> > I am using revision 19203.
> > I found the following on the web, and if I run it it creates the output
> file
> > no problem.
> >
> > ffmpeg -i t:\temp\pal-YUY2.mov -vcodec mpeg2video -r 25 -pix_fmt yuv422p
> > -minrate 50000k -maxrate 50000k -b 50000k -intra -flags +ildct+low_delay
> -dc
> > 10 -flags2 +ivlc+non_linear_q -ps 1 -qmin 1 -qmax 3 -top 1 -bufsize
> 2000000
> > -rc_init_occupancy 2000000 -rc_buf_aggressivity 0.25 -loglevel 48 -an
> > t:\temp\output.m2v
> >
> > Trouble is when I do what I think is the same thing from my code it
> crashes
> > when I call avcodec_encode_video
> > My AVCodecContext parameters are below:
> >
> > pContext->bit_rate = 50000000;
> > pContext->time_base.num = 1;
> > pContext->time_base.den = 25;
> > pContext->width = 720;
> > pContext->height = 576;
> > pContext->gop_size = 0;
> > pContext->pix_fmt = PIX_FMT_YUV422P;
> > pContext->flags = CODEC_FLAG_LOW_DELAY | CODEC_FLAG_INTERLACED_DCT;
> > pContext->flags2 = CODEC_FLAG2_INTRA_VLC | CODEC_FLAG2_NON_LINEAR_QUANT;
> > pContext->qmax = 3;
> > pContext->qmin = 1;
> > pContext->rtp_payload_size = 1;
> > pContext->rc_max_rate = pContext->bit_rate;
> > pContext->rc_min_rate = pContext->bit_rate;
> > pContext->intra_dc_precision = 10;
> > pContext->rc_buffer_size = 2000000;
> > pContext->rc_initial_buffer_occupancy = pContext->rc_buffer_size;
> >
> > I have set the log level to AV_LOG_DEBUG and see no errors in my calls to
> > the previous av functions
> > Any idea what I am doing wrong?
>
> Not really, did you call avcodec_get_context_defaults2 ?
> Otherwise if you can supply gdb output it would be easier to find out
> where the crash happens, if it happens in libavcodec.
>
> --
> Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
> Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> FFmpeg maintainer http://www.ffmpeg.org
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>
--
Gee Broadcast Systems
Telephone: +44 1256 810123
Web: www.geebroadcast.co.uk
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user