file2au.1 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. .Dd Jul 17, 2017
  2. .Dt FILE2AU 1
  3. .Os
  4. .Sh NAME
  5. .Nm file2au
  6. .Nd decode an Au formatted stream from an audio file
  7. .Sh SYNOPSIS
  8. .Nm
  9. .Op Fl C Ar command-fd
  10. .Op Fl I Ar info-fd
  11. .Op Fl b Ar buffer-size
  12. .Op Fl c Ar command-file
  13. .Op Fl i Ar info-file
  14. .Sh DESCRIPTION
  15. .Nm
  16. writes an Au formatted audio stream, converting from the
  17. .Sy file
  18. format.
  19. .Pp
  20. The options are as follows:
  21. .Bl -tag -width Ds
  22. .It Fl C Ar command-fd
  23. Use the specified file-descriptor as the command input.
  24. .It Fl I Ar info-fd
  25. Use the specified file-descriptor as the information output as opposed
  26. to the standard error.
  27. .It Fl b Ar buffer-size
  28. Override the default buffer size.
  29. .It Fl c Ar command-file
  30. Use the specified file as the command input.
  31. .It Fl i Ar info-file
  32. Use the specified file as the information output as opposed to the
  33. standard error.
  34. .It Fl v
  35. Automatically print to the information output. See the
  36. .Ic \?
  37. command below.
  38. .El
  39. .Pp
  40. The command input will recognize the following simple commands, and
  41. ignore any other input:
  42. .Bl -tag -width Ds
  43. .It Ic time | =time | =+time
  44. Seek to
  45. .Ic time ,
  46. relative to the start.
  47. .It Ic =-time
  48. Seek to
  49. .Ic time ,
  50. relative to the end.
  51. .It Ic +time | -time
  52. Seek
  53. .Ic time
  54. from the current position.
  55. .It Ic \?
  56. Print the current time and total time separated by a solidus
  57. .Pq Li /
  58. .It Ic q
  59. Stop decoding, close the file, and exit.
  60. .It Ic z Ar frequency
  61. Set the frequency of information printing with
  62. .Fl v
  63. in hertz. The default is 1000.
  64. .El
  65. .Sh EXAMPLES
  66. Play an audio file:
  67. .Pp
  68. .Dl file2au < file | au2dev
  69. .Pp
  70. Convert from high to low quality lossy compression:
  71. .Pp
  72. .Dl file2au < high | au2file -q0.1 > low
  73. .Pp
  74. Use the command input to seek ten and a half seconds into a two minute
  75. file:
  76. .Bd -literal -offset indent
  77. $ file2au -c command.fifo < file | ... &
  78. $ echo '10.5?' > command.fifo
  79. 10.5/120
  80. .Ed
  81. .Pp
  82. Poll the current position every second:
  83. .Bd -literal -offset indent
  84. $ while sleep 1; do
  85. > echo '?' > command.fifo
  86. > done
  87. 11.5/120
  88. 12.5/120
  89. 13.5/120
  90. ...
  91. .Ed
  92. .Pp
  93. Stop decoding, closing the file, and quit:
  94. .Bd -literal -offset indent
  95. $ file2au -c command.fifo < file | au2dev &
  96. $ echo q > command.fifo
  97. $
  98. [1] Done file2au -c command.fifo < file | au2dev
  99. $
  100. .Ed
  101. .Sh EXIT STATUS
  102. .Ex -std
  103. .Sh SEE ALSO
  104. .Xr au 7
  105. .Xr auopen 1
  106. .Xr auconv 1
  107. .Xr audev 1
  108. .Xr file2au 1
  109. .Xr flac 1
  110. .Xr oggdec 1
  111. .Xr oggenc 1
  112. .Sh BUGS
  113. Variable sample rates/widths are unsupported.