我正在使用popen
来执行命令,问题是我在脚本执行时只在开始时立即输出(条目在我的数据库中),并且在完成后没有任何意义我。我试图得到它,以便在popen
进程工作时,输入不断进入我的数据库。有人有什么想法吗?
$handle = popen ('/usr/local/bin/ffmpeg -i /home/g/Desktop/cave.wmv ' .
'-deinterlace -acodec libfaac -ab 96k -ar 44100 -vcodec libx264 ' .
'-s 480x320 -f flv /home/g/Desktop/file.flv 2>&1', 'r');
if ($handle) {
echo 'after handle if <br>';
while(! feof ($handle)) {
echo 'after handle while <br>';
echo $read = fgets ($handle);
echo 'after read <br>';
$sql = 'INSERT INTO video (timestamp, vid_id, file_name, ' .
'uploader, title, subject_id, status) VALUES(?,?,?,?,?,?,?)';
$stmt3 = $conn->prepare($sql);
echo 'after stmt3 <br>';
$result = $stmt3->execute(array('','',$read,'','untitled','',0))
or die(print_r($db->errorInfo(), true));
print "after execute " . $result . "<br>";
if (!$result) {
echo "\nPDO::errorInfo():\n";
print_r($dbh->errorInfo());
}
}
pclose ($handle);
}
输出为:
after handle if
after handle while
ffmpeg version git-N-30561-g6700aa8, Copyright (c) 2000-2011 the FFmpeg developers after read
after stmt3
after execute 1
after handle while
built on Jun 5 2011 21:10:26 with gcc 4.5.2 after read
after stmt3
after execute 1
after handle while
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab after read
after stmt3
after execute 1
after handle while
libavutil 51. 4. 0 / 51. 4. 0 after read
after stmt3
after execute 1
after handle while
libavcodec 53. 6. 1 / 53. 6. 1 after read
after stmt3
after execute 1
after handle while
libavformat 53. 2. 0 / 53. 2. 0 after read
after stmt3
after execute 1
after handle while
libavdevice 53. 1. 1 / 53. 1. 1 after read
after stmt3
after execute 1
after handle while
libavfilter 2. 13. 0 / 2. 13. 0 after read
after stmt3
after execute 1
after handle while
libswscale 0. 14. 1 / 0. 14. 1 after read
after stmt3
after execute 1
after handle while
libpostproc 51. 2. 0 / 51. 2. 0 after read
after stmt3
after execute 1
after handle while
after read
after stmt3
after execute 1
after handle while
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001) after read
after stmt3
after execute 1
after handle while
Input #0, asf, from '/home/geoff/Desktop/cave.wmv': after read
after stmt3
after execute 1
after handle while
Metadata: after read
after stmt3
after execute 1
after handle while
WMFSDKVersion : 11.0.5721.5145 after read
after stmt3
after execute 1
after handle while
WMFSDKNeeded : 0.0.0.0000 after read
after stmt3
after execute 1
after handle while
IsVBR : 0 after read
after stmt3
after execute 1
after handle while
Duration: 00:01:37.93, bitrate: 263 kb/s after read
after stmt3
after execute 1
after handle while
Stream #0.0(eng): Video: vc1 (Advanced), yuv420p, 320x240, 256 kb/s, PAR 1:1 DAR 4:3, 29.97 tbr, 1k tbn, 1k tbc after read
after stmt3
after execute 1
after handle while
[buffer @ 0xa16c200] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: after read
after stmt3
after execute 1
after handle while
[scale @ 0xa17a120] w:320 h:240 fmt:yuv420p -> w:480 h:320 fmt:yuv420p flags:0x4 after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] Default settings detected, using medium profile after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] using SAR=1/1 after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle Cache64 after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] profile High, level 2.1 after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] 264 - core 115 r1995 c1e60b9 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 after read
after stmt3
after execute 1
after handle while
Output #0, flv, to '/home/geoff/Desktop/file.flv': after read
after stmt3
after execute 1
after handle while
Metadata: after read
after stmt3
after execute 1
after handle while
WMFSDKVersion : 11.0.5721.5145 after read
after stmt3
after execute 1
after handle while
WMFSDKNeeded : 0.0.0.0000 after read
after stmt3
after execute 1
after handle while
IsVBR : 0 after read
after stmt3
after execute 1
after handle while
encoder : Lavf53.2.0 after read
after stmt3
after execute 1
after handle while
Stream #0.0(eng): Video: libx264, yuv420p, 480x320 [PAR 1:1 DAR 3:2], q=2-31, 200 kb/s, 1k tbn, 29.97 tbc after read
after stmt3
after execute 1
after handle while
Stream mapping: after read
after stmt3
after execute 1
after handle while
Stream #0.0 -> #0.0 after read
after stmt3
after execute 1
after handle while
Press [q] to stop, [?] for help after read
after stmt3
after execute 1
after handle while
//////////// NOT ENTERED////////// frame= 53 fps= 0 q=29.0 size= 22kB time=00:00:00.36 bitrate= 481.4kbits/s frame= 69 fps= 68 q=29.0 size= 47kB time=00:00:00.90 bitrate= 424.4kbits/s frame= 87 fps= 57 q=29.0 size= 70kB time=00:00:01.50 bitrate= 380.1kbits/s frame= 107 fps= 52 q=29.0 size= 94kB time=00:00:02.16 bitrate= 356.1kbits/s frame= 126 fps= 50 q=29.0 size= 113kB time=00:00:02.80 bitrate= 329.9kbits/s frame= 148 fps= 49 q=29.0 size= 133kB time=00:00:03.53 bitrate= 307.5kbits/s frame= 166 fps= 47 q=29.0 size= 150kB time=00:00:04.13 bitrate= 297.9kbits/s frame= 181 fps= 45 q=29.0 size= 167kB time=00:00:04.63 bitrate= 295.7kbits/s frame= 197 fps= 43 q=29.0 size= 192kB time=00:00:05.17 bitrate= 303.5kbits/s frame= 215 fps= 42 q=29.0 size= 219kB time=00:00:05.77 bitrate= 310.7kbits/s frame= 236 fps= 42 q=29.0 size= 242kB time=00:00:06.47 bitrate= 306.0kbits/s frame= 256 fps= 42 q=29.0 size= 268kB time=00:00:07.14 bitrate= 307.7kbits/s frame= 278 fps= 42 q=29.0 size= 293kB time=00:00:07.87 bitrate= 305.1kbits/s frame= 303 fps= 42 q=29.0 size= 323kB time=00:00:08.70 bitrate= 304.2kbits/s frame= 327 fps= 43 q=29.0 size= 343kB time=00:00:09.50 bitrate= 295.9kbits/s frame= 345 fps= 42 q=29.0 size= 370kB time=00:00:10.11 bitrate= 300.0kbits/s frame= 364 fps= 42 q=29.0 size= 392kB time=00:00:10.74 bitrate= 298.9kbits/s frame= 382 fps= 41 q=29.0 size= 414kB time=00:00:11.34 bitrate= 298.8kbits/s frame= 397 fps= 41 q=29.0 size= 440kB time=00:00:11.84 bitrate= 304.2kbits/s frame= 415 fps= 41 q=29.0 size= 463kB time=00:00:12.44 bitrate= 304.9kbits/s frame= 432 fps= 40 q=29.0 size= 489kB time=00:00:13.01 bitrate= 307.7kbits/s frame= 451 fps= 40 q=29.0 size= 513kB time=00:00:13.64 bitrate= 307.9kbits/s frame= 471 fps= 40 q=29.0 size= 534kB time=00:00:14.31 bitrate= 305.7kbits/s frame= 492 fps= 40 q=29.0 size= 556kB time=00:00:15.01 bitrate= 303.4kbits/s frame= 510 fps= 40 q=29.0 size= 596kB time=00:00:15.61 bitrate= 312.8kbits/s frame= 528 fps= 40 q=29.0 size= 620kB time=00:00:16.21 bitrate= 313.3kbits/s frame= 548 fps= 40 q=29.0 size= 644kB time=00:00:16.88 bitrate= 312.5kbits/s frame= 565 fps= 39 q=29.0 size= 680kB time=00:00:17.45 bitrate= 319.3kbits/s frame= 583 fps= 39 q=29.0 size= 713kB time=00:00:18.05 bitrate= 323.4kbits/s frame= 601 fps= 39 q=29.0 size= 743kB time=00:00:18.65 bitrate= 326.3kbits/s frame= 618 fps= 39 q=29.0 size= 770kB time=00:00:19.22 bitrate= 328.1kbits/s frame= 637 fps= 39 q=29.0 size= 795kB time=00:00:19.85 bitrate= 328.0kbits/s frame= 655 fps= 39 q=29.0 size= 823kB time=00:00:20.45 bitrate= 329.8kbits/s frame= 676 fps= 39 q=29.0 size= 850kB time=00:00:21.15 bitrate= 329.0kbits/s frame= 694 fps= 39 q=29.0 size= 877kB time=00:00:21.75 bitrate= 330.1kbits/s frame= 712 fps= 39 q=29.0 size= 904kB time=00:00:22.35 bitrate= 331.1kbits/s frame= 728 fps= 38 q=29.0 size= 934kB time=00:00:22.88 bitrate= 334.1kbits/s frame= 746 fps= 38 q=29.0 size= 961kB time=00:00:23.49 bitrate= 335.0kbits/s frame= 762 fps= 38 q=29.0 size= 999kB time=00:00:24.02 bitrate= 340.6kbits/s frame= 779 fps= 38 q=29.0 size= 1019kB time=00:00:24.59 bitrate= 339.3kbits/s frame= 797 fps= 38 q=29.0 size= 1042kB time=00:00:25.19 bitrate= 338.7kbits/s frame= 811 fps= 38 q=29.0 size= 1060kB time=00:00:25.65 bitrate= 338.3kbits/s frame= 829 fps= 38 q=29.0 size= 1086kB time=00:00:26.25 bitrate= 338.8kbits/s frame= 846 fps= 37 q=29.0 size= 1112kB time=00:00:26.82 bitrate= 339.6kbits/s frame= 857 fps= 37 q=29.0 size= 1130kB time=00:00:27.19 bitrate= 340.5kbits/s frame= 874 fps= 37 q=29.0 size= 1156kB time=00:00:27.76 bitrate= 341.2kbits/s frame= 890 fps= 37 q=29.0 size= 1177kB time=00:00:28.29 bitrate= 340.8kbits/s frame= 901 fps= 36 q=29.0 size= 1196kB time=00:00:28.66 bitrate= 341.9kbits/s frame= 912 fps= 36 q=29.0 size= 1215kB time=00:00:29.02 bitrate= 342.9kbits/s frame= 927 fps= 36 q=29.0 size= 1236kB time=00:00:29.52 bitrate= 342.8kbits/s frame= 941 fps= 36 q=29.0 size= 1268kB time=00:00:29.99 bitrate= 346.4kbits/s frame= 953 fps= 36 q=29.0 size= 1299kB time=00:00:30.39 bitrate= 350.1kbits/s frame= 965 fps= 35 q=29.0 size= 1327kB time=00:00:30.79 bitrate= 353.0kbits/s frame= 976 fps= 35 q=29.0 size= 1348kB time=00:00:31.16 bitrate= 354.4kbits/s frame= 985 fps= 35 q=29.0 size= 1366kB time=00:00:31.46 bitrate= 355.8kbits/s frame= 994 fps= 34 q=29.0 size= 1385kB time=00:00:31.76 bitrate= 357.1kbits/s frame= 1010 fps= 34 q=29.0 size= 1427kB time=00:00:32.29 bitrate= 362.0kbits/s frame= 1026 fps= 34 q=29.0 size= 1455kB time=00:00:32.83 bitrate= 363.1kbits/s frame= 1039 fps= 34 q=29.0 size= 1482kB time=00:00:33.26 bitrate= 365.0kbits/s frame= 1048 fps= 34 q=29.0 size= 1502kB time=00:00:33.56 bitrate= 366.6kbits/s frame= 1062 fps= 34 q=29.0 size= 1526kB time=00:00:34.03 bitrate= 367.3kbits/s frame= 1078 fps= 34 q=29.0 size= 1549kB time=00:00:34.56 bitrate= 367.2kbits/s frame= 1092 fps= 34 q=29.0 size= 1574kB time=00:00:35.03 bitrate= 368.0kbits/s frame= 1103 fps= 33 q=29.0 size= 1585kB time=00:00:35.40 bitrate= 366.7kbits/s frame= 1120 fps= 33 q=29.0 size= 1603kB time=00:00:35.97 bitrate= 365.0kbits/s frame= 1136 fps= 33 q=29.0 size= 1630kB time=00:00:36.50 bitrate= 365.7kbits/s frame= 1144 fps= 33 q=29.0 size= 1646kB time=00:00:36.77 bitrate= 366.7kbits/s frame= 1155 fps= 33 q=29.0 size= 1665kB time=00:00:37.13 bitrate= 367.2kbits/s frame= 1168 fps= 33 q=29.0 size= 1688kB time=00:00:37.57 bitrate= 368.1kbits/s frame= 1179 fps= 33 q=29.0 size= 1705kB time=00:00:37.93 bitrate= 368.2kbits/s frame= 1195 fps= 33 q=29.0 size= 1731kB time=00:00:38.47 bitrate= 368.7kbits/s frame= 1208 fps= 32 q=29.0 size= 1751kB time=00:00:38.90 bitrate= 368.6kbits/s frame= 1225 fps= 32 q=29.0 size= 1776kB time=00:00:39.47 bitrate= 368.6kbits/s frame= 1234 fps= 32 q=29.0 size= 1788kB time=00:00:39.77 bitrate= 368.2kbits/s frame= 1243 fps= 32 q=29.0 size= 1809kB time=00:00:40.07 bitrate= 369.7kbits/s frame= 1256 fps= 32 q=29.0 size= 1835kB time=00:00:40.50 bitrate= 371.1kbits/s frame= 1274 fps= 32 q=29.0 size= 1849kB time=00:00:41.10 bitrate= 368.4kbits/s frame= 1294 fps= 32 q=29.0 size= 1867kB time=00:00:41.77 bitrate= 366.1kbits/s frame= 1313 fps= 32 q=29.0 size= 1891kB time=00:00:42.40 bitrate= 365.3kbits/s frame= 1326 fps= 32 q=29.0 size= 1913kB time=00:00:42.84 bitrate= 365.8kbits/s frame= 1341 fps= 32 q=29.0 size= 1943kB time=00:00:43.34 bitrate= 367.2kbits/s frame= 1353 fps= 32 q=29.0 size= 1966kB time=00:00:43.74 bitrate= 368.2kbits/s frame= 1368 fps= 32 q=29.0 size= 1992kB time=00:00:44.24 bitrate= 368.8kbits/s frame= 1386 fps= 32 q=29.0 size= 2021kB time=00:00:44.84 bitrate= 369.1kbits/s frame= 1403 fps= 32 q=29.0 size= 2050kB time=00:00:45.41 bitrate= 369.8kbits/s frame= 1419 fps= 32 q=29.0 size= 2075kB time=00:00:45.94 bitrate= 370.0kbits/s frame= 1435 fps= 32 q=29.0 size= 2097kB time=00:00:46.47 bitrate= 369.7kbits/s frame= 1451 fps= 32 q=29.0 size= 2118kB time=00:00:47.01 bitrate= 369.0kbits/s frame= 1470 fps= 32 q=29.0 size= 2142kB time=00:00:47.64 bitrate= 368.3kbits/s frame= 1483 fps= 32 q=29.0 size= 2161kB time=00:00:48.08 bitrate= 368.2kbits/s frame= 1499 fps= 32 q=26.0 size= 2201kB time=00:00:48.61 bitrate= 370.8kbits/s frame= 1508 fps= 32 q=29.0 size= 2218kB time=00:00:48.91 bitrate= 371.5kbits/s frame= 1515 fps= 31 q=29.0 size= 2232kB time=00:00:49.14 bitrate= 372.0kbits/s frame= 1532 fps= 31 q=29.0 size= 2265kB time=00:00:49.71 bitrate= 373.2kbits/s frame= 1547 fps= 31 q=29.0 size= 2295kB time=00:00:50.21 bitrate= 374.4kbits/s frame= 1562 fps= 31 q=29.0 size= 2321kB time=00:00:50.71 bitrate= 374.8kbits/s frame= 1575 fps= 31 q=29.0 size= 2343kB time=00:00:51.15 bitrate= 375.2kbits/s frame= 1585 fps= 31 q=29.0 size= 2359kB time=00:00:51.48 bitrate= 375.3kbits/s frame= 1600 fps= 31 q=29.0 size= 2382kB time=00:00:51.98 bitrate= 375.3kbits/s frame= 1609 fps= 31 q=29.0 size= 2396kB time=00:00:52.28 bitrate= 375.5kbits/s frame= 1620 fps= 31 q=29.0 size= 2420kB time=00:00:52.65 bitrate= 376.5kbits/s frame= 1636 fps= 31 q=29.0 size= 2446kB time=00:00:53.18 bitrate= 376.7kbits/s frame= 1654 fps= 31 q=29.0 size= 2474kB time=00:00:53.78 bitrate= 376.8kbits/s frame= 1670 fps= 31 q=29.0 size= 2501kB time=00:00:54.32 bitrate= 377.2kbits/s frame= 1689 fps= 31 q=29.0 size= 2531kB time=00:00:54.95 bitrate= 377.3kbits/s frame= 1705 fps= 31 q=29.0 size= 2566kB time=00:00:55.48 bitrate= 378.9kbits/s frame= 1723 fps= 31 q=29.0 size= 2597kB time=00:00:56.09 bitrate= 379.2kbits/s frame= 1741 fps= 31 q=29.0 size= 2628kB time=00:00:56.69 bitrate= 379.8kbits/s frame= 1757 fps= 31 q=29.0 size= 2670kB time=00:00:57.22 bitrate= 382.2kbits/s frame= 1772 fps= 31 q=29.0 size= 2694kB time=00:00:57.72 bitrate= 382.4kbits/s frame= 1787 fps= 31 q=29.0 size= 2714kB time=00:00:58.22 bitrate= 381.8kbits/s frame= 1802 fps= 31 q=29.0 size= 2738kB time=00:00:58.72 bitrate= 382.0kbits/s frame= 1818 fps= 31 q=29.0 size= 2761kB time=00:00:59.26 bitrate= 381.7kbits/s frame= 1833 fps= 31 q=29.0 size= 2781kB time=00:00:59.75 bitrate= 381.2kbits/s frame= 1848 fps= 31 q=29.0 size= 2805kB time=00:01:00.26 bitrate= 381.3kbits/s frame= 1865 fps= 31 q=29.0 size= 2835kB time=00:01:00.82 bitrate= 381.7kbits/s frame= 1879 fps= 31 q=29.0 size= 2856kB time=00:01:01.29 bitrate= 381.7kbits/s frame= 1895 fps= 31 q=29.0 size= 2874kB time=00:01:01.82 bitrate= 380.8kbits/s frame= 1910 fps= 31 q=29.0 size= 2895kB time=00:01:02.32 bitrate= 380.4kbits/s frame= 1930 fps= 31 q=29.0 size= 2920kB time=00:01:02.99 bitrate= 379.7kbits/s frame= 1953 fps= 31 q=29.0 size= 2946kB time=00:01:03.76 bitrate= 378.4kbits/s frame= 1974 fps= 31 q=29.0 size= 2971kB time=00:01:04.46 bitrate= 377.5kbits/s frame= 1991 fps= 31 q=29.0 size= 3005kB time=00:01:05.03 bitrate= 378.5kbits/s frame= 2010 fps= 31 q=29.0 size= 3050kB time=00:01:05.66 bitrate= 380.5kbits/s frame= 2029 fps= 31 q=29.0 size= 3079kB time=00:01:06.29 bitrate= 380.5kbits/s frame= 2049 fps= 31 q=29.0 size= 3107kB time=00:01:06.96 bitrate= 380.1kbits/s frame= 2067 fps= 31 q=29.0 size= 3136kB time=00:01:07.56 bitrate= 380.2kbits/s frame= 2087 fps= 31 q=29.0 size= 3162kB time=00:01:08.23 bitrate= 379.6kbits/s frame= 2105 fps= 31 q=29.0 size= 3183kB time=00:01:08.83 bitrate= 378.8kbits/s frame= 2126 fps= 31 q=29.0 size= 3209kB time=00:01:09.53 bitrate= 378.0kbits/s frame= 2144 fps= 32 q=29.0 size= 3243kB time=00:01:10.13 bitrate= 378.7kbits/s frame= 2165 fps= 32 q=29.0 size= 3267kB time=00:01:10.83 bitrate= 377.8kbits/s frame= 2182 fps= 32 q=29.0 size= 3293kB time=00:01:11.40 bitrate= 377.8kbits/s frame= 2200 fps= 32 q=29.0 size= 3320kB time=00:01:12.00 bitrate= 377.7kbits/s frame= 2219 fps= 32 q=29.0 size= 3352kB time=00:01:12.64 bitrate= 378.0kbits/s frame= 2239 fps= 32 q=29.0 size= 3383kB time=00:01:13.30 bitrate= 378.1kbits/s frame= 2259 fps= 32 q=29.0 size= 3425kB time=00:01:13.97 bitrate= 379.3kbits/s frame= 2278 fps= 32 q=29.0 size= 3455kB time=00:01:14.60 bitrate= 379.4kbits/s frame= 2298 fps= 32 q=29.0 size= 3491kB time=00:01:15.27 bitrate= 379.9kbits/s frame= 2317 fps= 32 q=29.0 size= 3514kB time=00:01:15.91 bitrate= 379.2kbits/s frame= 2340 fps= 32 q=29.0 size= 3539kB time=00:01:16.67 bitrate= 378.1kbits/s frame= 2358 fps= 32 q=29.0 size= 3562kB time=00:01:17.27 bitrate= 377.6kbits/s frame= 2380 fps= 32 q=29.0 size= 3590kB time=00:01:18.01 bitrate= 377.0kbits/s frame= 2402 fps= 32 q=29.0 size= 3617kB time=00:01:18.74 bitrate= 376.3kbits/s frame= 2426 fps= 32 q=29.0 size= 3639kB time=00:01:19.54 bitrate= 374.8kbits/s frame= 2447 fps= 32 q=29.0 size= 3662kB time=00:01:20.24 bitrate= 373.8kbits/s frame= 2467 fps= 32 q=29.0 size= 3691kB time=00:01:20.91 bitrate= 373.6kbits/s frame= 2486 fps= 32 q=29.0 size= 3721kB time=00:01:21.54 bitrate= 373.8kbits/s frame= 2506 fps= 32 q=29.0 size= 3764kB time=00:01:22.21 bitrate= 375.0kbits/s frame= 2523 fps= 32 q=29.0 size= 3789kB time=00:01:22.78 bitrate= 374.9kbits/s frame= 2541 fps= 32 q=29.0 size= 3824kB time=00:01:23.38 bitrate= 375.7kbits/s frame= 2557 fps= 32 q=29.0 size= 3855kB time=00:01:23.91 bitrate= 376.3kbits/s frame= 2574 fps= 32 q=29.0 size= 3893kB time=00:01:24.48 bitrate= 377.5kbits/s frame= 2590 fps= 32 q=29.0 size= 3928kB time=00:01:25.01 bitrate= 378.5kbits/s frame= 2608 fps= 32 q=29.0 size= 3963kB time=00:01:25.61 bitrate= 379.2kbits/s frame= 2627 fps= 32 q=29.0 size= 3992kB time=00:01:26.25 bitrate= 379.1kbits/s frame= 2648 fps= 32 q=29.0 size= 4023kB time=00:01:26.95 bitrate= 379.0kbits/s frame= 2670 fps= 33 q=29.0 size= 4051kB time=00:01:27.68 bitrate= 378.4kbits/s frame= 2694 fps= 33 q=29.0 size= 4077kB time=00:01:28.48 bitrate= 377.4kbits/s frame= 2712 fps= 33 q=29.0 size= 4106kB time=00:01:29.08 bitrate= 377.6kbits/s frame= 2729 fps= 33 q=29.0 size= 4142kB time=00:01:29.65 bitrate= 378.5kbits/s frame= 2743 fps= 33 q=29.0 size= 4175kB time=00:01:30.12 bitrate= 379.5kbits/s frame= 2763 fps= 33 q=29.0 size= 4215kB time=00:01:30.79 bitrate= 380.3kbits/s frame= 2780 fps= 33 q=29.0 size= 4247kB time=00:01:31.35 bitrate= 380.8kbits/s frame= 2799 fps= 33 q=29.0 size= 4278kB time=00:01:31.99 bitrate= 380.9kbits/s frame= 2818 fps= 33 q=29.0 size= 4307kB time=00:01:32.62 bitrate= 380.9kbits/s frame= 2839 fps= 33 q=29.0 size= 4328kB time=00:01:33.32 bitrate= 379.9kbits/s frame= 2858 fps= 33 q=29.0 size= 4354kB time=00:01:33.96 bitrate= 379.6kbits/s frame= 2875 fps= 33 q=29.0 size= 4384kB time=00:01:34.52 bitrate= 379.9kbits/s frame= 2895 fps= 33 q=29.0 size= 4413kB time=00:01:35.19 bitrate= 379.8kbits/s frame= 2912 fps= 33 q=29.0 size= 4436kB time=00:01:35.76 bitrate= 379.5kbits/s frame= 2933 fps= 33 q=29.0 size= 4463kB time=00:01:36.46 bitrate= 379.0kbits/s frame= 2934 fps= 33 q=29.0 Lsize= 4512kB time=00:01:37.86 bitrate= 377.7kbits/s dup=0 drop=1 after read
////////////////////////////////////////////////////////////////////////
after stmt3
after execute 1
after handle while
video:4454kB audio:0kB global headers:0kB muxing overhead 1.293893% after read
after stmt3
after execute 1
after handle while
frame I:13 Avg QP:19.66 size: 13557 after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] frame P:1221 Avg QP:23.87 size: 2962 after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] frame B:1700 Avg QP:30.26 size: 451 after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] consecutive B-frames: 7.2% 33.5% 39.7% 19.6% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] mb I I16..4: 9.6% 73.3% 17.0% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] mb P I16..4: 0.4% 2.5% 0.4% P16..4: 37.8% 18.9% 8.1% 0.0% 0.0% skip:31.8% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] mb B I16..4: 0.0% 0.1% 0.0% B16..8: 30.9% 1.9% 0.4% direct: 0.9% skip:65.8% L0:30.8% L1:63.8% BI: 5.4% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] 8x8 transform intra:74.5% inter:72.0% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] coded y,uvDC,uvAC intra: 79.7% 84.7% 50.5% inter: 14.2% 13.9% 0.7% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] i16 v,h,dc,p: 60% 18% 4% 18% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 12% 10% 4% 10% 15% 7% 10% 7% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 19% 9% 4% 10% 13% 6% 8% 4% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] i8c dc,h,v,p: 46% 21% 22% 12% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] Weighted P-Frames: Y:0.8% UV:0.4% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] ref P L0: 65.4% 20.8% 10.8% 2.9% 0.0% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] ref B L0: 91.4% 8.0% 0.6% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] ref B L1: 95.6% 4.4% after read
after stmt3
after execute 1
after handle while
[libx264 @ 0xa1797e0] kb/s:372.66 after read
after stmt3
after execute 1
after handle while
after read
after stmt3
after execute 1
答案 0 :(得分:2)
您是否在timestamp
列上有唯一约束(例如主键)?由于PHP time()
函数为您提供了UNIX时间值(分辨率为1秒),因此不允许您快速连续插入记录 - 它们将具有相同的密钥。
我假设的原因是因为你既没有检查execute
的返回值来检测失败,也没有在失败的情况下调用errorInfo
。
即使该唯一约束不是问题,您也应该检查返回值和错误信息。这应该告诉你完全问题是什么。
要尝试的另一件事是在每个行之后临时放置调试print
语句,以跟踪代码中的流程。