php - 带有 FFMPEG 的 Laravel Process() 对任何甚至很大的视频都会超时

标签 php laravel symfony ffmpeg

我正在创建一个允许用户上传视频文件的应用程序,一旦他们这样做,它将把它们全部转换为 .mp4(它会做一些其他的事情,但是由于代码的第一部分在它有机会到达另一个之前就被破坏了东西,每个过程都非常相似,让我们讨论这个问题)。

一旦用户提交,它就会被发送到 GameController@store。下面是来自 Controller 的代码示例(不断发送给我的有问题的代码示例):

$process = new Process(env('APP_FFMPEG', 'ffmpeg') . ' -i ' . $fileURL . ' -f mp4 -vcodec libx264 -preset medium -profile:v main -c:a aac -movflags +faststart ' . $newFileName . ' -hide_banner');
              $process->setTimeout(360);
              $process->setIdleTimeout(60);
              $process->run();
              if (!$process->isSuccessful()) {
                throw new ProcessFailedException($process);
              }

我正在使用 Symfony Process() 类来运行 FFMpeg 转换。奇怪的是,当我用 1 秒或 2 秒的视频运行它时,一切顺利。对我来说,这排除了路径问题、权限问题等问题。多种文件类型都可以使用,只要它们非常短。一旦我放入一个甚至大约 1 分钟的视频,它就会返回:
The process "/usr/local/bin/ffmpeg -i http://localhost/storage/team_1_folder/game_26/team_1_game_26_vid_1.mp4 -f mp4 -vcodec libx264 -preset medium -profile:v main -c:a aac -movflags +faststart storage/team_1_folder/game_26/convertedVideo_1.mp4 -hide_banner" exceeded the timeout of 360 seconds.

现在,请注意它显示“超时 360 秒”。那是因为我还编辑了所有可能的超时约束,以及我能想到的文件大小约束。这是我所做的:

-更改了 php.ini(在我的 MAMP 安装中)值:
--max_execution_time = 300(默认为 30)
--memory_limit = 1280M(默认为 128)
--post_max_size = 800M
--upload_max_filesize = 3200M
-max_input_time=300

- 在 GameController 中(上面的代码)
--$process->setTimeout(360);
--$process->setTimeout(360);

毕竟,对于一个大文件,这个东西会在我设置的 timeout 东西上停止 6 分钟,然后发送一个错误。 FFmpeg 只是停滞不前,还是这是一个流程问题?谁知道。围绕这些事情的错误只是非常模糊。

我标记了 Laravel、PHP 和 FFmpeg,希望有人能认识到这个问题。我知道 Process() 正在向我发送错误,但由于它正在向我发送超时,我不知道出了什么问题。

我不排除任何事情,所以给我一些想法,甚至是疯狂的想法!

编辑
这是 -report 的输出。我剪掉了其中的一部分,因为结尾部分变得重复并且实际上是 1000 行:
ffmpeg started on 2019-06-24 at 18:50:23
Report written to "ffmpeg-20190624-185023.log"
Command line:
/usr/local/bin/ffmpeg -i http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4 -f mp4 -vcodec libx264 -preset medium -profile:v main -c:a aac -movflags +faststart storage/team_1_folder/game_31/convertedVideo_1.mp4 -report
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'medium'.
Reading option '-profile:v' ... matched as option 'profile' (set profile) with argument 'main'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'aac'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument '+faststart'.
Reading option 'storage/team_1_folder/game_31/convertedVideo_1.mp4' ... matched as output url.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4.
Successfully parsed a group of options.
Opening an input file: http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4.
[NULL @ 0x7f9ad480ae00] Opening 'http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4' for reading
[http @ 0x7f9ad3c6b540] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x7f9ad3e00400] Original list of addresses:
[tcp @ 0x7f9ad3e00400] Address ::1 port 80
[tcp @ 0x7f9ad3e00400] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3e00400] Interleaved list of addresses:
[tcp @ 0x7f9ad3e00400] Address ::1 port 80
[tcp @ 0x7f9ad3e00400] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3e00400] Starting connection attempt to ::1 port 80
[tcp @ 0x7f9ad3e00400] Successfully connected to ::1 port 80
[http @ 0x7f9ad3c6b540] request: GET /storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4 HTTP/1.1
User-Agent: Lavf/58.20.100
Accept: */*
Range: bytes=0-
Connection: close
Host: localhost
Icy-MetaData: 1


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] ISO: File Type Major Brand: isom
[tcp @ 0x7f9ad3c6b840] Original list of addresses:
[tcp @ 0x7f9ad3c6b840] Address ::1 port 80
[tcp @ 0x7f9ad3c6b840] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3c6b840] Interleaved list of addresses:
[tcp @ 0x7f9ad3c6b840] Address ::1 port 80
[tcp @ 0x7f9ad3c6b840] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3c6b840] Starting connection attempt to ::1 port 80
[tcp @ 0x7f9ad3c6b840] Successfully connected to ::1 port 80
[http @ 0x7f9ad3c6b540] request: GET /storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4 HTTP/1.1
User-Agent: Lavf/58.20.100
Accept: */*
Range: bytes=170169585-
Connection: close
Host: localhost
Icy-MetaData: 1


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Processing st: 0, edit list 0 - media time: 0, duration: 10584600
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 0 ctts: 0, ctts_index: 0, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 1 ctts: 4002, ctts_index: 1, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 1000 ctts: 0, ctts_index: 2, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 2001 ctts: 0, ctts_index: 3, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 3002 ctts: 0, ctts_index: 4, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 4003 ctts: 4004, ctts_index: 5, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 5004 ctts: 0, ctts_index: 6, ctts_count: 10575

