FFMPEG无法将.MP4编码为可用的.Y4M RAW视频:“不允许操作”

问题描述 投票:0回答:1

我在macOS Sierra上运行ffmpeg版本4.2.2,但无法解码RAW视频。

首先创建.Y4M视频:

ffmpeg -y -i inputfolder/GH012088.MP4 temp_raw_video.Y4M

然后我尝试将其输入到ffmpeg:

ffmpeg -i temp_raw_video.Y4M 

但是我在终端中出现以下错误:temp_raw_video.Y4M: Operation not permitted

我已经检查了'temp_raw_video.Y4M'文件的权限,并且拥有读取和写入权限。

我已经通过iPhone上的.MOV视频尝试过上述方法,并且效果很好。

问题似乎出在我要转换的.MP4视频上。这些视频是使用GoPro摄像机拍摄的。

这里发生了什么?请在下面查看GH012088.MP4文件信息:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb9b6809400] Using non-standard frame rate 29/1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'inputfolder/GH012088.MP4':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2019-12-28T14:12:04.000000Z
    firmware        : HD7.01.01.61.00
  Duration: 00:00:40.47, start: 0.000000, bitrate: 60267 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 60015 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro AVC  
      encoder         : GoPro AVC encoder
      timecode        : 14:40:34:06
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro AAC  
      timecode        : 14:40:34:06
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro TCD  
      timecode        : 14:40:34:06
    Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 37 kb/s (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro MET  
    Stream #0:4(eng): Data: none (fdsc / 0x63736466), 10 kb/s (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro SOS 

这里是用于创建.Y4M的输出日志:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fa9da802200] Using non-standard frame rate 29/1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'inputfolder/GH012088.MP4':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2019-12-28T14:12:04.000000Z
    firmware        : HD7.01.01.61.00
  Duration: 00:00:40.47, start: 0.000000, bitrate: 60267 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 60015 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro AVC  
      encoder         : GoPro AVC encoder
      timecode        : 14:40:34:06
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro AAC  
      timecode        : 14:40:34:06
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro TCD  
      timecode        : 14:40:34:06
    Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 37 kb/s (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro MET  
    Stream #0:4(eng): Data: none (fdsc / 0x63736466), 10 kb/s (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro SOS  
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
Output #0, yuv4mpegpipe, to 'temp_raw_video.Y4M':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    firmware        : HD7.01.01.61.00
    encoder         : Lavf58.29.100
    Stream #0:0(eng): Video: wrapped_avframe, yuvj420p, 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
    Metadata:
      creation_time   : 2019-12-28T14:12:04.000000Z
      handler_name    : GoPro AVC  
      timecode        : 14:40:34:06
      encoder         : Lavc58.54.100 wrapped_avframe
frame=   43 fps=0.0 q=-0.0 size=  522240kB time=00:00:01.43 bitrate=2981801.3kbiframe=   92 fps= 90 q=-0.0 size= 1117696kB time=00:00:03.06 bitrate=2982723.8kbiframe=  144 fps= 95 q=-0.0 size= 1749504kB time=00:00:04.80 bitrate=2982837.3kbiframe=  190 fps= 94 q=-0.0 size= 2308352kB time=00:00:06.33 bitrate=2982809.6kbiframe=  241 fps= 95 q=-0.0 size= 2928128kB time=00:00:08.04 bitrate=2982978.5kbiframe=  287 fps= 94 q=-0.0 size= 3486976kB time=00:00:09.57 bitrate=2982937.8kbiframe=  336 fps= 95 q=-0.0 size= 4082176kB time=00:00:11.21 bitrate=2982837.3kbiframe=  388 fps= 96 q=-0.0 size= 4713984kB time=00:00:12.94 bitrate=2982864.2kbiframe=  436 fps= 96 q=-0.0 size= 5297152kB time=00:00:14.54 bitrate=frame= 1213 fps= 95 q=-0.0 Lsize=14737957kB time=00:00:40.47 bitrate=2983002.4kbits/s speed=3.19x      
video:635kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2321095.250000%
ffmpeg video-encoding video-conversion
1个回答
0
投票

显然,像素格式yuvj420p抛出了一个扳手。稍后我将对其进行调试。

报头溢出了多路分配器假定的限制。在git master中修补。

暂时使用,

ffmpeg -y -i inputfolder/GH012088.MP4 -pix_fmt yuv420p temp_raw_video.Y4M
© www.soinside.com 2019 - 2024. All rights reserved.