我有一个 tube 脚本,我用它上传视频到我的网站很多年了,在我换到另一台有更新程序功能的服务器之前,它一直都运行良好。我遇到了一些问题,我已经设法自己解决了,但它似乎无法解决转换问题。我认为问题出在制作缩略图阶段(但我可能错了)。
执行($config[ffmpeg]。-i“。$videor。”-loglevel debug-an-ss 3-an-r 2-vframes 1-y“。$othumb”);
如您所见,我添加了调试代码来帮助找出问题所在,但目前还没有成功,请帮助和建议。以下是 error.log 文件的输出,可帮助您了解问题所在。
version=syslint libavutil 56. 30.100 / 56. 30.100 libavcodec 58. 53.101 / 58. 53.101 libavformat 58. 28.101 / 58. 28.101 libavdevice 58. 7.100 / 58. 7.100 libavfilter 7. 56.100 / 7. 56.100 libswscale 5. 4.101 / 5. 4.101 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 Splitting the commandline. Reading option '-i' ... matched as input url with argument '/var/www/clients/client0/web9/web/uploads/video/33746.mp4'. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'. Reading option '-ss' ... matched as option 'ss' (set the start time offset) with argument '3'. Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'. Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '2'. Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '1'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '/var/www/clients/client0/web9/web/images/videothumbs/33746-o-%d.jpg' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url /var/www/clients/client0/web9/web/uploads/video/33746.mp4. Successfully parsed a group of options. Opening an input file: /var/www/clients/client0/web9/web/uploads/video/33746.mp4. [NULL @ 0x5601dd4c51c0] Opening '/var/www/clients/client0/web9/web/uploads/video/33746.mp4' for reading [file @ 0x5601dd4c5d00] Setting default whitelist 'file,crypto' [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5601dd4c51c0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5601dd4c51c0] ISO: File Type Major Brand: mp42 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5601dd4c51c0] Unknown dref type 0x206c7275 size 12 Last message repeated 1 times [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5601dd4c51c0] Before avformat_find_stream_info() pos: 102754 bytes read:132306 seeks:0 nb_streams:2 [h264 @ 0x5601dd4c9300] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x5601dd4c9300] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0x5601dd4c9300] nal_unit_type: 5(IDR), nal_ref_idc: 3 [h264 @ 0x5601dd4c9300] Format yuv420p chosen by get_format(). [h264 @ 0x5601dd4c9300] Reinit context to 1280x720, pix_fmt: yuv420p [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5601dd4c51c0] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5601dd4c51c0] After avformat_find_stream_info() pos: 103165 bytes read:132306 seeks:0 frames:23 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/clients/client0/web9/web/uploads/video/33746.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isomavc1mp42 creation_time : 2010-04-20T14:21:17.000000Z Duration: 00:05:10.64, start: 0.000000, bitrate: 2038 kb/s Stream #0:0(und), 22, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2010-04-20T14:21:17.000000Z handler_name : (C) 2007 Google Inc. v08.13.2007. Stream #0:1(und), 1, 1/30000: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 0/1, 1910 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default) Metadata: creation_time : 2010-04-20T14:21:17.000000Z handler_name : (C) 2007 Google Inc. v08.13.2007. Successfully opened the file. Parsing a group of options: output url /var/www/clients/client0/web9/web/images/videothumbs/33746-o-%d.jpg. Applying option an (disable audio) with argument 1. Applying option ss (set the start time offset) with argument 3. Applying option an (disable audio) with argument 1. Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 2. Applying option vframes (set the number of video frames to output) with argument 1. Successfully parsed a group of options. cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [h264 @ 0x5601dd568480] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2 [image2 @ 0x5601dd50dbc0] Opening '/var/www/clients/client0/web9/web/images/videothumbs/33746-o-1.jpg' for writing [file @ 0x5601dd8bad00] Setting default whitelist 'file,crypto' [AVIOContext @ 0x5601dde72bc0] Statistics: 0 seeks, 1 writeouts No more output streams to write to, finishing. frame= 1 fps=0.0 q=6.7 Lsize=N/A time=00:00:00.50 bitrate=N/A speed=0.615x
video:19kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Input file #0 (/var/www/clients/client0/web9/web/uploads/video/33746.mp4): Input stream #0:0 (audio): 22 packets read (198 bytes); Input stream #0:1 (video): 106 packets read (1010764 bytes); 92 frames decoded; Total: 128 packets (1010962 bytes) demuxed Output file #0 (/var/www/clients/client0/web9/web/images/videothumbs/33746-o-%d.jpg): Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (19964 bytes); Total: 1 packets (19964 bytes) muxed 92 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x5601dd4ce100] Statistics: 1148114 bytes read, 1 seeks video:19kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Cannot find HOME directory.