ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.77k stars 879 forks source link

FFmpeg HEVC/H.265 transcode fails with "Illegal Instruction" #1600

Open ghost opened 2 years ago

ghost commented 2 years ago

Note: this probably isn’t even severe and I won’t mind if you mark this WONTFIX because FFmpeg transcodes on iSH are super slow anyway.

iSH version: 1.2.3, build 279 (TestFlight) Command line: ffmpeg -i RPReplay_Final1635106494.mov -crf 30 -c hevc output.mov

Output:

OwOwUwUwOwO:/mnt# ffmpeg -i RPReplay_Final1635106494.mov  -crf 30 -c hevc output.mov
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.1 (Alpine 10.3.1_git20210424) 20210424
  configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --enable-vaapi --enable-vdpau --enable-libopus --enable-vulkan --enable-libsoxr --enable-libwebp --disable-asm --enable-libaom --disable-debug
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'RPReplay_Final1635106494.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2021-10-24T21:55:43.000000Z
    com.apple.quicktime.author: ReplayKitRecording
  Duration: 00:05:18.69, start: 0.000000, bitrate: 30690 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709/bt709/iec61966-2-1, progressive), 1440x1920, 30687 kb/s, 58.22 fps, 60 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      rotate          : 270
      creation_time   : 2021-10-24T21:55:43.000000Z
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]
      encoder         : 'avc1'
    Side data:
      displaymatrix: rotation of 90.00 degrees
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 0.0
x265 [info]: build info [Linux][GCC 10.3.1][32 bit][noasm] 8bit
x265 [info]: using cpu capabilities: none!
x265 [info]: Main profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 2 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 1 / wpp(23 rows)
Illegal instruction

dmesg:

[10000s of lines of "stub syscall 383"]
302 illegal instruction at 0xf516ac48: da c1 dd d9 d9 83 ec 0e 
[more stub syscall 383] 
312 illegal instruction at 0xf516ac48: da c1 dd d9 d9 83 ec 0e 

Please let me know if you need more information.

ghost commented 2 years ago

I thought I posted everything needed but turns out I forgot this: iPad 7th generation (A10)

saagarjha commented 2 years ago

fcmovb

ghost commented 2 years ago

https://en.wikipedia.org/wiki/FCMOV ? Or did I miss something?

saagarjha commented 2 years ago

Yep :)

ghost commented 2 years ago

Oh ok. I was confused because I saw an x86 instruction and thought I messed up in some way when reporting this bug.