[FFmpeg-user] av_interleaved_write_frame - operation not permitted

John Klimek jklimek at gmail.com
Fri Apr 29 16:59:07 CEST 2011


I'm trying to stream some video to my iPhone (using FFmpeg and an open
source HTTP segmenter) and FFmpeg is giving an error:

av_interleaved_write_frame(): Operation not permitted

I've done some research and it seems like this appears because of
invalid timestamps but I'm a bit confused because this file does
playback in every media player just fine.

The script I'm using (iStreamdev) to execute FFmpeg starts up like this:

(trap "rm -f ./ffmpeg.pid; rm -f ./fifo" EXIT HUP INT TERM ABRT; \
 $FFMPEGPREFIX | $FFPATH -i "$STREAM" -deinterlace -f mpegts -acodec
libmp3lame -ab $ARATE -ac 2 -s $XY -vcodec libx264 -b $VRATE -flags
+loop \
 -cmp \+chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5
-trellis 1 -refs 1 -coder 0 -me_range 16  -keyint_min 25 \
 -sc_threshold 40 -i_qfactor 0.71 -bt $VRATE -maxrate $VRATE -bufsize
$VRATE -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 \
 -qmin 10 -qmax 51 -qdiff 4 -level 30  -g 30 -async 2 -threads 4 -
2>$FFMPEGLOG 1>./fifo) &


Here is my FFmpeg log:

ffmpeg version git-N-29391-gd84f191, Copyright (c) 2000-2011 the
FFmpeg developers
  built on Apr 27 2011 09:52:06 with gcc 4.4.5
  configuration: --enable-gpl --enable-version3 --enable-nonfree
--enable-postproc --enable-libfaac --enable-libmp3lame --enable-libop
encore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
--ena
ble-libvpx --disable-vaapi
  libavutil    51.  0. 0 / 51.  0. 0
  libavcodec   53.  1. 0 / 53.  1. 0
  libavformat  53.  0. 3 / 53.  0. 3
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  0. 0 /  2.  0. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[h264 @ 0x18a7df0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x18a7df0] number of reference frames exceeds max (probably
corrupt input), discarding one
[mpegts @ 0x18a2b70] max_analyze_duration reached
[mpegts @ 0x18a2b70] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate:
59.94 (60000/1001) -> 59.94 (60000/1001)
Input #0, mpegts, from 'pipe:':
  Duration: N/A, start: 61552.826133, bitrate: 384 kb/s
  Program 132
    Stream #0.0[0x1122]: Video: h264 (High), yuv420p, 1440x1080 [PAR
4:3 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0.1[0x1123](eng): Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
[buffer @ 0x18a62b0] w:1440 h:1080 pixfmt:yuv420p
[scale @ 0x18cf3a0] w:1440 h:1080 fmt:yuv420p -> w:408 h:272
fmt:yuv420p flags:0xa0000004
[libx264 @ 0x18a6720] using SAR=4/3
[libx264 @ 0x18a6720] using cpu capabilities: MMX2 SSE2Fast
FastShuffle SSEMisalign LZCNT
[libx264 @ 0x18a6720] profile Constrained Baseline, level 3.0
[mpegts @ 0x18aa6d0] muxrate VBR, pcr every 5 pkts, sdt every 200,
pat/pmt every 40 pkts
Output #0, mpegts, to 'pipe:':
  Metadata:
    encoder         : Lavf53.0.3
    Stream #0.0: Video: libx264, yuv420p, 408x272 [PAR 4:3 DAR 2:1],
q=10-51, 350 kb/s, 90k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: libmp3lame, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[h264 @ 0x18a7df0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x18a7df0] number of reference frames exceeds max (probably
corrupt input), discarding one
frame=   82 fps=  0 q=38.0 size=      41kB time=0.60 bitrate=
559.0kbits/s dup=64 drop=0    ^Mframe=  124 fps=120 q=36.0 size=
77kB time=1.22 bitrate= 516.1kbits/s dup=85 drop=0    ^Mframe=  166
fps=108 q=36.0 size=     123kB time=1.85 bitrate= 546.9kbits/s dup=106
drop=0    ^Mframe=  206 fps=100 q=36.0 size=     175kB time=2.64
bitrate= 544.1kbits/s dup=126 drop=0    ^Mframe=  246 fps= 96 q=36.0
size=     220kB time=3.35 bitrate= 537.8kbits/s dup=146 drop=0
^Mframe=  286 fps= 93 q=37.0 size=     273kB time=4.02 bitrate=
555.9kbits/s dup=166 drop=0    ^Mframe=  328 fps= 92 q=37.0 size=
310kB time=4.72 bitrate= 537.7kbits/s dup=187 drop=0
^Mav_interleaved_write_frame(): Operation not permitted


More information about the ffmpeg-user mailing list