Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Video 使用JW播放器时.flv的播放损坏_Video_Ffmpeg_Flv_Jwplayer - Fatal编程技术网

Video 使用JW播放器时.flv的播放损坏

Video 使用JW播放器时.flv的播放损坏,video,ffmpeg,flv,jwplayer,Video,Ffmpeg,Flv,Jwplayer,这个问题也被问到了 我有一些文件,当在jwplayer中播放时,播放已损坏。 这些文件使用FFMpeg编码为h.264,还有其他文件以同样的方式编码 目前我们只使用flash版本的播放器 这个问题在我们升级到FFMpeg后开始出现,所以我不排除这可能是编码错误 用于运行FFMpeg的命令是: ffmpeg -i /home/ftp/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.mov -vcodec libx264 -preset

这个问题也被问到了

我有一些文件,当在jwplayer中播放时,播放已损坏。 这些文件使用FFMpeg编码为h.264,还有其他文件以同样的方式编码

目前我们只使用flash版本的播放器

这个问题在我们升级到FFMpeg后开始出现,所以我不排除这可能是编码错误

用于运行FFMpeg的命令是:

ffmpeg 
    -i /home/ftp/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.mov 
    -vcodec libx264 
    -preset ultrafast 
    -profile baseline 
    -acodec libfaac 
    -ab 96k 
    -crf 19 
    -vf movie="/home/adam/logo.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]" 
    -y /home/ftp/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.flv
我绝对不是FFMpeg命令行方面的专家,所以请随时指出所犯的任何错误

FFMpeg信息:

ffmpeg version git-2012-05-02-2330eb1 Copyright (c) 2000-2012 the FFmpeg developers
  built on May  3 2012 08:51:25 with gcc 4.4.3
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
  libavutil      51. 49.100 / 51. 49.100
  libavcodec     54. 17.101 / 54. 17.101
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 72.103 /  2. 72.103
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x24300e0] max_analyze_duration 5000000 reached at 5187000
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ftp/javarecorder/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2012-05-16 08:19:41
  Duration: 00:13:33.00, start: 0.000000, bitrate: 2164 kb/s
    Stream #0:0(eng): Video: qtrle (rle  / 0x20656C72), rgb24, 1366x768, 1457 kb/s, 8.43 fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      creation_time   : 2012-05-16 08:19:41
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 44100 Hz, 1 channels, s16, 705 kb/s
    Metadata:
      creation_time   : 2012-05-16 08:19:41
      handler_name    : Apple Alias Data Handler
Please use -profile:a or -profile:v, -profile is ambiguous
[buffer @ 0x2446ac0] w:1366 h:768 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:flags=2
[movie @ 0x242f840] seek_point:0 format_name:(null) file_name:/home/adam/logo.png stream_index:0
[overlay @ 0x2442840] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'Parsed_overlay_1'
[overlay @ 0x2442840] auto-inserting filter 'auto-inserted scale 1' between the filter 'Parsed_movie_0' and the filter 'Parsed_overlay_1'
[scale @ 0x24444a0] w:1366 h:768 fmt:rgb24 sar:0/1 -> w:1366 h:768 fmt:yuv420p sar:0/1 flags:0x4
[scale @ 0x2445100] w:80 h:80 fmt:rgba sar:1/1 -> w:80 h:80 fmt:yuva420p sar:1/1 flags:0x4
[overlay @ 0x2442840] main w:1366 h:768 fmt:yuv420p overlay x:1276 y:678 w:80 h:80 fmt:yuva420p
[overlay @ 0x2442840] main_tb:1/1000000 overlay_tb:1/25 -> tb:1/1000000 exact:1
[libx264 @ 0x242d8c0] MB rate (4128000) > level limit (2073600)
[libx264 @ 0x242d8c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x242d8c0] profile Constrained Baseline, level 5.2
[libx264 @ 0x242d8c0] 264 - core 124 r2197 69a0443 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=36 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=0 intra_refresh=0 rc=crf mbtree=0 crf=19.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
[libfaac @ 0x2443540] channel_layout not specified
Guessed Channel Layout for  Input Stream #0.1 : mono
Output #0, flv, to '/home/ftp/javarecorder/1c8f08b7d0d9e7fa4b24066156ad50bc981497a0.flv':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2012-05-16 08:19:41
    encoder         : Lavf54.3.100
    Stream #0:0(eng): Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 1366x768, q=-1--1, 1k tbn, 1k tbc
    Metadata:
      creation_time   : 2012-05-16 08:19:41
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng): Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, mono, s16, 96 kb/s
    Metadata:
      creation_time   : 2012-05-16 08:19:41
      handler_name    : Apple Alias Data Handler
