Guest User

Untitled

a guest
Sep 9th, 2014
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. Tried to modify an x11grab command to just grab audio. Pulse Audio pavucontrol is open. I have not suspended pulse.
  2.  
  3. 1. This doesn't record audio - no errors, warnings, or other cryptic stuff:
  4. $ ffmpeg -f alsa -i hw:0,2 alsaout.wav
  5.  
  6. Is that because pulse is in the way?
  7.  
  8. 2. So I try this:
  9.  
  10. $ ffmpeg -f alsa -ac 2 -i pulse -acodec pcm_s16le pulsout.wav
  11. ffmpeg version git-2013-08-04-61af627 Copyright (c) 2000-2013 the FFmpeg developers
  12. built on Feb 19 2014 04:33:30 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
  13. configuration: --prefix=/mnt/video/ffmpeg/build --extra-cflags=-I/mnt/video/ffmpeg/build/include --extra-ldflags=-L/mnt/video/ffmpeg/build/lib --bindir=/mnt/video/ffmpeg/bin --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfreetype --enable-libspeex --enable-libtheora --enable-x11grab
  14. libavutil 52. 40.100 / 52. 40.100
  15. libavcodec 55. 20.100 / 55. 20.100
  16. libavformat 55. 13.101 / 55. 13.101
  17. libavdevice 55. 3.100 / 55. 3.100
  18. libavfilter 3. 82.100 / 3. 82.100
  19. libswscale 2. 4.100 / 2. 4.100
  20. libswresample 0. 17.103 / 0. 17.103
  21. libpostproc 52. 3.100 / 52. 3.100
  22. Guessed Channel Layout for Input Stream #0.0 : stereo
  23. Input #0, alsa, from 'pulse':
  24. Duration: N/A, start: 1410316193.387367, bitrate: 1536 kb/s
  25. Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
  26. File 'pulseout.wav' already exists. Overwrite ? [y/N] y
  27. Output #0, wav, to 'pulseout.wav':
  28. Metadata:
  29. ISFT : Lavf55.13.101
  30. Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
  31. Stream mapping:
  32. Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
  33. Press [q] to stop, [?] for help
  34. [wav @ 0x34711c0] Non-monotonous DTS in output stream 0:0; previous: 388039, current: 388029; changing to 388039. This may result in incorrect timestamps in the output file.
  35. [wav @ 0x34711c0] Non-monotonous DTS in output stream 0:0; previous: 1033917, current: 1033912; changing to 1033917. This may result in incorrect timestamps in the output file.
  36. [wav @ 0x34711c0] Non-monotonous DTS in output stream 0:0; previous: 1305512, current: 1305509; changing to 1305512. This may result in incorrect timestamps in the output file.
  37. [wav @ 0x34711c0] Non-monotonous DTS in output stream 0:0; previous: 1334275, current: 1334271; changing to 1334275. This may result in incorrect timestamps in the output file.
  38. size= 5623kB time=00:00:30.20 bitrate=1525.2kbits/s
  39. video:0kB audio:5622kB subtitle:0 global headers:0kB muxing overhead 0.001390%
  40.  
  41. Eh? Sometimes I get about 5 seconds of silence and only some of the audio that was playing before I pressed q to quit. Other times it seems like when overwriting the existing output file, it leaves some of the old file there. Sometimes it's hard to tell WTH happened because I only have two hands - one for the mouse to click play, one for the keyboard to hit enter, and somehow I'm trying to count musical ideas on my fingers to see if I caught what I intended (from overwrite?:y <enter> until q.) Maybe this is all because of the message about the DTS below, which I don't know how to fix:
  42.  
  43. [wav @ 0x20f21c0] Non-monotonous DTS in output stream 0:0; previous: 2266516, current: 2266511; changing to 2266516. This may result in incorrect timestamps in the output file.
  44.  
  45. 3. This records screen video and audio - I don't want the video, but at least, testing with a youtube vid, I can see the timestamp and know that I captured what I intended.
  46.  
  47. $ ffmpeg -f alsa -ar:1 44100 -ac 2 -i pulse -f x11grab -s 1920x1080 -i :0.0 -r 30 -threads 0 -c:v libx264 -q:v 0 allout.mp4
Advertisement
Add Comment
Please, Sign In to add comment