Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When passing "videoCompression":0, the output video does not work #5191

Closed
beelio opened this issue Sep 24, 2019 · 5 comments · Fixed by #26503
Closed

When passing "videoCompression":0, the output video does not work #5191

beelio opened this issue Sep 24, 2019 · 5 comments · Fixed by #26503
Labels
pkg/server This is due to an issue in the packages/server directory type: unexpected behavior User expected result, but got another

Comments

@beelio
Copy link

beelio commented Sep 24, 2019

Current behavior:

In my cypress.json I have the following configuration:

{
  "videoCompression":0
}

When running my specs with cypress run the videos that are generated of the tests seems broken somehow.

I'm trying to open them on a mac (mojave) with quicktime and vlc. Quicktime can't open the file, and vlc crashes when opening it.

@jsurbaitis
Copy link

Also ran into this, using a value > 0 worked

@jennifer-shehane
Copy link
Member

Yes, I can confirm this is happening. The video will be recorded and saved to the location, but attempting to open the video does not work.

Screen Shot 2020-06-09 at 9 26 53 PM

Behind the scenes we're just passing -crf 0 to ffmpeg.

ffmpeg -i ../cypress/videos/spec.js.mp4 -y -vcodec libx264 -preset fast -crf 0 ../cypress/videos/spec.js-compressed.mp4

Here are the video compression logs:

  -  Started processing:  Compressing to 0 CRF
  cypress:server:video processing video from /Users/jennifer/Dev/cypress-transform-test/cypress/videos/spec.js.mp4 to /Users/jennifer/Dev/cypress-transform-test/cypress/videos/spec.js-compressed.mp4 video compression 0 +2ms
  cypress:server:video compression started { command: 'ffmpeg -i /Users/jennifer/Dev/cypress-transform-test/cypress/videos/spec.js.mp4 -y -vcodec libx264 -preset fast -crf 0 /Users/jennifer/Dev/cypress-transform-test/cypress/videos/spec.js-compressed.mp4' } +7ms
  cypress:server:video compression stderr log { message: 'ffmpeg version N-92718-g092cb17983-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers' } +13ms
  cypress:server:video compression stderr log { message: '  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)' } +1ms
  cypress:server:video compression stderr log { message: '  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay' } +0ms
  cypress:server:video compression stderr log { message: '  libavutil      56. 24.101 / 56. 24.101' } +0ms
  cypress:server:video compression stderr log { message: '  libavcodec     58. 42.102 / 58. 42.102' } +0ms
  cypress:server:video compression stderr log { message: '  libavformat    58. 24.101 / 58. 24.101' } +1ms
  cypress:server:video compression stderr log { message: '  libavdevice    58.  6.101 / 58.  6.101' } +1ms
  cypress:server:video compression stderr log { message: '  libavfilter     7. 46.101 /  7. 46.101' } +0ms
  cypress:server:video compression stderr log { message: '  libswscale      5.  4.100 /  5.  4.100' } +0ms
  cypress:server:video compression stderr log { message: '  libswresample   3.  4.100 /  3.  4.100' } +0ms
  cypress:server:video compression stderr log { message: '  libpostproc    55.  4.100 / 55.  4.100' } +0ms
  cypress:server:video compression stderr log { message: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/jennifer/Dev/cypress-transform-test/cypress/videos/spec.js.mp4':" } +19ms
  cypress:server:video compression stderr log { message: '  Metadata:' } +0ms
  cypress:server:video compression stderr log { message: '    major_brand     : isom' } +0ms
  cypress:server:video compression stderr log { message: '    minor_version   : 512' } +0ms
  cypress:server:video compression stderr log { message: '    compatible_brands: isomiso2avc1mp41' } +0ms
  cypress:server:video compression stderr log { message: '    encoder         : Lavf58.24.101' } +0ms
  cypress:server:video compression stderr log { message: '  Duration: 00:00:02.44, start: 0.000000, bitrate: 334 kb/s' } +1ms
  cypress:server:video compression stderr log { message: '    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], 330 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)' } +0ms
  cypress:server:video compression stderr log { message: '    Metadata:' } +0ms
  cypress:server:video compression stderr log { message: '      handler_name    : VideoHandler' } +0ms
  cypress:server:video compression stderr log { message: 'Stream mapping:' } +1ms
  cypress:server:video compression codec data: { format: 'mov,mp4,m4a,3gp,3g2,mj2', audio: '', video: 'h264 (Constrained Baseline) (avc1 / 0x31637661)', duration: '00:00:02.44', video_details: [ 'h264 (Constrained Baseline) (avc1 / 0x31637661)', 'yuvj420p(pc)', '1280x720 [SAR 1:1 DAR 16:9]', '330 kb/s', '25 fps', '25 tbr', '12800 tbn', '50 tbc (default)' ] } +0ms
  cypress:server:video compression stderr log { message: '  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))' } +0ms
  cypress:server:video compression stderr log { message: 'Press [q] to stop, [?] for help' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] using SAR=1/1' } +20ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2' } +1ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] profile High 4:4:4 Predictive, level 3.1, 4:2:0, 8-bit' } +2ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0' } +0ms
  cypress:server:video compression stderr log { message: "Output #0, mp4, to '/Users/jennifer/Dev/cypress-transform-test/cypress/videos/spec.js-compressed.mp4':" } +0ms
  cypress:server:video compression stderr log { message: '  Metadata:' } +2ms
  cypress:server:video compression stderr log { message: '    major_brand     : isom' } +0ms
  cypress:server:video compression stderr log { message: '    minor_version   : 512' } +0ms
  cypress:server:video compression stderr log { message: '    compatible_brands: isomiso2avc1mp41' } +0ms
  cypress:server:video compression stderr log { message: '    encoder         : Lavf58.24.101' } +0ms
  cypress:server:video compression stderr log { message: '    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)' } +0ms
  cypress:server:video compression stderr log { message: '    Metadata:' } +0ms
  cypress:server:video compression stderr log { message: '      handler_name    : VideoHandler' } +0ms
  cypress:server:video compression stderr log { message: '      encoder         : Lavc58.42.102 libx264' } +0ms
  cypress:server:video compression stderr log { message: '    Side data:' } +0ms
  cypress:server:video compression stderr log { message: '      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1' } +0ms
  cypress:server:video compression stderr log { message: 'frame=   61 fps=0.0 q=-1.0 Lsize=     160kB time=00:00:02.40 bitrate= 547.8kbits/s speed=14.4x    ' } +141ms
  cypress:server:video compression progress: { frames: 61, currentFps: 0, currentKbps: 547.8, targetSize: 160, timemark: '00:00:02.40', percent: 98.36065573770492 } +1ms
  cypress:server:video compression stderr log { message: 'video:159kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.661493%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] frame I:2     Avg QP: 0.00  size: 39792' } +5ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] frame P:59    Avg QP: 0.00  size:  1409' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] mb I  I16..4: 92.3%  0.0%  7.7%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] mb P  I16..4:  0.5%  0.0%  0.1%  P16..4:  2.5%  0.0%  0.0%  0.0%  0.0%    skip:96.9%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] 8x8 transform intra:0.0% inter:4.6%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] coded y,uvDC,uvAC intra: 9.8% 2.4% 2.4% inter: 0.6% 0.0% 0.0%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] i16 v,h,dc,p: 86% 13%  2%  0%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 16% 15% 45%  1%  1%  1%  1%  3%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] i8c dc,h,v,p: 95%  4%  1%  0%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] Weighted P-Frames: Y:0.0% UV:0.0%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] ref P L0: 48.7% 51.3%' } +0ms
  cypress:server:video compression stderr log { message: '[libx264 @ 0x7fd03c00e800] kb/s:533.56' } +0ms
  cypress:server:video compression stderr log { message: '' } +25ms
  cypress:server:video compression ended +0ms
  -  Finished processing: /Users/jennifer/Dev/cypress-transform-test/cypress/videos/s    (0 seconds)
                          pec.js.mp4