Stream mapping:
  Stream #0:0 -> #0:0 (qtrle -> libx264)
  Stream #0:1 -> #0:1 (pcm_s16be -> libfaac)
Press [q] to stop, [?] for help
Input stream #0:1 frame changed from rate:44100 fmt:s16 ch:1 chl:0x0 to rate:44100 fmt:s16 ch:1 chl:0x4
frame= 6856 fps=105 q=-1.0 Lsize=   36030kB time=00:13:32.83 bitrate= 363.1kbits/s
video:27775kB audio:7540kB global headers:0kB muxing overhead 2.026555%
[libx264 @ 0x242d8c0] frame I:28    Avg QP: 4.61  size:238170
[libx264 @ 0x242d8c0] frame P:6828  Avg QP: 7.31  size:  3189
[libx264 @ 0x242d8c0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x242d8c0] mb P  I16..4:  0.9%  0.0%  0.0%  P16..4:  2.2%  0.0%  0.0%  0.0%  0.0%    skip:96.9%
[libx264 @ 0x242d8c0] coded y,uvDC,uvAC intra: 32.3% 30.0% 29.0% inter: 1.0% 1.1% 1.0%
[libx264 @ 0x242d8c0] i16 v,h,dc,p: 66% 32%  1%  1%
[libx264 @ 0x242d8c0] i8c dc,h,v,p: 62% 23% 14%  1%
[libx264 @ 0x242d8c0] kb/s:279.82
编辑:
同事能够查看“损坏”的文件。我的电脑和他的电脑唯一的区别就是他有一台Mac电脑。同样的flash版本,同样的JW播放器版本。这里有些不对劲。

首先,不要将h.264视频放入FLV容器中。不太合身。可能会有各种各样的怪事发生。使用mp4容器,h264自然在家中

其他建议/问题:

  • 删除或更改
    crf
    值,看看这是否有区别
  • 放下覆盖层,会有什么不同吗
  • 当您更新FFmpeg时,是否也更新了x264
  • 放下超快预设,看看它是否有不同
  • 在基线前面加上v:,这是FFmpeg从2011年底开始要求的(我想)
从您的输出中:

Please use -profile:a or -profile:v, -profile is ambiguous

似乎罪魁祸首是帧率。通过一些神奇的事情,最终视频的帧率大约是1000。使用
-r30
似乎已经解决了这个问题。

还请提供实际命令的完整控制台输出。我猜您的输出像素格式可能不是yuv420p,但是如果没有控制台输出,就无法判断。更改了FFMpeg输出以显示完整的运行。flv是重要的一部分,因为我们使用flash在浏览器中显示视频,这节省了转换为多种格式的时间。丢失覆盖似乎没有任何区别,我们也更新了x264。使用f4v,它基本上只是Adobe mp4的子集。FLV和h264存在严重问题。Flash已播放mp4多年。似乎有些视频已损坏为mp4:(如果事件无法从中获取MP4,则您的编码可能会出现问题。您是否从夜间转储中获取FFmpeg和h264?如果是,请使用新/旧版本再试一次。有些日子主干不如其他日子那么完美。我还强烈建议转储
-预设超快
内容,看看这是否会有所不同。哦!我在您的输出中还看到一条警告!基线预设被认为是不明确的,因此被忽略。(不久前FFmpeg开始要求对某些参数使用explicate
v
&
a