r00tman/EventHands

Fail On Generate video1000.mp4

hchoHsu opened this issue · 1 comments

I run the step 3 in readme EVAL_REAL.md, try to generate the visualized video1000.mp4:

./build/evsim -o -p ../filter/predictions_filteredfast.txt -r 60 -j joints.txt -w 240 -h 180 -v | ffmpeg -y -s 240x180 -f rawvideo -pix_fmt rgb24 -framerate 60 -i pipe:0 -crf 1 -pix_fmt yuv444p video1000.mp4

but got some trouble with output below:

ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
configuration: --prefix=/home/ai1/anaconda3 --cc=/tmp/build/80754af9/ffmpeg_1587154242452/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --enable-avresample --enable-gmp --enable-hardcoded-tables --enable-libfreetype --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame --disable-nonfree --enable-gpl --enable-gnutls --disable-openssl --enable-libopenh264 --enable-libx264
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
1
1
1
1
1
1
loading replay
loaded replay
time=955ms frames=100 fps=104.71 c=0.50 t=1.65 1/dt=60.00
time=1331ms frames=200 fps=150.26 c=0.50 t=3.32 1/dt=60.00
Input #0, rawvideo, from 'pipe:0':
Duration: N/A, bitrate: 62208 kb/s
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 240x180, 62208 kb/s, 60 tbr, 60 tbn, 60 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
[libx264 @ 0x559e729f1dc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x559e729f1dc0] profile High 4:4:4 Predictive, level 1.3, 4:4:4, 8-bit
[libx264 @ 0x559e729f1dc0] 264 - core 157 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 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=4 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'video1000.mp4':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 240x180, q=-1--1, 60 fps, 15360 tbn, 60 tbc
Metadata:
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown`

The video after output is not playable, is there any advice to solve the problem ??

I had tried to use command
/build/evsim -p ../filter/predictions_filteredfast.txt -r 60 -j joints.txt -w 240 -h 180 -v
which let the executable reder on the screen, and it seems works fine.

Hi, I'm very sorry for the delayed response.

Yes, that's the known problem with the offscreen rendering. In the released version, -o argument not only disables screen output but unfortunately also disables the video output too, since it uses screen output (ref 1, ref 2).

A quick fix is to run the command without -o argument, as you suggested.
The only downside is that it will run slower due to screen output requiring vsync.
To speed up rendering in this mode, you can prepend __GL_SYNC_TO_VBLANK=0 to the command, e.g., __GL_SYNC_TO_VBLANK=0 /build/evsim -p ... in your case.
This disables VSYNC for the screen output with NVIDIA drivers, but doesn't seem to corrupt the output video in any way on two systems that we tested that on.