当前位置: 首页 > 知识库问答 >
问题:

使用ffmpeg视频转换后在iPhone上播放视频

杜成和
2023-03-14

它是一个后端API(由RubyonRails开发),iphone和android手机使用它上传视频。API正在将上传的视频转换为MP4格式。我在后端使用曲别针ffmpeg gem进行视频转换。以下是我使用的:

has_attached_file :video , 
              :styles=>{
                :medium=>{ :geometry=>"480x360",:format=>'mp4',:streaming => true,
                    :convert_options => { :output => 
                                        {
                                          :acodec => 'aac',
                                          :ac => 2 ,
                                          :strict => 'experimental',
                                          'b:a' => '160k',

                                          :vcodec => 'libx264',
                                          :preset => 'slow',
                                          'profile:v' => 'baseline',
                                          :level => '30',
                                          :maxrate => '10000000',
                                          :bufsize => '10000000',
                                          'b:v' => '750k',
                                          :f => 'mp4',
                                          :threads => '0'
                                        } 
                                    } },
                  :thumb => { :geometry => "160x120", :format => 'jpg', :time => 2 },
                  :thumb_large => { :geometry => "520x390", :format => 'jpg', :time => 2}
                }, :processors => [:ffmpeg, :qtfaststart],
        :path => path/to/store/video,
        :url => url/of/video

我面临的问题有:

当用户从Android手机上传视频时,它在Android手机上运行良好,但在iPhone上无法播放。当用户从iPhone上传视频时,会发生另一件奇怪的事情,视频上传后,它会播放得很完美,但一段时间后(2或3小时),它会停止播放这些视频。

我怎样才能摆脱这两个问题?如有任何建议,将不胜感激。谢啦

@Michael,这是android mobile上传的视频转换的详细日志

ffmpeg version git-2013-05-28-ced0307 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 28 2013 07:45:18 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libopus --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.100 / 55. 12.100
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  1.101 / 55.  1.101
  libavfilter     3. 72.100 /  3. 72.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 2013-06-19 15:39:02
  Duration: 00:00:25.88, start: 0.000000, bitrate: 16700 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16829 kb/s, 29.75 fps, 30 tbr, 90k tbn, 180k tbc
    Metadata:
      rotate          : 90
      creation_time   : 2013-06-19 15:39:02
      handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 122 kb/s
    Metadata:
      creation_time   : 2013-06-19 15:39:02
      handler_name    : SoundHandle
