Advertisement
metalx1000

Convert files to Audio and Back again PSK31 and Modem

Jun 26th, 2016
684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. padsp gpsk31
  2.  
  3. #also look into minimodem for shell use
  4. #transmit (110 is the baud rate - higher faster but less accurate)
  5. echo "hello World"|minimodem --tx --ascii 110
  6.  
  7. #recieve
  8. minimodem --rx --ascii 110
  9.  
  10.  
  11. ##Save Base64 to File at high rate##
  12. #encode to base64 and convert to audio
  13. base64 img.jpg|minimodem --tx 1200 -f img.wav
  14. #convert to mp3 for size
  15. ffmpeg -i img.wav img.mp3
  16.  
  17. ##Convert back, decode, and display original image
  18. ffmpeg -i img.mp3 img_output.wav
  19. minimodem --rx 1200 -f img_output.wav|base64 -d >img_output.png
  20. display img_output.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement