burncd.1 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. .\" burncd.1
  2. .\" Copyright 2018-2019 orbea
  3. .\" All rights reserved.
  4. .\"
  5. .\" Redistribution and use of this script, with or without modification, is
  6. .\" permitted provided that the following conditions are met:
  7. .\"
  8. .\" 1. Redistributions of this script must retain the above copyright
  9. .\" notice, this list of conditions and the following disclaimer.
  10. .\"
  11. .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
  12. .\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  14. .\" EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  16. .\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  17. .\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  18. .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  19. .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  20. .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  21. .\"
  22. .Dd August 29, 2019
  23. .Dt BURNCD 1
  24. .Os
  25. .Sh NAME
  26. .Nm burncd
  27. .Nd burn audio files to a blank CD
  28. .Sh SYNOPSIS
  29. .Nm
  30. .Op Fl dhnvV
  31. .Op Fl e Ar format ...
  32. .Op Fl f Ar format ...
  33. .Op Fl o Ar path
  34. .Op Fl z Ar device
  35. .Sh DESCRIPTION
  36. burncd is a portable POSIX shell script that uses
  37. .Xr cdrecord 1
  38. to burn audio files to a blank CD.
  39. It currently supports
  40. .Xr flac 1 ,
  41. wav and Sun/NeXT audio files which will be automatically detected from the
  42. current directory.
  43. .Ss AUDIO FORMATS
  44. By default
  45. .Nm
  46. will prefer wav and Sun/NeXT audio formats as
  47. .Xr cdrecord 1
  48. supports these files natively.
  49. It will then select
  50. .Xr flac 1
  51. files.
  52. Lossy audio formats will always be the least prefered.
  53. If any files exist in multiple audio formats it will use only the first.
  54. .Pp
  55. Currently supported audio formats by
  56. .Nm :
  57. .Pp
  58. .Bl -tag -width <TAB><TAB> -offset indent -compact
  59. .It Cm wav
  60. WAVE
  61. .It Cm au
  62. Sun/NeXT
  63. .It Cm flac
  64. FLAC
  65. .El
  66. .Ss AUDIO FILES
  67. Audio files will be detected from the current directory using the sanitized
  68. output of
  69. .Xr file 1 .
  70. This avoids issues related to filenames that do not have a correct filename
  71. extension.
  72. .Ss NON-NATIVE CD AUDIO FILES
  73. Audio files must be 44.1 kHz, 16-bit and stereo to be correctly work on blank
  74. audio CDs.
  75. If
  76. .Xr sox 1
  77. is found in the user's $PATH then it will be used to convert any audio files
  78. that are not properly supported.
  79. If
  80. .Xr sox 1
  81. is not found then
  82. .Nm
  83. will exit early when any such files are detected.
  84. .Ss CDRECORD PERMISSIONS
  85. Some distributions will install
  86. .Xr cdrecord 1
  87. without suid permissions for security concerns which will require
  88. .Nm
  89. to be run as root.
  90. Alternatively the user can add suid permissions to
  91. .Xr cdrecord 1 .
  92. .Pp
  93. For example the following commands can be used.
  94. .Bd -literal -offset indent
  95. # chown root:somegroup /usr/bin/cdrecord
  96. # chmod 4710 /usr/bin/cdrecord
  97. .Ed
  98. .Pp
  99. The user should then make sure they belong to 'somegroup'.
  100. .Ss ENVIRONMENT VARIABLES
  101. .Nm
  102. supports the following environment variables.
  103. .Pp
  104. .Bl -tag -width <TAB><TAB> -offset indent -compact
  105. .It Ev CDRECORD
  106. Path of the
  107. .Xr cdrecord 1
  108. binary.
  109. .It Ev FLAC
  110. Path of the
  111. .Xr flac 1
  112. binary.
  113. .It Ev SOX
  114. Path of the
  115. .Xr sox 1
  116. binary.
  117. .El
  118. .Sh OPTIONS
  119. A summary of the options is included below.
  120. .Bl -tag -width indent
  121. .It Fl d , -debug
  122. Show the debug output from external programs.
  123. .It Fl e , -exclude Ar format ...
  124. Configure the excluded audio formats.
  125. .It Fl f , -format Ar format ...
  126. Configure the default audio formats.
  127. .It Fl h , -help
  128. Show basic usage and a list of all options.
  129. .It Fl n , -dry-run
  130. Enable a test run without burning to a CD.
  131. .Nm
  132. will not check for a blank CD under this mode.
  133. .It Fl o , -output Ar path
  134. Configure the output directory path.
  135. Defaults to
  136. .Pa /tmp/CD .
  137. .It Fl v , -verbose
  138. Show the verbose
  139. .Nm
  140. output.
  141. .It Fl V , -version
  142. Show the
  143. .Nm
  144. version number.
  145. .It Fl z , -device Ar device
  146. Configure the CD drive path.
  147. Defaults to
  148. .Pa /dev/sr1 .
  149. .El
  150. .Sh EXAMPLES
  151. .Bl -tag -width indent
  152. .It Nm
  153. Burn audio files from the current directory to a blank CD.
  154. .It Nm Fl e Cm wav
  155. Exclude all wav audio files from the current directory.
  156. .It Nm Fl f Cm flac
  157. Prefer
  158. .Xr flac 1
  159. audio files from the current directory.
  160. .It Nm Fl o Cm /tmp
  161. Set the output directory path to
  162. .Pa /tmp .
  163. .It Nm Fl z Cm /dev/sr0
  164. Set the CD drive path to
  165. .Pa /dev/sr0 .
  166. .El
  167. .Sh SEE ALSO
  168. .Xr cdrecord 1 ,
  169. .Xr flac 1 ,
  170. .Xr sox 1
  171. .Sh AUTHORS
  172. .An -nosplit
  173. .Bl -tag -width "orbea Aq orbea@riseup.net " -compact
  174. .It An orbea Aq Mt orbea@riseup.net
  175. .El
  176. .Sh BUGS
  177. .Lk https://notabug.org/orbea/burncd/issues "Issue tracker"