Reputation: 219
this my code . after running php code
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --enable-libamr-nb --enable-libamr-wb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-x11grab
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 6 2009 19:05:03, gcc: 4.1.2 20080704 (Red Hat 4.1.2-46)
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Input #0, flv, from 'demo.flv':
Duration: 00:00:30.83, start: 0.000000, bitrate: 546 kb/s
Stream #0.0: Video: h264, yuv420p, 640x360 [PAR 1:1 DAR 16:9], 546 kb/s, 25 tbr, 1k tbn, 50 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16
Output #0, image2, to 'demo.jpg':
Stream #0.0: Video: mjpeg, yuvj420p, 640x360 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 1 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
av_interleaved_write_frame(): I/O error occurred
Usually that means that input file is truncated and/or corrupted.
Upvotes: 5
Views: 31005
Reputation: 1
In my case, this error occurred due to the file name being too long.
Upvotes: 0
Reputation: 9013
This can occur when there is insufficient disk space to write the file.
Upvotes: 0
Reputation: 10896
I got this error when I accidentally did this
ffmpeg -i vid.mp4 '%05.jpg'
instead of the following
ffmpeg -i vid.mp4 '%05d.jpg'
which is the correct format for sequential filenames (note the added d
).
Upvotes: 4
Reputation: 305
You have to first make a directory to store the files extracted by ffpmeg, since ffmpeg does not have the right to make directories.
Upvotes: 1
Reputation: 484
I've come to the same error message and have found my (silly) mistake.
As silly as I was trying FFMPEG to create a new directory. Got the error message. Read here. Created the folder myself. Re-run the command prompt and voilà, no more error messages.
The silliest mistake on earth. Just in case someone gets the same error.
Upvotes: 17
Reputation: 449425
av_interleaved_write_frame(): I/O error occurred Usually that means that input file is truncated and/or corrupted.
Isn't that a clear enough error message? Have you tried with a different input file?
Update: It could be that your PHP script doesn't have the necessary rights to read the file. Try setting the file's permissions to 777
to see whether that's the reason.
Upvotes: 1