FFMPEG av_interleaved_write_frame (): operation not allowed

Good. I get an av_interleaved_write_frame (): Operation not allowed 'error when trying to encode a MOV file. First, I need to outline the conditions behind it.

I encode 12 different files of different resolution sizes and types of formats through a PHP script that runs on cron. It basically captures a 250 MB MOV file and encodes it in 4 different frame sizes, such as MOV, MP4 and WMV files.

Now the script takes 10 minutes to run and encode each of the files for the 250 MB input file. I output the processing time and as soon as the time on the script falls to 10mins FFMPEG falls and returns "av_interleaved_write_frame (): operation not allowed" for the current encoded file and all other remaining files are not yet encoded.

If the input videos are 150 MB, the total execution time of the script is less than 10 minutes, so it encodes all the videos in order. Also, if I run the FFMPEG command in a separate file that it could not execute for the 250mb file, it does not encode the file without problems.

From research to the error "av_interleaved_write_frame ()", it seems that this is due to timestamps, which, as I understand it, are input files. But, saying that this is not like my instance, because I can encode the file without problems if I do it individually.

Ffmpeg example command

ffmpeg -i GVowbt3vsrXL.mov -s 1920x1080 -sameq -vf "unsharp" -y GVowbt3vsrXL_4.wmv 

Error outputting a failed file for 10 minutes. Remember that there is no problem with the command if I run it on my own only when the script hits 10mins.

 'output' => array ( 0 => 'FFmpeg version SVN-r24545, Copyright (c) 2000-2010 the FFmpeg developers', 1 => ' built on Aug 20 2010 23:32:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)', 2 => ' configuration: --enable-shared --enable-gpl --enable-pthreads --enable-nonfree --cpu=opteron --extra-cflags=\'-O3 -march=opteron -mtune=opteron\' --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-avfilter --enable-filter=movie --enable-avfilter-lavf --enable-swscale', 3 => ' libavutil 50.23. 0 / 50.23. 0', 4 => ' libavcore 0. 1. 0 / 0. 1. 0', 5 => ' libavcodec 52.84. 1 / 52.84. 1', 6 => ' libavformat 52.77. 0 / 52.77. 0', 7 => ' libavdevice 52. 2. 0 / 52. 2. 0', 8 => ' libavfilter 1.26. 1 / 1.26. 1', 9 => ' libswscale 0.11. 0 / 0.11. 0', 10 => 'Input #0, mov,mp4,m4a,3gp,3g2,mj2, from \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL.mov\':', 11 => ' Metadata:', 12 => ' major_brand : qt', 13 => ' minor_version : 537199360', 14 => ' compatible_brands: qt', 15 => ' Duration: 00:00:20.00, start: 0.000000, bitrate: 110802 kb/s', 16 => ' Stream #0.0(eng): Video: mjpeg, yuvj422p, 1920x1080 [PAR 72:72 DAR 16:9], 109386 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc', 17 => ' Stream #0.1(eng): Audio: pcm_s16be, 44100 Hz, 2 channels, s16, 1411 kb/s', 18 => '[buffer @ 0xdcd0e0] w:1920 h:1080 pixfmt:yuvj422p', 19 => '[unsharp @ 0xe00280] auto-inserting filter \'auto-inserted scaler 0\' between the filter \'src\' and the filter \'Filter 0 unsharp\'', 20 => '[scale @ 0xe005b0] w:1920 h:1080 fmt:yuvj422p -> w:1920 h:1080 fmt:yuv420p flags:0xa0000004', 21 => '[unsharp @ 0xe00280] effect:sharpen type:luma msize_x:5 msize_y:5 amount:1.00', 22 => '[unsharp @ 0xe00280] effect:none type:chroma msize_x:0 msize_y:0 amount:0.00', 23 => 'Output #0, asf, to \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL_4.wmv\':', 24 => ' Metadata:', 25 => ' WM/EncodingSettings: Lavf52.77.0', 26 => ' Stream #0.0(eng): Video: msmpeg4, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 1k tbn, 25 tbc', 27 => ' Stream #0.1(eng): Audio: libmp3lame, 44100 Hz, 2 channels, s16, 64 kb/s', 28 => 'Stream mapping:', 29 => ' Stream #0.0 -> #0.0', 30 => ' Stream #0.1 -> #0.1', 31 => 'Press [q] to stop encoding', 32 => '[msmpeg4 @ 0xdccb50] warning, clipping 1 dct coefficients to -127..127', 

Then these are errors

 frame= 75 fps= 5 q=1.0 size= 12704kB time=2.90 bitrate=3588 6.0kbits av_interleaved_write_frame(): Operation not permitted', ) 

Has anyone encountered such a problem before? This seems to be related to timestamps, but only because the script runs for a longer time than 10 minutes. This may be related to the PHP / Apache configuration, but I don't know if this is FFMPEG or if this is the server configuration I should be looking at.

+4
source share
2 answers

One trivially solved reason for this problem (if you found this question while searching for this problem, like me), is when the section that you are trying to write to the file is full. Make sure you have enough free space to write the file. On linux / unix, it's as simple as running

 $ df -h 

To solve, just free up enough space by moving files to another partition, deleting unnecessary files and emptying the trash.

+1
source

this patch (linked to page 807 of the ffmpeg page) solved the problem for me to transcode the video and copy the audio from the live captured FLV file to the avi file:

https://roundup.ffmpeg.org/file1098/utils.c.patch

0
source

All Articles