How do I properly reduce the resolution of a 360 video using ffmpeg? -
i have tried reduction following technique scale of 2048:1024 like: ffmpeg -i eagle360half.mp4 -vf scale=1024:512 video360_1024.mp4 playback becomes warped , warbly (visually similar bad vhs tape). can speculate has meridians , equirectangular projections. how scale/ reduce resolution of 360 video using ffmpeg, or possible other cli tool?
here output of mediainfo, ffmpeg, , mediainfo again:
#######################mediainfo output pre-encoding################# $ mediainfo 360timessquare.mp4 general complete name : 360timessquare.mp4 format : mpeg-4 format profile : base media / version 2 codec id : mp42 file size : 235 mib duration : 14mn 18s overall bit rate mode : variable overall bit rate : 2 297 kbps encoded date : utc 2016-10-21 19:11:41 tagged date : utc 2016-10-21 19:11:41 gsst : 0 gstd : 858209 video id : 1 format : avc format/info : advanced video codec format profile : main@l3.1 format settings, cabac : yes format settings, reframes : 3 frames codec id : avc1 codec id/info : advanced video coding duration : 14mn 18s bit rate : 2 168 kbps width : 1 280 pixels height : 720 pixels display aspect ratio : 16:9 frame rate mode : constant frame rate : 25.000 fps color space : yuv chroma subsampling : 4:2:0 bit depth : 8 bits scan type : progressive bits/(pixel*frame) : 0.094 stream size : 222 mib (94%) title : iso media file produced google inc. encoded date : utc 2016-10-21 19:11:41 tagged date : utc 2016-10-21 19:11:41 color range : limited color primaries : bt.709 transfer characteristics : bt.709 matrix coefficients : bt.709 audio id : 2 format : aac format/info : advanced audio codec format profile : lc codec id : 40 duration : 14mn 18s bit rate mode : variable bit rate : 126 kbps channel(s) : 2 channels channel positions : front: l r sampling rate : 44.1 khz compression mode : lossy stream size : 12.8 mib (5%) title : iso media file produced google inc. encoded date : utc 2016-10-21 19:11:41 tagged date : utc 2016-10-21 19:11:41 ########################ffmpeg log:############################# $ffmpeg -i 360timessquare.mp4 -s 542x320 -o 360timessquare542x320.mp4 ffmpeg version 2.4 copyright (c) 2000-2014 ffmpeg developers built on sep 26 2015 22:27:26 gcc 4.8.3 (gcc) 20140911 (red hat 4.8.3-9) configuration: --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfreetype --enable-fontconfig --enable-libspeex --enable-libtheora --enable-frei0r --enable-libopencv --enable-zlib --enable-shared --disable-htmlpages --disable-podpages --disable-txtpages libavutil 54. 7.100 / 54. 7.100 libavcodec 56. 1.100 / 56. 1.100 libavformat 56. 4.101 / 56. 4.101 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 1.100 / 5. 1.100 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 0.100 / 53. 0.100 unrecognized option 'o'. error splitting argument list: option not found [kevin@clipcentric 360video]$ ffmpeg -i 360timessquare.mp4 -vf -s 542x320 360timessquare542x320.mp4 ffmpeg version 2.4 copyright (c) 2000-2014 ffmpeg developers built on sep 26 2015 22:27:26 gcc 4.8.3 (gcc) 20140911 (red hat 4.8.3-9) configuration: --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfreetype --enable-fontconfig --enable-libspeex --enable-libtheora --enable-frei0r --enable-libopencv --enable-zlib --enable-shared --disable-htmlpages --disable-podpages --disable-txtpages libavutil 54. 7.100 / 54. 7.100 libavcodec 56. 1.100 / 56. 1.100 libavformat 56. 4.101 / 56. 4.101 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 1.100 / 5. 1.100 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 0.100 / 53. 0.100 input #0, mov,mp4,m4a,3gp,3g2,mj2, '360timessquare.mp4': metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2016-10-21 19:11:41 duration: 00:14:18.09, start: 0.000000, bitrate: 2296 kb/s stream #0:0(und): video: h264 (main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [sar 1:1 dar 16:9], 2168 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default) metadata: creation_time : 2016-10-21 19:11:41 handler_name : iso media file produced google inc. stream #0:1(und): audio: aac (mp4a / 0x6134706d), 44100 hz, stereo, fltp, 125 kb/s (default) metadata: creation_time : 2016-10-21 19:11:41 handler_name : iso media file produced google inc. [null @ 0x14a0120] unable find suitable output format '542x320' 542x320: invalid argument [kevin@clipcentric 360video]$ ffmpeg -i 360timessquare.mp4 -s 542x320 360timessquare542x320.mp4 ffmpeg version 2.4 copyright (c) 2000-2014 ffmpeg developers built on sep 26 2015 22:27:26 gcc 4.8.3 (gcc) 20140911 (red hat 4.8.3-9) configuration: --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfreetype --enable-fontconfig --enable-libspeex --enable-libtheora --enable-frei0r --enable-libopencv --enable-zlib --enable-shared --disable-htmlpages --disable-podpages --disable-txtpages libavutil 54. 7.100 / 54. 7.100 libavcodec 56. 1.100 / 56. 1.100 libavformat 56. 4.101 / 56. 4.101 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 1.100 / 5. 1.100 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 0.100 / 53. 0.100 input #0, mov,mp4,m4a,3gp,3g2,mj2, '360timessquare.mp4': metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2016-10-21 19:11:41 duration: 00:14:18.09, start: 0.000000, bitrate: 2296 kb/s stream #0:0(und): video: h264 (main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [sar 1:1 dar 16:9], 2168 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default) metadata: creation_time : 2016-10-21 19:11:41 handler_name : iso media file produced google inc. stream #0:1(und): audio: aac (mp4a / 0x6134706d), 44100 hz, stereo, fltp, 125 kb/s (default) metadata: creation_time : 2016-10-21 19:11:41 handler_name : iso media file produced google inc. [libx264 @ 0x25f7a60] using sar=2560/2439 [libx264 @ 0x25f7a60] using cpu capabilities: mmx2 sse2fast ssse3 sse4.2 avx avx2 fma3 lzcnt bmi2 [libx264 @ 0x25f7a60] profile high, level 2.1 [libx264 @ 0x25f7a60] 264 - core 142 - h.264/mpeg-4 avc codec - copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 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=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 output #0, mp4, '360timessquare542x320.mp4': metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 encoder : lavf56.4.101 stream #0:0(und): video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 542x320 [sar 2560:2439 dar 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default) metadata: creation_time : 2016-10-21 19:11:41 handler_name : iso media file produced google inc. encoder : lavc56.1.100 libx264 stream #0:1(und): audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 44100 hz, stereo, s16, 128 kb/s (default) metadata: creation_time : 2016-10-21 19:11:41 handler_name : iso media file produced google inc. encoder : lavc56.1.100 libfdk_aac stream mapping: stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac)) press [q] stop, [?] frame=21452 fps= 66 q=-1.0 lsize= 64454kb time=00:14:18.09 bitrate= 615.3kbits/s video:50428kb audio:13439kb subtitle:0kb other streams:0kb global headers:0kb muxing overhead: 0.918954% [libx264 @ 0x25f7a60] frame i:86 avg qp:19.09 size: 45669 [libx264 @ 0x25f7a60] frame p:18026 avg qp:22.11 size: 2541 [libx264 @ 0x25f7a60] frame b:3340 avg qp:29.11 size: 572 [libx264 @ 0x25f7a60] consecutive b-frames: 75.9% 6.9% 9.6% 7.6% [libx264 @ 0x25f7a60] mb i16..4: 3.4% 30.9% 65.7% [libx264 @ 0x25f7a60] mb p i16..4: 0.1% 0.3% 0.3% p16..4: 25.1% 6.6% 7.4% 0.0% 0.0% skip:60.2% [libx264 @ 0x25f7a60] mb b i16..4: 0.0% 0.1% 0.1% b16..8: 13.3% 2.4% 1.3% direct: 1.9% skip:81.0% l0:25.9% l1:66.1% bi: 8.0% [libx264 @ 0x25f7a60] 8x8 transform intra:38.5% inter:48.3% [libx264 @ 0x25f7a60] coded y,uvdc,uvac intra: 81.5% 84.3% 58.6% inter: 14.3% 14.5% 2.8% [libx264 @ 0x25f7a60] i16 v,h,dc,p: 7% 49% 7% 37% [libx264 @ 0x25f7a60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 25% 17% 5% 7% 7% 11% 8% 9% [libx264 @ 0x25f7a60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 18% 14% 7% 8% 10% 11% 9% 7% [libx264 @ 0x25f7a60] i8c dc,h,v,p: 51% 25% 15% 9% [libx264 @ 0x25f7a60] weighted p-frames: y:1.5% uv:0.3% [libx264 @ 0x25f7a60] ref p l0: 77.6% 15.9% 5.2% 1.3% 0.0% [libx264 @ 0x25f7a60] ref b l0: 94.0% 5.1% 0.9% [libx264 @ 0x25f7a60] ref b l1: 96.1% 3.9% [libx264 @ 0x25f7a60] kb/s:481.43 #################post encoding ##################### $ mediainfo 360timessquare542x320.mp4 general complete name : 360timessquare542x320.mp4 format : mpeg-4 format profile : base media codec id : isom file size : 62.9 mib duration : 14mn 18s overall bit rate : 615 kbps encoded date : utc 1904-01-01 00:00:00 tagged date : utc 1904-01-01 00:00:00 writing application : lavf56.4.101 video id : 1 format : avc format/info : advanced video codec format profile : high@l2.1 format settings, cabac : yes format settings, reframes : 4 frames codec id : avc1 codec id/info : advanced video coding duration : 14mn 18s bit rate : 481 kbps width : 542 pixels height : 320 pixels display aspect ratio : 16:9 frame rate mode : constant frame rate : 25.000 fps color space : yuv chroma subsampling : 4:2:0 bit depth : 8 bits scan type : progressive bits/(pixel*frame) : 0.111 stream size : 49.2 mib (78%) writing library : x264 core 142 encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / 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=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00 encoded date : utc 1904-01-01 00:00:00 tagged date : utc 1904-01-01 00:00:00 audio id : 2 format : aac format/info : advanced audio codec format profile : lc codec id : 40 duration : 14mn 18s bit rate mode : constant bit rate : 128 kbps channel(s) : 2 channels channel positions : front: l r sampling rate : 44.1 khz compression mode : lossy stream size : 13.1 mib (21%) encoded date : utc 1904-01-01 00:00:00 tagged date : utc 1904-01-01 00:00:00
this related floating point issue in rendering in webgl 2.0 how previewing output. linking question: opengl es 2.0 texture distortion on large geometry gl_repeat
Comments
Post a Comment