User Tools

Site Tools


howto:convert-images

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:convert-images [2024/07/28 12:56] – [high quality conversion to mp4] Wulf Rajekhowto:convert-images [2025/01/05 18:28] (current) Wulf Rajek
Line 26: Line 26:
 find . -name '*.png' -type f -exec bash -c 'cwebp -z 9 "$0" -o "${0%.png}.webp"' {} \; find . -name '*.png' -type f -exec bash -c 'cwebp -z 9 "$0" -o "${0%.png}.webp"' {} \;
 #find . -type f -name '*.png' -delete #find . -type f -name '*.png' -delete
 +</code>
 +
 +===== lossy conversion of png to jpg =====
 +Converts all png files in the directory recursively to jpg
 +<code>
 +find . -iname '*.png' | while read i; do mogrify -format jpg "$i" && rm "$i"; echo "Converted $i to ${i%.*}.jpg"; done
 </code> </code>
  
Line 198: Line 204:
 </code> </code>
  
 +
 +===== 3D VR SBS to 2D =====
 +
 +https://blog.interstellar.co.jp/en/2022/06/21/converting-vr180-videos-to-2d-videos-with-ffmpeg/
 +
 +<code>
 +ffmpeg -i input.mp4 -vf v360=input=equirect:output=flat:ih_fov=180:iv_fov=180:h_fov=93:v_fov=121:in_stereo=sbs:w=960:h=640 -codec:v h264 output.mp4
 +</code>
 +
 +https://video.stackexchange.com/questions/21084/how-to-convert-a-3d-movie-to-2d-using-ffmpeg
 +
 +<code>
 +ffmpeg -i input.mkv -vf stereo3d=sbsl:ml -metadata:s:v:0 stereo_mode="mono" output.mkv
 +</code>
 +Use sbsl2:ml or  -aspect 16:9 if the aspect ratio is wrong
 +
 +
 +https://stackoverflow.com/questions/66960003/unwarping-180-vr-footage-with-ffmpeg-v360-filter
 +
 +
 +https://github.com/paulpaul999/vr-video-notes/blob/main/vr-to-flat/README.md
 +<code>
 +ffmpeg -i equirectangular.mp4 -filter:v "v360=input=hequirect:output=flat:in_stereo=sbs:out_stereo=2d:d_fov=125:w=1920:h=1080:pitch=+5" -map 0 -c copy -c:v h264 -pix_fmt yuv420p flat.mp4
 +</code>
howto/convert-images.1722167788.txt.gz · Last modified: 2024/07/28 12:56 by Wulf Rajek