编辑 2
我也在底部发现了这个:
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 10582571 ctts: 0, ctts_index: 10573, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 10583572 ctts: 1001, ctts_index: 10574, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Setting codecpar->delay to 1 for stream st: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Processing st: 1, edit list 0 - media time: 0, duration: 15563816
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Before avformat_find_stream_info() pos: 170509020 bytes read:372203 seeks:1 nb_streams:2
[h264 @ 0x7f9ad4811200] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f9ad4811200] nal_unit_type: 8(PPS), nal_ref_idc: 3
[tcp @ 0x7f9ad3c72d40] Original list of addresses:
[tcp @ 0x7f9ad3c72d40] Address ::1 port 80
[tcp @ 0x7f9ad3c72d40] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3c72d40] Interleaved list of addresses:
[tcp @ 0x7f9ad3c72d40] Address ::1 port 80
[tcp @ 0x7f9ad3c72d40] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3c72d40] Starting connection attempt to ::1 port 80
[tcp @ 0x7f9ad3c72d40] Successfully connected to ::1 port 80
[http @ 0x7f9ad3c6b540] request: GET /storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4 HTTP/1.1
User-Agent: Lavf/58.20.100
Accept: */*
Range: bytes=48-
Connection: close
Host: localhost
Icy-MetaData: 1


[h264 @ 0x7f9ad4811200] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7f9ad4811200] Format yuv420p chosen by get_format().
[h264 @ 0x7f9ad4811200] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f9ad4811200] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] After avformat_find_stream_info() pos: 308454 bytes read:680609 seeks:2 frames:2
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
  Duration: 00:05:52.92, start: 0.000000, bitrate: 3865 kb/s
    Stream #0:0(und), 1, 1/30000: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 3730 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Successfully opened the file.
Parsing a group of options: output url storage/team_1_folder/game_31/convertedVideo_1.mp4.
Applying option f (force format) with argument mp4.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option profile:v (set profile) with argument main.
Applying option c:a (codec name) with argument aac.
Successfully parsed a group of options.
Opening an output file: storage/team_1_folder/game_31/convertedVideo_1.mp4.
[file @ 0x7f9ad3f02740] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
[h264 @ 0x7f9ad5813a00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f9ad5813a00] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] Setting 'time_base' to value '1/44100'
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] Setting 'sample_rate' to value '44100'
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] Setting 'channel_layout' to value '0x3'
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
[format_out_0_1 @ 0x7f9ad3c71040] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x7f9ad3c71040] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[AVFilterGraph @ 0x7f9ad3e00440] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5813a00] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7f9ad5813a00] Format yuv420p chosen by get_format().
[h264 @ 0x7f9ad5813a00] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f9ad5813a00] no picture 
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5805800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5813a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'time_base' to value '1/30000'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] w:1920 h:1080 pixfmt:yuv420p tb:1/30000 fr:30000/1001 sar:1/1 sws_param:flags=2
[format @ 0x7f9ad3dc0100] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le'
[AVFilterGraph @ 0x7f9ad3c6e880] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[libx264 @ 0x7f9ad5811200] using mv_range_thread = 88
[libx264 @ 0x7f9ad5811200] using SAR=1/1
[libx264 @ 0x7f9ad5811200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f9ad5811200] profile Main, level 4.0
[libx264 @ 0x7f9ad5811200] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_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=0 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
Output #0, mp4, to 'storage/team_1_folder/game_31/convertedVideo_1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
    Stream #0:0(und), 0, 1/30000: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(und), 0, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.35.100 aac
Clipping frame in rate conversion by 0.000008
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Clipping frame in rate conversion by 0.000999
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Clipping frame in rate conversion by 0.000999
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5813a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5813a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5813a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999

最佳答案

经过一天的头撞墙,我今天早上醒来,发现了我的问题。

我的错误仅仅是因为我对 FFMPEG 的局限性不够了解。进行我上面订购的转换需要很长时间。我现在正在我自己的终端上运行这个确切的东西,男孩,这确实需要一段时间。对于一个 5 分钟的视频,它是在第 13 分钟并且还在计数。

如果其他人偶然发现这一点,请务必确保您了解您在 Process() 命令中运行的程序,并考虑您要求它执行的操作是否合理。

关于php - 带有 FFMPEG 的 Laravel Process() 对任何甚至很大的视频都会超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56744580/

相关文章:

php - 找不到存储库方法

php - 实体关系

php - Symfony 4 单一形式的多个实体

php - 如何自动删除 Drupal 7.x 中的旧 Feed 项目?

javascript - 在带有参数的 javascript 中调用 php 函数

mysql - Laravel 4迁移问题中的外键

php - 即使 token 存在,也没有ActiveAccessToken - OAuth2 + Laravel + Swift 的 Lumen

PHP 命名空间和要求

PHP代码不创建数据库

php - 使用 Guzzle 发送带有 JSON 的 POST 请求