Difference between revisions of "User:Fleetwood"

From ArchWiki
Jump to navigation Jump to search
(windows use of ffmpeg dshow "audio_device_number 0""screen-capture-recorder)
(how to extract audio stream from within a muxed video file)
Line 60: Line 60:
 
-----
 
-----
  
 +
Extract the audio ((bit)stream) from inside of a container file that consists of muxed (multi-plexed) audio + video, together (integrated):
 +
 +
<code>(pwd / location in local filesystem)(Command-line prompt)e:\Users\Public\Downloads\ffmpeg.zeranoe.com__builds\bin\ffmpeg -i "videofile.720.mp4" -vn -acodec copy aac-audio.m4a</code>
 +
 +
 +
<h3>in a nutshell...</h3>
 +
 +
<big><font color="grey">$ <nowiki>></nowiki></font> <font color="black">ffmpeg</font> <font color="purple">-i muxed.video</font> <font color="green">-acodec <b>copy</b></font> <font color="red">audio-only.file</font> </big>
 +
 +
 +
(explanation of) the schemea / formula of the above, concrete example (of a ) command line:
 +
 +
at command-prompt: <nowiki>$</nowiki> (binary of ffmpeg executable / or "command", if in "path" env. variable of command-line shell environment) <code>-i</code> (path to source / input file that will be altered in some way, in this case, the audio content will be extracted from  * ) any additional switches (telling ffmpeg what to do with the input / how to process it)  and, the last value/argument is the destination/target/output file that is <u><i>new</i>ly-created</u> <-- that contains the result, the effect  consequence of this operation (invoking/running the command line).
 +
 +
* btw, the way ffmpeg works, no alteration is made to the source/input file. That file is not edited in-place (ever!?). What ffmpeg does, is it produces output from that source file which it treats read-only. At minimum, given access to a correct source file, it will output information about that file (its metadata overhead,  and what compression algorithm format each  media stream is encoded in.)  In addition, optionally, a new file will be created, acccording to whatever options parameters conditions are specified (in the forms of switches, arguments, values). Operation
 +
 +
 +
 +
--------
  
  

Revision as of 20:56, 31 January 2015

Get dimensions (pixels location) of the window that you want to capture, for screen-casting remote desktop , screen recording Desktop capture screen-capture with:

xwininfo

THEN

sleep 5 && ffmpeg -f alsa -ac 1 -i pulse -f x11grab -r 10 -s 1024x720 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 0 output-file1.mkv

If Pulse audio is super-ceding ALSA, try:

-i hw:0

or

-i 'hw:1,0'


If top-left bound (corner) of the window (area / region) that you want captured/recorded is not 0,0 (top-most edge of display server Desktop, then add:

-i :0.0+62,168

to specify the left and top co-ordinate locations of the top-left of the window.


TIP: Disable your screen saver. That -will- interfere with the video that is captured. This is not semantic, instead it captures pixels (raster).

Download ffmpeg for Windows (daily/nightly build): http://FFmpeg.Zeranoe.com/builds/win32/static/ffmpeg-latest-win32-static.7z


Windows

When using Microsoft's OS (NT-based) , as opposed to a Unix or unix-like flavour OS distribution (e.g. BSDs or GNU/Linux),

E:\Users\Public\Downloads\windows-screen-recorder\ffmpeg-win\test>..\..\..\ffmpe g.zeranoe.com__builds\bin\ffmpeg -f dshow -framerate 10 -video_device_number 0 - i video="screen-capture-recorder" -f dshow -audio_device_number 0 -i audio="Head set Microphone (Logitech US" -filter_complex amix=inputs=1 -vcodec libx264 -pix_ fmt yuv420p -preset ultrafast -vsync vfr -acodec pcm_s16le ouput-video-filename_produced-by-running-this-command-line.mkv

The off-set that I successfully used with an X11 X.org GNU/Linux -based system didn't work , as well as "-s" switch for x and y width and height of capture region area (co-ordinates).

software solution download

"c:\Program Files\Screen Capturer Recorder\configuration_setup_utility\vendor\ffmpeg\bin\ffmpeg.exe" -f dshow -i audio="VIA HD Audio Input":video="screen-capture-recorder" -s 352x288 -r 20 -t 20 mobile-resolution-screen-capture.mp4

- source: this posting, on this thread.

The software program that offers that is called Screen Capturer Recorder.
Free binaries (installer packages) : http://SourceForge.net/projects/screencapturer/files/


recordmydesktop

recordmydesktop -width 1024 -height 720 -o $filename.720.1Mbps.ogv -delay $time -freq 44100 -channels 1 -fps 15 -s_quality 10 -v_bitrate 1000000

Extract the audio ((bit)stream) from inside of a container file that consists of muxed (multi-plexed) audio + video, together (integrated):

(pwd / location in local filesystem)(Command-line prompt)e:\Users\Public\Downloads\ffmpeg.zeranoe.com__builds\bin\ffmpeg -i "videofile.720.mp4" -vn -acodec copy aac-audio.m4a


in a nutshell...

$ > ffmpeg -i muxed.video -acodec copy audio-only.file


(explanation of) the schemea / formula of the above, concrete example (of a ) command line:

at command-prompt: $ (binary of ffmpeg executable / or "command", if in "path" env. variable of command-line shell environment) -i (path to source / input file that will be altered in some way, in this case, the audio content will be extracted from * ) any additional switches (telling ffmpeg what to do with the input / how to process it) and, the last value/argument is the destination/target/output file that is newly-created <-- that contains the result, the effect consequence of this operation (invoking/running the command line).

  • btw, the way ffmpeg works, no alteration is made to the source/input file. That file is not edited in-place (ever!?). What ffmpeg does, is it produces output from that source file which it treats read-only. At minimum, given access to a correct source file, it will output information about that file (its metadata overhead, and what compression algorithm format each media stream is encoded in.) In addition, optionally, a new file will be created, acccording to whatever options parameters conditions are specified (in the forms of switches, arguments, values). Operation




When using mkisofs don't forget to include "ERRCTL="WARN|ALL *" in the command line. Otherwise, if mkiso encounters a warning and certainly any errors, it will stop abort. uugh. Overcome that default beahvior by including that.

RIP 13.7 has all of the optical disc open-source software listed below, except libcdio ("cd-info", in particular).

libCDio from GNU

offers (at least one) tool that can query (report) stats status state of optical media (CD-Rs, DVD+Rs)

libcdio-utils: sample applications based on the CDIO libraries

    This package contains a collection of small libcdio-based tools:
     * cd-drive show CD-ROM drive characteristics
     * cd-info show information about a CD or CD-image
     * cd-paranoia an audio CD ripper
     * cd-read read information from a CD or CD-image
     * cdda-player a simple curses-based audio CD player
     * iso-info show information about an ISO 9660 image
     * iso-read read portions of an ISO 9660 image
     * mmc-tool issue low-level commands to a CD drive

source

which, in turn [1]


cd-info may need --dvd switch for DVD R media, of course. (never cd-rs, I assume)

cd-info --dvd

cd-info --dvd --iso9660

isoinfo

isoinfo -d -i /mnt/image/2014may7.iso

is like cd-info's --iso9660 switch. (well a combination of that and ...)

isoinfo -f -i /mnt/image/2014may7.iso

to either role/mode/command (report '-d' primary volume Descriptor (info head about volume as a whole) or list (find) "-l" contents (all files and folders)) -- optionally add switches "-J" for Joliet and -R for RockRidge extensions to / layers of the ISO 9660 volume.

others include

cdrwtool -d -i

dvd+rw-mediainfo

cdrecord ... -minfo , -msinfo , -toc switches (and maybe -atip)

cdrdao disk-info and cdrdao msinfo


xorriso

xorriso -devices

xorriso -indev /dev/sr0 -pvd_info

"pvd" stands for Primary Volume Descriptor, which reports information (metadata) about the ISO 9660 filesystem volume. That filesystem volume comprises the contents of a given, individual data track that resides on the optical medium (disc). The Primary Volume Descriptor is located (resides) in/at the beginning/top of that filesystem volume (data track / bitstream).

xorriso -indev /dev/sr0 -toc

"toc" is (stands for) Table of Contents, which is the overhead for the disc, overall / as a whole. The optical disc (medium)'s T.O.C. can be thought of as the equivalent to what a partition table is on/for other types of block storage devices, like USB flash drives, Solid State Drives, Hard Disc Drives (HDDs). The point here is, (the information that / what is reported/returned/output by that above command serves as information/data about the sessions (and tracks) on the disc (the overall layout structure of the contents of the disc).

cdda2wav

Compact Disc Digital Audio -> .wav (windows RIFF? container file, which contains/houses PCM audio samples (content / bistream).)

This app/program/utility is used for audio "ripping" or extraction

Apparently cdda2wav is capable of providing some data about data CD-Rs (and DVD Rs too?) too -- not just audio CDs.

-J --info-only switch.

Its cdrkit equivalent (sister app) is called : icedax (which stands for: the Incredible Digital Audio Extractor).

Linux mount

Also try mounting the filesystem storage volume on the disc

mount -t iso9660 -o norock,nojoliet -o noatime,uid=1000,gid=100 /dev/sr0 /mnt/image/

optionally add options like "session" to choose which session (if more than one session(track) is on the disc).

The "nojliet" and "norock" mount optiosn instruct the mount command to NOT mount the RockRidge and Joliet extensions/layers to ISO9660.

Windows

ImgBurn

ImgBurn has Read and Verify modes. It gives details stats figures

except what Windows Explorer gives (which corresponds to cdrecord -minfo (msinfo mode too?) for "Free:" free/unallocated space (capacity)

see /generate-optical-filesystems (ISO9660 and its optional extensions like Joliet and Rockridge and UDF)

DVDInfoPro

according to the description of the software it may use DVD Info Pro for the stats functionality (aspect).