Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # you will need some things
- # https://sourceforge.net/projects/avisynth2/
- # https://sourceforge.net/projects/megui/
- # https://forum.doom9.org/showthread.php?t=152860
- #
- # install avisynth, extract megui somewhere then extract defish.dll too
- #
- # also you need a script called defish.avs,
- # it's included below just copypaste this into notepad:
- LoadPlugin("C:\Users\ed\bin\megui\tools\lsmash\LSMASHSource.dll")
- LSMASHVideoSource("C0008.MP4").convertToRgb32()
- LoadPlugin("C:\Users\ed\bin\avisynth\defish.dll")
- defish(fov=84)
- convertToYV12()
- ####### END OF DEFISH.AVS #######
- # remember to change the paths to the dll files above actually
- # just deshake
- ##############################
- # let's first try to deshake the video
- # without correcting the fisheye effect
- # to see how well we can compress it
- # lines starting with # is just a comment or
- # statistics like how fast it went or what
- # deshake analysis:
- ffmpeg -ss 20 -i C0008.MP4 -t 30 -vf vidstabdetect=shakiness=10 -f null -
- # frame= 1799 fps= 11 q=-0.0 Lsize=N/A time=00:00:30.01 bitrate=N/A speed=0.188x
- # video:871kB audio:5625kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
- # deshaking and encoding (last line is final version, forget the rest):
- ffmpeg -ss 20 -i C0008.MP4 -t 30 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 -vcodec libx264 -preset veryslow -crf 18 -acodec copy pel.mkv
- ffmpeg -ss 20 -i C0008.MP4 -t 30 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4,scale=1280:720 -vcodec libx264 -preset veryslow -crf 24 -acodec copy pel2.mkv
- ffmpeg -ss 20 -i C0008.MP4 -t 30 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4,colorlevels=rimin=0.058:gimin=0.058:bimin=0.058,scale=1280:720 -vcodec libx264 -preset veryslow -crf 28 -acodec copy pel3.mkv
- ffmpeg -ss 20 -i C0008.MP4 -t 30 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4,curves=preset=darker,scale=1280:720 -vcodec libx264 -preset veryslow -crf 32 -acodec copy pel4.mkv
- # finally to compress the audio and make an mp4:
- ffmpeg -i pel4.mkv -vcodec copy -acodec aac -b:a 192k -movflags +faststart pel4.mp4
- # then with defish
- ##############################
- # ah whatever let's fix the fisheye too
- # deshake analysis:
- ffmpeg32 -ss 20 -i defish.avs -t 30 -vf vidstabdetect=shakiness=10 -f null -
- # frame= 1798 fps=3.4 q=-0.0 Lsize=N/A time=00:00:29.99 bitrate=N/A speed=0.0574x
- # video:674kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
- # deshaking and encoding:
- ffmpeg32 -ss 20 -i defish.avs -ss 20 -i C0008.MP4 -map 0:v -map 1:a -t 30 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4,curves=preset=darker,scale=1280:720 -vcodec libx264 -preset veryslow -crf 32 -acodec copy pel5.mkv
- # frame= 1798 fps=2.3 q=-1.0 Lsize= 13787kB time=00:00:29.99 bitrate=3764.9kbits/s speed=0.039x
- # video:7945kB audio:5818kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.172580%
- # compress audio and make mp4:
- ffmpeg -i pel5.mkv -vcodec copy -acodec aac -b:a 192k -movflags +faststart pel5.mp4
- # something i used for a phone video
- ffmpeg -i VID_20170907_141038.mp4 -vf vidstabdetect=shakiness=10 -f null -
- ffmpeg -i VID_20170907_141038.mp4 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4,scale=1024:576 -vcodec libx264 -preset veryslow -crf 32 -acodec copy jeg-besto.mkv
Advertisement
Add Comment
Please, Sign In to add comment