constantin-net

mpv_moc_ffmpeg_notes

Apr 12th, 2019 (edited)
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. { rule = { class = "mpv" },
  2. callback = function(c)
  3. local w_area = screen[ c.screen ].workarea
  4. awful.util.spawn_with_shell("mocp -P")
  5. -- if awful.tag.getidx() == 2
  6. -- then c:geometry( { width = 400 , height = 300, x = w_area.width - 640, y =w_area.height - 400 } )
  7. -- else c:geometry( { width = 100 , height = 100, x = w_area.width - 640, y =w_area.height - 400 } )
  8. c:geometry( { width = 400, height = 300 } )
  9. c:geometry( { x = w_area.width - c:geometry().width, y = w_area.height - c:geometry().height } )
  10. -- c:connect_signal("property::fullscreen", function() if not c.fullscreen then c.ontop = true end end)
  11. end, properties = { ontop = true, floating = true, maximized_horizontal = false, maximized_vertical = false, sticky = true } },
  12.  
  13.  
  14. Exec=/usr/bin/mocp --playit %f
  15. Exec=/usr/bin/mocp -c -a %f -p
  16.  
  17. function mocp_ff()
  18. awful.util.spawn_with_shell("mocp --seek +10")
  19. return false
  20. end
  21. function mocp_rew()
  22. awful.util.spawn_with_shell("mocp --seek -10")
  23. return false
  24. end
  25.  
  26. mocwidget:buttons(awful.util.table.join(
  27. awful.button({ }, 1, function () mocp_pause() end),
  28. awful.button({ }, 5, function () mocp_rew() end),
  29. awful.button({ }, 4, function () mocp_ff() end)
  30. ))
  31.  
  32. -- scrot_button
  33. scrot_button = awful.widget.button({ image = beautiful.scrot_icon })
  34. scrot_button:buttons(awful.util.table.join(
  35. awful.button({ }, 1, function () awful.util.spawn_with_shell("sleep 0.2; scrot -s -e 'mv $f ~/PrintScreen/'") end)
  36. ))
  37. ++scrot_button,
  38. ++theme.scrot_icon = config_dir .. "/themes/haru/icons2/screenshot.png"
  39.  
  40. Layout1 = directory(0,0,75%,85%):playlist(35%,45%,65%,55%)
  41.  
  42. gif
  43. ffmpeg -ignore_loop 0 -i anime.gif -i anime.mp3 -c:a libopus -c:v libvpx -b:v 200K -b:a 144k -shortest anime.webm
  44. 2-pass
  45. ffmpeg -i pdp.mp4 -c:v libvpx -pass 1 -b:v 1000K -threads 8 -speed 4 -tile-columns 6 -frame-parallel 1 -an -f webm /dev/null
  46. ffmpeg -i pdp.mp4 -c:v libvpx -pass 2 -b:v 1M -threads 2 -speed 1 -auto-alt-ref 1 -lag-in-frames 25 -c:a libvorbis -b:a 128k -f webm out.webm
  47. merge
  48. ffmpeg -i 1.mp4 -i 2.mp4 -i 3.mp4 -filter_complex "[0:v][0:a][1:v][1:a][2:v][2:a]concat=n=3:v=1:a=1[v][a]" -map [v] -map [a] output_video.mp4
  49. crop
  50. ffmpeg -i input.mp4 -vf "crop=480:270:200:100" -c:v libx264 -crf 0 -c:a copy output.mp4
  51.  
  52. ffmpeg -i source_video.avi -vn -ar 44100 -ac 2 -ab 192K -f mp3 sound.mp3
Add Comment
Please, Sign In to add comment