[libx264 @ 0x2613c00] using cpu capabilities: MMX2 SSE2Fast SSEMisalign LZCNT
[libx264 @ 0x2613c00] profile Constrained Baseline, level 3.0
[libx264 @ 0x2613c00] 264 - core 133 r2 a3ac64b - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=5 deblock=1:0:0 analyse=0x1:0x111 me=umh subme=8 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=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=abr mbtree=1 bitrate=750 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=10000 vbv_bufsize=10000 nal_hrd=none ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    encoder         : Lavf55.7.100
    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x360, q=-1--1, 750 kb/s, 15360 tbn, 30 tbc
    Metadata:
      rotate          : 90
      creation_time   : 2013-06-19 15:39:02
      handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 160 kb/s
    Metadata:
      creation_time   : 2013-06-19 15:39:02
      handler_name    : SoundHandle
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (aac -> aac)
Press [q] to stop, [?] for help
frame=  765 fps= 19 q=-1.0 Lsize=    2621kB time=00:00:25.88 bitrate= 829.4kbits/s dup=7 drop=0    
video:2093kB audio:504kB subtitle:0 global headers:0kB muxing overhead 0.878228%
[libx264 @ 0x2613c00] frame I:4     Avg QP:25.48  size: 11731
[libx264 @ 0x2613c00] frame P:761   Avg QP:26.71  size:  2754
[libx264 @ 0x2613c00] mb I  I16..4: 33.0%  0.0% 67.0%
[libx264 @ 0x2613c00] mb P  I16..4:  2.1%  0.0%  0.9%  P16..4: 47.2%  9.5%  3.4%  0.0%  0.0%    skip:36.9%
[libx264 @ 0x2613c00] final ratefactor: 23.58
[libx264 @ 0x2613c00] coded y,uvDC,uvAC intra: 31.9% 54.5% 9.5% inter: 11.9% 24.4% 0.5%
[libx264 @ 0x2613c00] i16 v,h,dc,p: 25% 33%  7% 34%
[libx264 @ 0x2613c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 14%  9% 14% 10% 10% 11%  8%  7%
[libx264 @ 0x2613c00] i8c dc,h,v,p: 50% 25% 17%  9%
[libx264 @ 0x2613c00] ref P L0: 67.6% 15.2% 10.1%  3.9%  3.2%
[libx264 @ 0x2613c00] kb/s:672.30
ffmpeg version git-2013-05-28-ced0307 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 28 2013 07:45:18 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libopus --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.100 / 55. 12.100
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  1.101 / 55.  1.101
  libavfilter     3. 72.100 /  3. 72.100 <Hashie::Mash groups="{\"groups\":[0]}" post="uploaded from android"   route_info=version=v1, method=POST, path=/:version/videos/create(.:format) user_id=31 version="v1" video=#<Hashie::Mash filename="video" head="Content-Disposition: form-data; name=\"video\"; filename=\"video\"\r\nContent-Type: application/octet-stream\r\n" name="video" tempfile=#<File:/tmp/RackMultipart20130620-28711-187049m>>
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.7.100
  Duration: 00:00:25.91, start: 0.021333, bitrate: 828 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 672 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
    Metadata:
      rotate          : 90
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s
    Metadata:
      handler_name    : SoundHandler
[libx264 @ 0x326d820] using cpu capabilities: MMX2 SSE2Fast SSEMisalign LZCNT
[libx264 @ 0x326d820] profile Constrained Baseline, level 3.0
[libx264 @ 0x326d820] 264 - core 133 r2 a3ac64b - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=5 deblock=1:0:0 analyse=0x1:0x111 me=umh subme=8 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=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=abr mbtree=1 bitrate=750 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=10000 vbv_bufsize=10000 nal_hrd=none ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi0620130620-28711-130rd1i.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.7.100
    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 480x270, q=-1--1, 750 kb/s, 15360 tbn, 30 tbc
    Metadata:
      rotate          : 90
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 160 kb/s
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (aac -> aac)
Press [q] to stop, [?] for help
frame=  766 fps= 38 q=-1.0 Lsize=    2666kB time=00:00:25.90 bitrate= 843.2kbits/s dup=1 drop=0    
video:2138kB audio:505kB subtitle:0 global headers:0kB muxing overhead 0.863633%
[libx264 @ 0x326d820] frame I:4     Avg QP:20.82  size: 11283
[libx264 @ 0x326d820] frame P:762   Avg QP:22.03  size:  2813
[libx264 @ 0x326d820] mb I  I16..4: 19.9%  0.0% 80.1%
[libx264 @ 0x326d820] mb P  I16..4:  1.7%  0.0%  1.1%  P16..4: 49.3% 20.6%  7.0%  0.0%  0.0%    skip:20.3%
[libx264 @ 0x326d820] final ratefactor: 19.24
[libx264 @ 0x326d820] coded y,uvDC,uvAC intra: 43.4% 76.7% 29.0% inter: 23.0% 44.6% 1.7%
[libx264 @ 0x326d820] i16 v,h,dc,p: 23% 29%  9% 39%
[libx264 @ 0x326d820] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 21%  9% 11% 10% 10% 11%  8%  8%
[libx264 @ 0x326d820] i8c dc,h,v,p: 44% 26% 18% 12%
[libx264 @ 0x326d820] ref P L0: 74.0% 13.1%  7.7%  3.0%  2.1%
[libx264 @ 0x326d820] kb/s:685.81
ffmpeg version git-2013-05-28-ced0307 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 28 2013 07:45:18 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libopus --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.100 / 55. 12.100
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  1.101 / 55.  1.101
  libavfilter     3. 72.100 /  3. 72.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.7.100
  Duration: 00:00:25.91, start: 0.021333, bitrate: 828 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 672 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
    Metadata:
      rotate          : 90
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s
    Metadata:
      handler_name    : SoundHandler
Output #0, image2, to '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi0620130620-28711-1bdslpu.jpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.7.100
    Stream #0:0(eng): Video: mjpeg, yuvj420p, 160x90, q=2-31, 200 kb/s, 90k tbn, 30 tbc
    Metadata:
      rotate          : 90
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A dup=0 drop=57    
video:4kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.479303%
ffmpeg version git-2013-05-28-ced0307 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 28 2013 07:45:18 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libopus --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.100 / 55. 12.100
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  1.101 / 55.  1.101
  libavfilter     3. 72.100 /  3. 72.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.7.100
  Duration: 00:00:25.91, start: 0.021333, bitrate: 828 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 672 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
    Metadata:
      rotate          : 90
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s
    Metadata:
      handler_name    : SoundHandler
Output #0, image2, to '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi0620130620-28711-1vp4al6.jpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.7.100
    Stream #0:0(eng): Video: mjpeg, yuvj420p, 520x292, q=2-31, 200 kb/s, 90k tbn, 30 tbc
    Metadata:
      rotate          : 90
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A dup=0 drop=57    
video:19kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.113677%


Started POST "/api/v1/videos/create" for 69.42.0.13 at 2013-06-20 09:41:50 -0500
Command :: file -b --mime '/tmp/RackMultipart20130620-28711-187049m'
[paperclip] [ffmpeg] ffmpeg -i "/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l" 2>&1
[paperclip] [ffmpeg] Command Success
[paperclip] [ffmpeg] Making...
[paperclip] [ffmpeg] Building Destination File: 'RackMultipart20130620-28711-187049m20130620-28711-2x7b7l' + 'mp4'
[paperclip] [ffmpeg] Destination File Built
[paperclip] [ffmpeg] Adding Geometry
[paperclip] [ffmpeg] Extracting Target Dimensions
[paperclip] [ffmpeg] Target Size is Available
[paperclip] [ffmpeg] Keeping Aspect Ratio
[paperclip] [ffmpeg] Resize
[paperclip] [ffmpeg] Convert Options: 640x360
[paperclip] [ffmpeg] Adding Format
[paperclip] [ffmpeg] Adding Source
[paperclip] [ffmpeg] Building Parameters
[paperclip] [ffmpeg] -i :source -acodec aac -ac 2 -strict experimental -b:a 160k -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b:v 750k -f mp4 -threads 0 -s 640x360 -y :dest
Command :: ffmpeg -i '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l' -acodec aac -ac 2 -strict experimental -b:a 160k -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b:v 750k -f mp4 -threads 0 -s 640x360 -y '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p.mp4'
[paperclip] [qt-faststart] :source :dest
Command :: qt-faststart '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p.mp4' '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl.mp4'
[paperclip] [ffmpeg] ffmpeg -i "/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4" 2>&1
[paperclip] [ffmpeg] Command Success
[paperclip] [ffmpeg] Making...
[paperclip] [ffmpeg] Building Destination File: 'RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06' + 'mp4'
[paperclip] [ffmpeg] Destination File Built
[paperclip] [ffmpeg] Adding Geometry
[paperclip] [ffmpeg] Extracting Target Dimensions
[paperclip] [ffmpeg] Target Size is Available
[paperclip] [ffmpeg] Keeping Aspect Ratio
[paperclip] [ffmpeg] Resize
[paperclip] [ffmpeg] Convert Options: 480x270
[paperclip] [ffmpeg] Adding Format
[paperclip] [ffmpeg] Adding Source
[paperclip] [ffmpeg] Building Parameters
[paperclip] [ffmpeg] -i :source -acodec aac -ac 2 -strict experimental -b:a 160k -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b:v 750k -f mp4 -threads 0 -s 480x270 -y :dest
Command :: ffmpeg -i '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4' -acodec aac -ac 2 -strict experimental -b:a 160k -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b:v 750k -f mp4 -threads 0 -s 480x270 -y '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi0620130620-28711-130rd1i.mp4'
[paperclip] [qt-faststart] :source :dest
Command :: qt-faststart '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi0620130620-28711-130rd1i.mp4' '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi0620130620-28711-130rd1i20130620-28711-snde6v.mp4'
[paperclip] [ffmpeg] ffmpeg -i "/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4" 2>&1
[paperclip] [ffmpeg] Command Success
[paperclip] [ffmpeg] Making...
[paperclip] [ffmpeg] Building Destination File: 'RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06' + 'jpg'
[paperclip] [ffmpeg] Destination File Built
[paperclip] [ffmpeg] Adding Geometry
[paperclip] [ffmpeg] Extracting Target Dimensions
[paperclip] [ffmpeg] Target Size is Available
[paperclip] [ffmpeg] Keeping Aspect Ratio
[paperclip] [ffmpeg] Resize
[paperclip] [ffmpeg] Convert Options: 160x90
[paperclip] [ffmpeg] Adding Format
[paperclip] [ffmpeg] Adding Source
[paperclip] [ffmpeg] Building Parameters
[paperclip] [ffmpeg] -ss 2 -i :source -s 160x90 -vframes 1 -f image2 -y :dest
Command :: ffmpeg -ss 2 -i '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4' -s 160x90 -vframes 1 -f image2 -y '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi0620130620-28711-1bdslpu.jpg'
[paperclip] [ffmpeg] ffmpeg -i "/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4" 2>&1
[paperclip] [ffmpeg] Command Success
[paperclip] [ffmpeg] Making...
[paperclip] [ffmpeg] Building Destination File: 'RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06' + 'jpg'
[paperclip] [ffmpeg] Destination File Built
[paperclip] [ffmpeg] Adding Geometry
[paperclip] [ffmpeg] Extracting Target Dimensions
[paperclip] [ffmpeg] Target Size is Available
[paperclip] [ffmpeg] Keeping Aspect Ratio
[paperclip] [ffmpeg] Resize
[paperclip] [ffmpeg] Convert Options: 520x292
[paperclip] [ffmpeg] Adding Format
[paperclip] [ffmpeg] Adding Source
[paperclip] [ffmpeg] Building Parameters
[paperclip] [ffmpeg] -ss 2 -i :source -s 520x292 -vframes 1 -f image2 -y :dest
Command :: ffmpeg -ss 2 -i '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi06.mp4' -s 520x292 -vframes 1 -f image2 -y '/tmp/RackMultipart20130620-28711-187049m20130620-28711-2x7b7l20130620-28711-uibd1p20130620-28711-1tgemjl20130620-28711-15qsi0620130620-28711-1vp4al6.jpg'
[paperclip] Saving attachments.

共有1个答案

乐正涵意
2023-03-14

我刚刚写了一篇博文,介绍了ios的h.264编码,展示了h.264编码在ios硬件上可以工作和不能工作的例子。我使用的特定命令行是:

ffmpeg -y -i INPUT.mov -c:v libx264
  -pix_fmt yuv420p -preset:v slow
  -profile:v baseline -crf 23
  OUTPUT.m4v

如果我是你,我会尝试在命令行上编码视频,并在没有网络界面iOS硬件上测试它们。然后,一步一步地使用特定的命令行选项,直到找到破坏iOS播放的命令行选项。

 类似资料:
  • 在我的网络应用程序中,用户应该能够上传自己的视频(任意一种格式)。我正在使用ffmpeg对视频进行编码。mp4和。flv使用命令: ffmpeg-iuservid.whateveroutput.mp4output.flv 当ffmpeg对视频进行编码时,它会加载到用户页面上的flowplayer中。但flowplayer总是说“找不到文件”,因为ffmpeg编码尚未完成。 是否有可能在某个播放器中

  • ffmpeg 是 *nix 系统下最流行的音视频处理库,功能强大,并且提供了丰富的终端命令,实是日常视频处理的一大利器! 实例 flac 格式转 mp3 音频格式转换非常简单:ffmpeg -i input.flac -acodec libmp3lame output.mp3。 ffmpeg 将会使用 libmp3lame 解码器将 input.flac 文件转换为 mp3 格式的 output.

  • 我是一名大学生,现在正在学习FFmpeg。 当我使用这个公式时,我发现一个现象。 1.帧率越高,视频播放速度越快。 2.帧率越慢,视频播放速度越快。 我希望无论帧率是多少,视频播放速度都是合适的。不要太快或太慢。

  • 问题内容: 我正在使用Videogular来显示视频。当用户点击“播放”按钮以播放新视频时,能否帮助我停止/暂停其他视频?因此,一次只能让用户一次播放一个视频。 系统应自动停止正在后台播放的其他视频并播放新视频 谢谢 问题答案: 您可以分别为每个播放器获取所有API,并监听状态变化: 在您的控制器中:

  • 问题内容: 我想隐藏默认情况下出现在元素上的大播放按钮 可能吗? 问题答案: 看来苹果再次改变了影子领域。 为了隐藏播放按钮控件,您必须使用以下CSS:

  • 下载示例链接: