[FFmpeg-devel] NUT and no PTS

Luca Abeni lucabe72
Tue Oct 12 09:09:17 CEST 2010


Hi all,

I am seeing problems ("av_interleaved_write_frame(): Operation not permitted"
but this is clearly a bogus message ;-) when muxing NUT files, and I'd like
to fix this issue, but I need some input/suggestions...

In few words, the problem happens when I try to mux an AVPacket having
pts == AV_NOPTS_VALUE (see the end of this email for a way to reproduce
this problem).

The error is due to the check
	    if(pkt->pts < 0)
	        return -1;
at line 637 of nutenc.c, which is triggered by AV_NOPTS_VALUE.
So, my questions:
1) Is this a bug, or I am not supposed to pass  AV_NOPTS_VALUE as pts?
    (other formats, such as MPEG TS, do not show this problem)
2) If this is a bug, what would be the correct fix? I am willing to
    do some debugging and coding (I need NUT to work for some tests :),
    but I need to know what the theoretical behaviour should be, here...


A possible way to reproduce the issue:
	make libavformat/output-example
	libavformat/output-example test.avi
	./ffmpeg -i test.avi test.mpg
	./ffmpeg -i test.mpg -vcodec copy test.nut
FFmpeg version SVN-r25446, Copyright (c) 2000-2010 the FFmpeg developers
   built on Oct 12 2010 08:48:19 with gcc 4.4.3
   configuration:
   libavutil     50.32. 3 / 50.32. 3
   libavcore      0. 9. 1 /  0. 9. 1
   libavcodec    52.92. 0 / 52.92. 0
   libavformat   52.81. 0 / 52.81. 0
   libavdevice   52. 2. 2 / 52. 2. 2
   libavfilter    1.50. 1 /  1.50. 1
   libswscale     0.12. 0 /  0.12. 0
Input #0, mpeg, from 'test.mpg':
   Duration: 00:00:04.96, start: 0.500000, bitrate: 426 kb/s
     Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
     Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, 2 channels, s16, 64 kb/s
Output #0, nut, to 'test.nut':
   Metadata:
     encoder         : Lavf52.81.0
     Stream #0.0: Video: mpeg1video, yuv420p, 352x288 [PAR 1:1 DAR 11:9], q=2-31, 104857 kb/s, 25 tbn, 25 tbc
     Stream #0.1: Audio: mp2, 44100 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
Press [q] to stop encoding
av_interleaved_write_frame(): Operation not permitted

If I use "test.ts" instead of "test.nut", it works...


			Thanks,
				Luca



More information about the ffmpeg-devel mailing list