2010-05-07 158 views
0

這是我的代碼。運行PHP代碼FFMpeg錯誤av_interleaved_write_frame():

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. 
+0

它正在正常工作,當我執行控制檯 – rajaneesh 2010-05-07 09:42:27

+0

#ffmpeg -i'demo.flv'-an -ss 00:00:05 -r 1 -vframes 1 -y'demo.jpg' – rajaneesh 2010-05-07 09:43:24

回答

0
av_interleaved_write_frame(): I/O error occurred 
Usually that means that input file is truncated and/or corrupted. 

那是不是足夠清晰的錯誤消息?你有沒有嘗試過不同的輸入文件?

更新:可能是因爲您的PHP腳本沒有必要的權限來讀取文件。嘗試將文件的權限設置爲777以查看是否這是原因。

+0

做完777後我也我得到同樣的錯誤 – rajaneesh 2010-05-07 10:17:44

3

我來到相同的錯誤信息,並發現我(愚蠢)的錯誤。

就像我試圖用FFMPEG創建一個新目錄一樣愚蠢。收到錯誤消息。在這裏閱讀。自己創建文件夾。重新運行命令提示符,並且沒有更多的錯誤消息。

地球上最愚蠢的錯誤。 以防萬一有人得到同樣的錯誤。