@jennifer-shehane jennifer-shehane added the type: unexpected behavior User expected result, but got another label Jun 9, 2020
@cypress-bot cypress-bot bot added the stage: needs investigating Someone from Cypress needs to look at this label Jun 9, 2020
@jennifer-shehane jennifer-shehane added the pkg/server This is due to an issue in the packages/server directory label Jun 9, 2020
@RoySegall
Copy link

This is strange because I remember in another project I created a year ago, the videos were compatible with Quicktime. Indeed, strange.... But, opening the videos with chrome solved the issue.

@liambutler
Copy link

liambutler commented Nov 8, 2022

I also encounter this issue when videoCompression is set to 0. Though its still mentioned in the Cypress docs:

The value can be false to disable compression or a value between 0 and 51
https://docs.cypress.io/guides/references/configuration#Videos

Screenshot 2022-11-08 at 16 22 44

Also results in an error on the Cypress dashboard when the videos are uploaded to there

Screenshot 2022-11-08 at 16 15 34

Though, interestingly, it is possible to open via VLC

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 26, 2023

Released in 12.11.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.11.0, please open a new issue.

@cypress-bot cypress-bot bot removed the stage: needs investigating Someone from Cypress needs to look at this label Apr 26, 2023
@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg/server This is due to an issue in the packages/server directory type: unexpected behavior User expected result, but got another
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants