videos VHS a digital (solucionado)

Imagen de gledof
4 puntos

Estoy pasando unos videos en VHS a la PC por medio de una placa capturadora. La unica forma que pude hacer funcionar esto fue utilizando "tvtime" para tomar la señal del videoreproductor y "recordMyDesktop" para capturar la ventana de "tvtime".
El problema que tengo es que los videos pesan mucho para lo que duran, por ejemplo una captura.ogv de 45-50 minutos pesa mas de 2gb.

Tamaño:2.3Gb.
Duracion:45 minutos
Dimension:752 x 592
CodecVideo:Thora/25 Frames per second
CodecAudio:Vorvis/mono/22050Hz/89kbps

Mi pregunta es a que formato puedo pasarlos para que pesen menos, intente pasarlos a .avi con "winff" y desde consola con el comando "ffmpeg" pero me da un error:

Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

Imagen de gledof
+1
0
-1

pero me da error. Renombre un archivo recien capturado en la carpeta de usuarios y jecute el comando como dice en la pagina y me devolvio esto:

$ ogv2avi video1.ogv
“Converting 1 files !”
“converting” video1.ogv
MEncoder svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
File not found: '“video1.ogv″'
Failed to open “video1.ogv″.
Cannot open file/device.

Exiting...

El paquete mencoder esta instalado.

+1
0
-1

Saludos.----

Imagen de gledof
+1
0
-1

comando correcto para convertir los archivos.

mencoder -idx out.ogg -ovc lavc -oac mp3lame -o video.avi

Pude convertir los archivos con Openshot pero me congelaba el video en algunos tramos y el sonido continuaba. Muchas gracias.

+1
0
-1

Saludos.----

Imagen de gledof
+1
0
-1

Resulto ser en parte una falsa solucion. El primer video que converti de pesar 2.3Gb paso a 300Mb. Con el segundo video la reduccion de peso fue similar, pero cuando lo abri para verlo me encuentro con que el original.ogv dura 53min. y el convertido.avi dura 39minutos, no solo redujo el tamaño del archivo sino que tambien le corto varios minutos al final.

+1
0
-1

Saludos.----

Imagen de gledof
+1
0
-1

reducir y cambiar el formato de los videos capturados con RecordMyDesktop. Busque en un tutorial de "mencoder" y probe varias opciones pero sigue quitando varios minutos del final de los videos, seria ideal si no borrara u omitiera de codificar en un nuevo formato partes del video original.

Y "ffmpeg" siempre me da el mismo error:

ffmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Jun 12 2012 16:37:58 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[ogg @ 0x9b6baa0] max_analyze_duration reached
Input #0, ogg, from 'ElViajeDelBrendan.ogv':
Duration: 00:43:02.96, start: 0.000000, bitrate: 6514 kb/s
Stream #0.0: Data: skeleton
Stream #0.1: Video: theora, yuv420p, 752x592 [PAR 1:1 DAR 47:37], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0.2: Audio: vorbis, 22050 Hz, mono, s16, 89 kb/s
[buffer @ 0x9db8f60] w:752 h:592 pixfmt:yuv420p
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 0x9d61840] invalid bit rate
Output #0, avi, to 'ElViajeDelBrendan.avi':
Stream #0.0: Video: mpeg4, yuv420p, 752x592 [PAR 1:1 DAR 47:37], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream #0.1: Audio: ac3, 22050 Hz, mono, flt, 200 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.2 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

+1
0
-1

Saludos.----

Imagen de Gabriel_M
+1
0
-1

... como te sugiere con avonv:

AVCONV
Section: (1)
Updated: 2011-10-27
Index
NAME
avconv - avconv video converter
SYNOPSIS
avconv [global options] [[infile options][-i infile]]... {[outfile options] outfile}...
DESCRIPTION
avconv is a very fast video and audio converter that can also grab froma live audio/video source. It can also convert between arbitrary samplerates and resize video on the fly with a high quality polyphase filter.
As a general rule, options are applied to the next specifiedfile. Therefore, order is important, and you can have the sameoption on the command line multiple times. Each occurrence isthen applied to the next input or output file.Exceptions from this rule are the global options (e.g. verbosity level),which should be specified first.
To set the video bitrate of the output file to 64kbit/s:
avconv -i input.avi -b 64k output.avi
To force the frame rate of the output file to 24 fps:
avconv -i input.avi -r 24 output.avi
To force the frame rate of the input file (valid for raw formats only)to 1 fps and the frame rate of the output file to 24 fps:
avconv -r 1 -i input.m2v -r 24 output.avi
The format option may be needed for raw input files.
STREAM SELECTION
By default avconv tries to pick the ``best'' stream of each type present in inputfiles and add them to each output file. For video, this means the highestresolution, for audio the highest channel count. For subtitle it's simply thefirst subtitle stream.
You can disable some of those defaults by using "-vn/-an/-sn" options. Forfull manual control, use the "-map" option, which disables the defaults justdescribed.
OPTIONS
All the numerical options, if not specified otherwise, accept in inputa string representing a number, which may contain one of theInternational System number postfixes, for example 'K', 'M', 'G'.If 'i' is appended after the postfix, powers of 2 are used instead ofpowers of 10. The 'B' postfix multiplies the value for 8, and can beappended after another postfix or used alone. This allows using forexample 'KB', 'MiB', 'G' and 'B' as postfix.
Options which do not take arguments are boolean options, and set thecorresponding value to true. They can be set to false by prefixingwith ``no'' the option name, for example using ``-nofoo'' in thecommandline will set to false the boolean option with name ``foo''.
Stream specifiers
Some options are applied per-stream, e.g. bitrate or codec. Stream specifiersare used to precisely specify which stream(s) does a given option belong to.
A stream specifier is a string generally appended to the option name andseparated from it by a colon. E.g. "-codec:a:1 ac3" option contains"a:1" stream specifer, which matches the second audio stream. Therefore itwould select the ac3 codec for the second audio stream.
A stream specifier can match several stream, the option is then applied to allof them. E.g. the stream specifier in "-b:a 128k" matches all audiostreams.
An empty stream specifier matches all streams, for example "-codec copy"or "-codec: copy" would copy all the streams without reencoding.
Possible forms of stream specifiers are:
stream_index
Matches the stream with this index. E.g. "-threads:1 4" would set thethread count for the second stream to 4.
stream_type[:stream_index]
stream_type is one of: 'v' for video, 'a' for audio, 's' for subtitle,'d' for data and 't' for attachments. If stream_index is given, thenmatches stream number stream_index of this type. Otherwise matches allstreams of this type.
p:program_id[:stream_index]
If stream_index is given, then matches stream number stream_index inprogram with id program_id. Otherwise matches all streams in this program.
Generic options
These options are shared amongst the av* tools.
-L
Show license.
-h, -?, -help, --help
Show help.
-version
Show version.
-formats
Show available formats.
The fields preceding the format names have the following meanings:
D
Decoding available
E
Encoding available
-codecs
Show available codecs.
The fields preceding the codec names have the following meanings:
D
Decoding available
E
Encoding available
V/A/S
Video/audio/subtitle codec
S
Codec supports slices
D
Codec supports direct rendering
T
Codec can handle input truncated at random locations instead of only at frame boundaries
-bsfs
Show available bitstream filters.
-protocols
Show available protocols.
-filters
Show available libavfilter filters.
-pix_fmts
Show available pixel formats.
-sample_fmts
Show available sample formats.
-loglevel loglevel | -v loglevel
Set the logging level used by the library.loglevel is a number or a string containing one of the following values:
quiet
panic
fatal
error
warning
info
verbose
debug
By default the program logs to stderr, if coloring is supported by theterminal, colors are used to mark errors and warnings. Log coloringcan be disabled setting the environment variableFFMPEG_FORCE_NOCOLOR or NO_COLOR, or can be forced settingthe environment variable FFMPEG_FORCE_COLOR.The use of the environment variable NO_COLOR is deprecated andwill be dropped in a following FFmpeg version.
AVOptions
These options are provided directly by the libavformat, libavdevice andlibavcodec libraries. To see the list of available AVOptions, use the-help option. They are separated into two categories:
generic
These options can be set for any container, codec or device. Generic options arelisted under AVFormatContext options for containers/devices and underAVCodecContext options for codecs.
private
These options are specific to the given container, device or codec. Privateoptions are listed under their corresponding containers/devices/codecs.
For example to write an ID3v2.3 header instead of a default ID3v2.4 toan MP3 file, use the id3v2_version private option of the MP3muxer:
ffmpeg -i input.flac -id3v2_version 3 out.mp3
All codec AVOptions are obviously per-stream, so the chapter on streamspecifiers applies to them
Note -nooption syntax cannot be used for boolean AVOptions, use -option0/-option 1.
Note2 old undocumented way of specifying per-stream AVOptions by prependingv/a/s to the options name is now obsolete and will be removed soon.
Main options
-f fmt (input/output)
Force input or output file format. The format is normally autodetected for inputfiles and guessed from file extension for output files, so this option is notneeded in most cases.
-i filename (input)
input file name
-y (global)
Overwrite output files without asking.
-c[:stream_specifier] codec (input/output,per-stream)
-codec[:stream_specifier] codec (input/output,per-stream)
Select an encoder (when used before an output file) or a decoder (when usedbefore an input file) for one or more streams. codec is the name of adecoder/encoder or a special value "copy" (output only) to indicate thatthe stream is not to be reencoded.
For example
avconv -i INPUT -map 0 -c:v libx264 -c:a copy OUTPUT
encodes all video streams with libx264 and copies all audio streams.
For each stream, the last matching "c" option is applied, so
avconv -i INPUT -map 0 -c copy -c:v:1 libx264 -c:a:137 libvorbis OUTPUT
will copy all the streams except the second video, which will be encoded withlibx264, and the 138th audio, which will be encoded with libvorbis.
-t duration (output)
Stop writing the output after its duration reaches duration.duration may be a number in seconds, or in "hh:mm:ss[.xxx]" form.
-fs limit_size (output)
Set the file size limit.
-ss position (input/output)
When used as an input option (before "-i"), seeks in this input file toposition. When used as an output option (before an output filename),decodes but discards input until the timestamps reach position. This isslower, but more accurate.
position may be either in seconds or in "hh:mm:ss[.xxx]" form.
-itsoffset offset (input)
Set the input time offset in seconds."[-]hh:mm:ss[.xxx]" syntax is also supported.The offset is added to the timestamps of the input files.Specifying a positive offset means that the correspondingstreams are delayed by offset seconds.
-metadata[:metadata_specifier] key=value (output,per-metadata)
Set a metadata key/value pair.
An optional metadata_specifier may be given to set metadataon streams or chapters. See "-map_metadata" documentation fordetails.
This option overrides metadata set with "-map_metadata". It isalso possible to delete metadata by using an empty value.
For example, for setting the title in the output file:
avconv -i in.avi -metadata title="my title" out.flv
To set the language of the second stream:
avconv -i INPUT -metadata:s:1 language=eng OUTPUT
-target type (output)
Specify target file type ("vcd", "svcd", "dvd", "dv","dv50"). type may be prefixed with "pal-", "ntsc-" or"film-" to use the corresponding standard. All the format options(bitrate, codecs, buffer sizes) are then set automatically. You can just type:
avconv -i myfile.avi -target vcd /tmp/vcd.mpg
Nevertheless you can specify additional options as long as you knowthey do not conflict with the standard, as in:
avconv -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
-dframes number (output)
Set the number of data frames to record. This is an alias for "-frames:d".
-frames[:stream_specifier] framecount (output,per-stream)
Stop writing to the stream after framecount frames.
-q[:stream_specifier] q (output,per-stream)
-qscale[:stream_specifier] q (output,per-stream)
Use fixed quality scale (VBR). The meaning of q iscodec-dependent.
-filter[:stream_specifier] filter_graph (output,per-stream)
filter_graph is a description of the filter graph to apply tothe stream. Use "-filters" to show all the available filters(including also sources and sinks).
-pre[:stream_specifier] preset_name (output,per-stream)
Specify the preset for matching stream(s).
-stats (global)
Print encoding progress/statistics. On by default.
Video Options
-vframes number (output)
Set the number of video frames to record. This is an alias for "-frames:v".
-r[:stream_specifier] fps (input/output,per-stream)
Set frame rate (Hz value, fraction or abbreviation), (default = 25).
-s[:stream_specifier] size (input/output,per-stream)
Set frame size. The format is wxh (ffserver default = 160x128, avconv default = same as source).The following abbreviations are recognized:
sqcif
128x96
qcif
176x144
cif
352x288
4cif
704x576
16cif
1408x1152
qqvga
160x120
qvga
320x240
vga
640x480
svga
800x600
xga
1024x768
uxga
1600x1200
qxga
2048x1536
sxga
1280x1024
qsxga
2560x2048
hsxga
5120x4096
wvga
852x480
wxga
1366x768
wsxga
1600x1024
wuxga
1920x1200
woxga
2560x1600
wqsxga
3200x2048
wquxga
3840x2400
whsxga
6400x4096
whuxga
7680x4800
cga
320x200
ega
640x350
hd480
852x480
hd720
1280x720
hd1080
1920x1080
-aspect[:stream_specifier] aspect (output,per-stream)
Set the video display aspect ratio specified by aspect.
aspect can be a floating point number string, or a string of theform num:den, where num and den are thenumerator and denominator of the aspect ratio. For example ``4:3'',``16:9'', ``1.3333'', and ``1.7777'' are valid argument values.
-vn (output)
Disable video recording.
-bt tolerance
Set video bitrate tolerance (in bits, default 4000k).Has a minimum value of: (target_bitrate/target_framerate).In 1-pass mode, bitrate tolerance specifies how far ratecontrol iswilling to deviate from the target average bitrate value. This isnot related to min/max bitrate. Lowering tolerance too much hasan adverse effect on quality.
-maxrate bitrate
Set max video bitrate (in bit/s).Requires -bufsize to be set.
-minrate bitrate
Set min video bitrate (in bit/s).Most useful in setting up a CBR encode:
avconv -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
It is of little use elsewise.
-bufsize size
Set video buffer verifier buffer size (in bits).
-vcodec codec (output)
Set the video codec. This is an alias for "-codec:v".
-same_quant
Use same quantizer as source (implies VBR).
Note that this is NOT SAME QUALITY. Do not use this option unless you know youneed it.
-pass n
Select the pass number (1 or 2). It is used to do two-passvideo encoding. The statistics of the video are recorded in the firstpass into a log file (see also the option -passlogfile),and in the second pass that log file is used to generate the videoat the exact requested bitrate.On pass 1, you may just deactivate audio and set output to null,examples for Windows and Unix:
avconv -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y NUL avconv -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y /dev/null
-passlogfile prefix (global)
Set two-pass log file name prefix to prefix, the default file nameprefix is ``av2pass''. The complete file name will bePREFIX-N.log, where N is a number specific to the outputstream.
-vf filter_graph (output)
filter_graph is a description of the filter graph to apply tothe input video.Use the option ``-filters'' to show all the available filters (includingalso sources and sinks). This is an alias for "-filter:v".
Advanced Video Options
-pix_fmt[:stream_specifier] format (input/output,per-stream)
Set pixel format. Use "-pix_fmts" to show all the supportedpixel formats.
-sws_flags flags (input/output)
Set SwScaler flags.
-g gop_size
Set the group of pictures size.
-vdt n
Discard threshold.
-qmin q
minimum video quantizer scale (VBR)
-qmax q
maximum video quantizer scale (VBR)
-qdiff q
maximum difference between the quantizer scales (VBR)
-qblur blur
video quantizer scale blur (VBR) (range 0.0 - 1.0)
-qcomp compression
video quantizer scale compression (VBR) (default 0.5).Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0
-lmin lambda
minimum video lagrange factor (VBR)
-lmax lambda
max video lagrange factor (VBR)
-mblmin lambda
minimum macroblock quantizer scale (VBR)
-mblmax lambda
maximum macroblock quantizer scale (VBR)
These four options (lmin, lmax, mblmin, mblmax) use 'lambda' units,but you may use the QP2LAMBDA constant to easily convert from 'q' units:
avconv -i src.ext -lmax 21*QP2LAMBDA dst.ext
-rc_init_cplx complexity
initial complexity for single pass encoding
-b_qfactor factor
qp factor between P- and B-frames
-i_qfactor factor
qp factor between P- and I-frames
-b_qoffset offset
qp offset between P- and B-frames
-i_qoffset offset
qp offset between P- and I-frames
-rc_eq equation
Set rate control equation (see section ``Expression Evaluation'')(default = "tex^qComp").
When computing the rate control equation expression, besides thestandard functions defined in the section ``Expression Evaluation'', thefollowing functions are available:
bits2qp(bits)
qp2bits(qp)
and the following constants are available:
iTex
pTex
tex
mv
fCode
iCount
mcVar
var
isI
isP
isB
avgQP
qComp
avgIITex
avgPITex
avgPPTex
avgBPTex
avgTex
-rc_override[:stream_specifier] override (output,per-stream)
rate control override for specific intervals
-me_method method
Set motion estimation method to method.Available methods are (from lowest to best quality):
zero
Try just the (0, 0) vector.
phods
log
x1
hex
umh
epzs
(default method)
full
exhaustive search (slow and marginally better than epzs)
-er n
Set error resilience to n.
1
FF_ER_CAREFUL (default)
2
FF_ER_COMPLIANT
3
FF_ER_AGGRESSIVE
4
FF_ER_VERY_AGGRESSIVE
-ec bit_mask
Set error concealment to bit_mask. bit_mask is a bit mask ofthe following values:
1
FF_EC_GUESS_MVS (default = enabled)
2
FF_EC_DEBLOCK (default = enabled)
-bf frames
Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
-mbd mode
macroblock decision
0
FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in avconv).
1
FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.
2
FF_MB_DECISION_RD: rate distortion
-bug param
Work around encoder bugs that are not auto-detected.
-strict strictness
How strictly to follow the standards.
-deinterlace
Deinterlace pictures.
-vstats
Dump video coding statistics to vstats_HHMMSS.log.
-vstats_file file
Dump video coding statistics to file.
-top[:stream_specifier] n (output,per-stream)
top=1/bottom=0/auto=-1 field first
-dc precision
Intra_dc_precision.
-vtag fourcc/tag (output)
Force video tag/fourcc. This is an alias for "-tag:v".
-qphist (global)
Show QP histogram.
-force_key_frames[:stream_specifier] time[,time...] (output,per-stream)
Force key frames at the specified timestamps, more precisely at the firstframes after each specified time.This option can be useful to ensure that a seek point is present at achapter mark or any other designated place in the output file.The timestamps must be specified in ascending order.
Audio Options
-aframes number (output)
Set the number of audio frames to record. This is an alias for "-frames:a".
-ar[:stream_specifier] freq (input/output,per-stream)
Set the audio sampling frequency. For output streams it is set bydefault to the frequency of the corresponding input stream. For inputstreams this option only makes sense for audio grabbing devices and rawdemuxers and is mapped to the corresponding demuxer options.
-aq q (output)
Set the audio quality (codec-specific, VBR). This is an alias for -q:a.
-ac[:stream_specifier] channels (input/output,per-stream)
Set the number of audio channels. For output streams it is set bydefault to the number of input audio channels. For input streamsthis option only makes sense for audio grabbing devices and raw demuxersand is mapped to the corresponding demuxer options.
-an (output)
Disable audio recording.
-acodec codec (input/output)
Set the audio codec. This is an alias for "-codec:a".
-sample_fmt[:stream_specifier] sample_fmt (output,per-stream)
Set the audio sample format. Use "-help sample_fmts" to get a listof supported sample formats.
Advanced Audio options:
-atag fourcc/tag (output)
Force audio tag/fourcc. This is an alias for "-tag:a".
-audio_service_type type
Set the type of service that the audio stream contains.
ma
Main Audio Service (default)
ef
Effects
vi
Visually Impaired
hi
Hearing Impaired
di
Dialogue
co
Commentary
em
Emergency
vo
Voice Over
ka
Karaoke
Subtitle options:
-scodec codec (input/output)
Set the subtitle codec. This is an alias for "-codec:s".
-sn (output)
Disable subtitle recording.
Audio/Video grab options
-isync (global)
Synchronize read on input.
Advanced options
-map [-]input_file_id[:stream_specifier][,sync_file_id[:stream_specifier]] (output)
Designate one or more input streams as a source for the output file. Each inputstream is identified by the input file index input_file_id andthe input stream index input_stream_id within the inputfile. Both indices start at 0. If specified,sync_file_id:stream_specifier sets which input streamis used as a presentation sync reference.
The first "-map" option on the command line specifies thesource for output stream 0, the second "-map" option specifiesthe source for output stream 1, etc.
A "-" character before the stream identifier creates a ``negative'' mapping.It disables matching streams from already created mappings.
For example, to map ALL streams from the first input file to output
avconv -i INPUT -map 0 output
For example, if you have two audio streams in the first input file,these streams are identified by ``0:0'' and ``0:1''. You can use"-map" to select which streams to place in an output file. Forexample:
avconv -i INPUT -map 0:1 out.wav
will map the input stream in INPUT identified by ``0:1'' tothe (single) output stream in out.wav.
For example, to select the stream with index 2 from input filea.mov (specified by the identifier ``0:2''), and stream withindex 6 from input b.mov (specified by the identifier ``1:6''),and copy them to the output file out.mov:
avconv -i a.mov -i b.mov -c copy -map 0:2 -map 1:6 out.mov
To select all video and the third audio stream from an input file:
avconv -i INPUT -map 0:v -map 0:a:2 OUTPUT
To map all the streams except the second audio, use negative mappings
avconv -i INPUT -map 0 -map -0:a:1 OUTPUT
Note that using this option disables the default mappings for this output file.
-map_metadata[:metadata_type][:index] infile[:metadata_type][:index] (output,per-metadata)
Set metadata information of the next output file from infile. Note thatthose are file indices (zero-based), not filenames.Optional metadata_type parameters specify, which metadata to copy - (g)lobal(i.e. metadata that applies to the whole file), per-(s)tream, per-(c)hapter orper-(p)rogram. All metadata specifiers other than global must be followed by thestream/chapter/program index. If metadata specifier is omitted, it defaults toglobal.
By default, global metadata is copied from the first input file,per-stream and per-chapter metadata is copied along with streams/chapters. Thesedefault mappings are disabled by creating any mapping of the relevant type. A negativefile index can be used to create a dummy mapping that just disables automatic copying.
For example to copy metadata from the first stream of the input file to global metadataof the output file:
avconv -i in.ogg -map_metadata 0:s:0 out.mp3
-map_chapters input_file_index (output)
Copy chapters from input file with index input_file_index to the nextoutput file. If no chapter mapping is specified, then chapters are copied fromthe first input file with at least one chapter. Use a negative file index todisable any chapter copying.
-debug
Print specific debug info.
-benchmark (global)
Show benchmarking information at the end of an encode.Shows CPU time used and maximum memory consumption.Maximum memory consumption is not supported on all systems,it will usually display as 0 if not supported.
-timelimit duration (global)
Exit after avconv has been running for duration seconds.
-dump (global)
Dump each input packet to stderr.
-hex (global)
When dumping packets, also dump the payload.
-ps size
Set RTP payload size in bytes.
-re (input)
Read input at native frame rate. Mainly used to simulate a grab device.
-threads count
Thread count.
-vsync parameter
Video sync method.
0
Each frame is passed with its timestamp from the demuxer to the muxer.
1
Frames will be duplicated and dropped to achieve exactly the requestedconstant framerate.
2
Frames are passed through with their timestamp or dropped so as toprevent 2 frames from having the same timestamp.
-1
Chooses between 1 and 2 depending on muxer capabilities. This is thedefault method.
With -map you can select from which stream the timestamps should betaken. You can leave either video or audio unchanged and sync theremaining stream(s) to the unchanged one.
-async samples_per_second
Audio sync method. ``Stretches/squeezes'' the audio stream to match the timestamps,the parameter is the maximum samples per second by which the audio is changed.-async 1 is a special case where only the start of the audio stream is correctedwithout any later correction.
-copyts
Copy timestamps from input to output.
-copytb
Copy input stream time base from input to output when stream copying.
-shortest
Finish encoding when the shortest input stream ends.
-dts_delta_threshold
Timestamp discontinuity delta threshold.
-muxdelay seconds (input)
Set the maximum demux-decode delay.
-muxpreload seconds (input)
Set the initial demux-decode delay.
-streamid output-stream-index:new-value (output)
Assign a new stream-id value to an output stream. This option should bespecified prior to the output filename to which it applies.For the situation where multiple output files exist, a streamidmay be reassigned to a different value.
For example, to set the stream 0 PID to 33 and the stream 1 PID to 36 foran output mpegts file:
avconv -i infile -streamid 0:33 -streamid 1:36 out.ts
-bsf[:stream_specifier] bitstream_filters (output,per-stream)
Set bitstream filters for matching streams. bistream_filters isa comma-separated list of bitstream filters. Use the "-bsfs" optionto get the list of bitstream filters.
avconv -i h264.mp4 -c:v copy -vbsf h264_mp4toannexb -an out.h264 avconv -i file.mov -an -vn -sbsf mov2textsub -c:s copy -f rawvideo sub.txt
-tag[:stream_specifier] codec_tag (output,per-stream)
Force a tag/fourcc for matching streams.
TIPS
For streaming at very low bitrate application, use a low frame rateand a small GOP size. This is especially true for RealVideo wherethe Linux player does not seem to be very fast, so it can missframes. An example is:
avconv -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm
The parameter 'q' which is displayed while encoding is the currentquantizer. The value 1 indicates that a very good quality couldbe achieved. The value 31 indicates the worst quality. If q=31 appearstoo often, it means that the encoder cannot compress enough to meetyour bitrate. You must either increase the bitrate, decrease theframe rate or decrease the frame size.
If your computer is not fast enough, you can speed up thecompression at the expense of the compression ratio. You can use'-me zero' to speed up motion estimation, and '-intra' to disablemotion estimation completely (you have only I-frames, which means itis about as good as JPEG compression).
To have very low audio bitrates, reduce the sampling frequency(down to 22050 Hz for MPEG audio, 22050 or 11025 for AC-3).
To have a constant quality (but a variable bitrate), use the option'-qscale n' when 'n' is between 1 (excellent quality) and 31 (worstquality).
EXAMPLES
Preset files
A preset file contains a sequence of option=value pairs, one foreach line, specifying a sequence of options which can be specified also onthe command line. Lines starting with the hash ('#') character are ignored andare used to provide comments. Empty lines are also ignored. Check thepresets directory in the Libav source tree for examples.
Preset files are specified with the "pre" option, this option takes apreset name as input. Avconv searches for a file named preset_name.avpreset inthe directories $AVCONV_DATADIR (if set), and $HOME/.avconv, and inthe data directory defined at configuration time (usually $PREFIX/share/avconv)in that order. For example, if the argument is "libx264-max", it willsearch for the file libx264-max.avpreset.
Video and Audio grabbing
If you specify the input format and device then avconv can grab videoand audio directly.
avconv -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
Note that you must activate the right video source and channel beforelaunching avconv with any TV viewer such as
xawtv ("http://linux.bytesex.org/xawtv/") by Gerd Knorr. You alsohave to set the audio recording levels correctly with astandard mixer.
X11 grabbing
Grab the X11 display with avconv via
avconv -f x11grab -s cif -r 25 -i :0.0 /tmp/out.mpg
0.0 is display.screen number of your X11 server, same asthe DISPLAY environment variable.
avconv -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
0.0 is display.screen number of your X11 server, same as the DISPLAY environmentvariable. 10 is the x-offset and 20 the y-offset for the grabbing.
Video and Audio file format conversion
Any supported file format and protocol can serve as input to avconv:
Examples:
You can use YUV files as input:
avconv -i /tmp/test%d.Y /tmp/out.mpg
It will use the files:
/tmp/test0.Y, /tmp/test0.U, /tmp/test0.V, /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
The Y files use twice the resolution of the U and V files. They areraw files, without header. They can be generated by all decent videodecoders. You must specify the size of the image with the -s optionif avconv cannot guess it.
You can input from a raw YUV420P file:
avconv -i /tmp/test.yuv /tmp/out.avi
test.yuv is a file containing raw YUV planar data. Each frame is composedof the Y plane followed by the U and V planes at half vertical andhorizontal resolution.
You can output to a raw YUV420P file:
avconv -i mydivx.avi hugefile.yuv
You can set several input files and output files:
avconv -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
Converts the audio file a.wav and the raw YUV video file a.yuvto MPEG file a.mpg.
You can also do audio and video conversions at the same time:
avconv -i /tmp/a.wav -ar 22050 /tmp/a.mp2
Converts a.wav to MPEG audio at 22050 Hz sample rate.
You can encode to several formats at the same time and define amapping from input stream to output streams:
avconv -i /tmp/a.wav -map 0:a -b 64k /tmp/a.mp2 -map 0:a -b 128k /tmp/b.mp2
Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-mapfile:index' specifies which input stream is used for each outputstream, in the order of the definition of output streams.
You can transcode decrypted VOBs:
avconv -i snatch_1.vob -f avi -c:v mpeg4 -b:v 800k -g 300 -bf 2 -c:a libmp3lame -b:a 128k snatch.avi
This is a typical DVD ripping example; the input is a VOB file, theoutput an AVI file with MPEG-4 video and MP3 audio. Note that in thiscommand we use B-frames so the MPEG-4 stream is DivX5 compatible, andGOP size is 300 which means one intra frame every 10 seconds for 29.97fpsinput video. Furthermore, the audio stream is MP3-encoded so you needto enable LAME support by passing "--enable-libmp3lame" to configure.The mapping is particularly useful for DVD transcodingto get the desired audio language.
NOTE: To see the supported input formats, use "avconv -formats".
You can extract images from a video, or create a video from many images:
For extracting images from a video:
avconv -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
This will extract one video frame per second from the video and willoutput them in files named foo-001.jpeg, foo-002.jpeg,etc. Images will be rescaled to fit the new WxH values.
If you want to extract just a limited number of frames, you can use theabove command in combination with the -vframes or -t option, or incombination with -ss to start extracting from a certain point in time.
For creating a video from many images:
avconv -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
The syntax "foo-%03d.jpeg" specifies to use a decimal numbercomposed of three digits padded with zeroes to express the sequencenumber. It is the same syntax supported by the C printf function, butonly formats accepting a normal integer are suitable.
You can put many streams of the same type in the output:
avconv -i test1.avi -i test2.avi -map 0.3 -map 0.2 -map 0.1 -map 0.0 -c copy test12.nut
The resulting output file test12.avi will contain first four streams fromthe input file in reverse order.
EXPRESSION EVALUATION
When evaluating an arithemetic expression, FFmpeg uses an internalformula evaluator, implemented through the libavutil/eval.hinterface.
An expression may contain unary, binary operators, constants, andfunctions.
Two expressions expr1 and expr2 can be combined to formanother expression "expr1;expr2".expr1 and expr2 are evaluated in turn, and the newexpression evaluates to the value of expr2.
The following binary operators are available: "+", "-","*", "/", "^".
The following unary operators are available: "+", "-".
The following functions are available:
sinh(x)
cosh(x)
tanh(x)
sin(x)
cos(x)
tan(x)
atan(x)
asin(x)
acos(x)
exp(x)
log(x)
abs(x)
squish(x)
gauss(x)
isnan(x)
Return 1.0 if x is NAN, 0.0 otherwise.
mod(x, y)
max(x, y)
min(x, y)
eq(x, y)
gte(x, y)
gt(x, y)
lte(x, y)
lt(x, y)
st(var, expr)
Allow to store the value of the expression expr in an internalvariable. var specifies the number of the variable where tostore the value, and it is a value ranging from 0 to 9. The functionreturns the value stored in the internal variable.
ld(var)
Allow to load the value of the internal variable with numbervar, which was previosly stored with st(var, expr).The function returns the loaded value.
while(cond, expr)
Evaluate expression expr while the expression cond isnon-zero, and returns the value of the last expr evaluation, orNAN if cond was always false.
ceil(expr)
Round the value of expression expr upwards to the nearestinteger. For example, ``ceil(1.5)'' is ``2.0''.
floor(expr)
Round the value of expression expr downwards to the nearestinteger. For example, ``floor(-1.5)'' is ``-2.0''.
trunc(expr)
Round the value of expression expr towards zero to the nearestinteger. For example, ``trunc(-1.5)'' is ``-1.0''.
sqrt(expr)
Compute the square root of expr. This is equivalent to"(expr)^.5".
not(expr)
Return 1.0 if expr is zero, 0.0 otherwise.
pow(x, y)
Compute the power of x elevated y, it is equivalent to"(x)^(y)".
random(x)
Return a pseudo random value between 0.0 and 1.0. x is the index of theinternal variable which will be used to save the seed/state.
hypot(x, y)
This function is similar to the C function with the same name; it returns"sqrt(x*x + y*y)", the length of the hypotenuse of aright triangle with sides of length x and y, or the distance of thepoint (x, y) from the origin.
gcd(x, y)
Return the greatest common divisor of x and y. If both x andy are 0 or either or both are less than zero then behavior is undefined.
The following constants are available:
PI
area of the unit disc, approximatively 3.14
E
exp(1) (Euler's number), approximatively 2.718
PHI
golden ratio (1+sqrt(5))/2, approximatively 1.618
Note that:
"*" works like AND
"+" works like OR
thus
if A then B else C
is equivalent to
A*B + not(A)*C
In your C code, you can extend the list of unary and binary functions,and define recognized constants, so that they are available for yourexpressions.
The evaluator also recognizes the International System numberpostfixes. If 'i' is appended after the postfix, powers of 2 are usedinstead of powers of 10. The 'B' postfix multiplies the value for 8,and can be appended after another postfix or used alone. This allowsusing for example 'KB', 'MiB', 'G' and 'B' as postfix.
Follows the list of available International System postfixes, withindication of the corresponding powers of 10 and of 2.
y
-24 / -80
z
-21 / -70
a
-18 / -60
f
-15 / -50
p
-12 / -40
n
-9 / -30
u
-6 / -20
m
-3 / -10
c
-2
d
-1
h
2
k
3 / 10
K
3 / 10
M
6 / 20
G
9 / 30
T
12 / 40
P
15 / 40
E
18 / 50
Z
21 / 60
Y
24 / 70
ENCODERS
Encoders are configured elements in FFmpeg which allow the encoding ofmultimedia streams.
When you configure your FFmpeg build, all the supported native encodersare enabled by default. Encoders requiring an external library must be enabledmanually via the corresponding "--enable-lib" option. You can list allavailable encoders using the configure option "--list-encoders".
You can disable all the encoders with the configure option"--disable-encoders" and selectively enable / disable single encoderswith the options "--enable-encoder=ENCODER" /"--disable-encoder=ENCODER".
The option "-codecs" of the ff* tools will display the list ofenabled encoders.
AUDIO ENCODERS
A description of some of the currently available audio encodersfollows.
ac3 and ac3_fixed
AC-3 audio encoders.
These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well asthe undocumented RealAudio 3 (a.k.a. dnet).
The ac3 encoder uses floating-point math, while the ac3_fixedencoder only uses fixed-point integer math. This does not mean that one isalways faster, just that one or the other may be better suited to aparticular system. The floating-point encoder will generally produce betterquality audio for a given bitrate. The ac3_fixed encoder is not thedefault codec for any of the output formats, so it must be specified explicitlyusing the option "-acodec ac3_fixed" in order to use it.
AC-3 Metadata
The AC-3 metadata options are used to set parameters that describe the audio,but in most cases do not affect the audio encoding itself. Some of the optionsdo directly affect or influence the decoding and playback of the resultingbitstream, while others are just for informational purposes. A few of theoptions will add bits to the output stream that could otherwise be used foraudio data, and will thus affect the quality of the output. Those will beindicated accordingly with a note in the option list below.
These parameters are described in detail in several publicly-availabledocuments.
*
*

*
*
Metadata Control Options
-per_frame_metadata boolean
Allow Per-Frame Metadata. Specifies if the encoder should check for changingmetadata for each frame.
0
The metadata values set at initialization will be used for every frame in thestream. (default)
1
Metadata values can be changed before encoding each frame.

Downmix Levels

-center_mixlev level
Center Mix Level. The amount of gain the decoder should apply to the centerchannel when downmixing to stereo. This field will only be written to thebitstream if a center channel is present. The value is specified as a scalefactor. There are 3 valid values:
0.707
Apply -3dB gain
0.595
Apply -4.5dB gain (default)
0.500
Apply -6dB gain
-surround_mixlev level
Surround Mix Level. The amount of gain the decoder should apply to the surroundchannel(s) when downmixing to stereo. This field will only be written to thebitstream if one or more surround channels are present. The value is specifiedas a scale factor. There are 3 valid values:
0.707
Apply -3dB gain
0.500
Apply -6dB gain (default)
0.000
Silence Surround Channel(s)

Audio Production Information
Audio Production Information is optional information describing the mixingenvironment. Either none or both of the fields are written to the bitstream.
-mixing_level number
Mixing Level. Specifies peak sound pressure level (SPL) in the productionenvironment when the mix was mastered. Valid values are 80 to 111, or -1 forunknown or not indicated. The default value is -1, but that value cannot beused if the Audio Production Information is written to the bitstream. Therefore,if the "room_type" option is not the default value, the "mixing_level"option must not be -1.
-room_type type
Room Type. Describes the equalization used during the final mixing session atthe studio or on the dubbing stage. A large room is a dubbing stage with theindustry standard X-curve equalization; a small room has flat equalization.This field will not be written to the bitstream if both the "mixing_level"option and the "room_type" option have the default values.

0
notindicated
Not Indicated (default)
1
large
Large Room
2
small
Small Room

Other Metadata Options

-copyright boolean
Copyright Indicator. Specifies whether a copyright exists for this audio.

0
off
No Copyright Exists (default)
1
on
Copyright Exists

-dialnorm value
Dialogue Normalization. Indicates how far the average dialogue level of theprogram is below digital 100% full scale (0 dBFS). This parameter determines alevel shift during audio reproduction that sets the average volume of thedialogue to a preset level. The goal is to match volume level between programsources. A value of -31dB will result in no volume level change, relative tothe source volume, during audio reproduction. Valid values are whole numbers inthe range -31 to -1, with -31 being the default.
-dsur_mode mode
Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround(Pro Logic). This field will only be written to the bitstream if the audiostream is stereo. Using this option does NOT mean the encoder will actuallyapply Dolby Surround processing.

0
notindicated
Not Indicated (default)
1
off
Not Dolby Surround Encoded
2
on
Dolby Surround Encoded
-original boolean
Original Bit Stream Indicator. Specifies whether this audio is from theoriginal source and not a copy.

0
off
Not Original Source
1
on
Original Source (default)
Extended Bitstream Information
The extended bitstream options are part of the Alternate Bit Stream Syntax asspecified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.If any one parameter in a group is specified, all values in that group will bewritten to the bitstream. Default values are used for those that are writtenbut have not been specified. If the mixing levels are written, the decoderwill use these values instead of the ones specified in the "center_mixlev"and "surround_mixlev" options if it supports the Alternate Bit StreamSyntax.
Extended Bitstream Information - Part 1
-dmix_mode mode
Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt(Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.

0
notindicated
Not Indicated (default)
1
ltrt
Lt/Rt Downmix Preferred
2
loro
Lo/Ro Downmix Preferred
-ltrt_cmixlev level
Lt/Rt Center Mix Level. The amount of gain the decoder should apply to thecenter channel when downmixing to stereo in Lt/Rt mode.

1.414
Apply +3dB gain
1.189
Apply +1.5dB gain
1.000
Apply 0dB gain
0.841
Apply -1.5dB gain
0.707
Apply -3.0dB gain
0.595
Apply -4.5dB gain (de

+1
0
-1
Imagen de gledof
+1
0
-1

"avconv" este fin de semana, me reduce significativamente el peso de los videos, el ejemplo que puse al comienzo del post lo bajo a un poco menos de 300Mb. Pero tengo la duda de borrar el archivo original porque de 53 minutos de duracion el original.ogv paso a 42 minutos el convertido a .avi Creo que la duracion no deberia cambiar, me pasa lo mismo que con "mencoder" baja la duracion del video. Tengo unos 20 videos y no puedo ponerve a ver uno para ver si faltan partes.
Es logico lo que pienso de que a pesar del formato y la calidad deberian durar lo mismo el .ogv y el .avi?
Gracias.

+1
0
-1

Saludos.----

Imagen de gledof
+1
0
-1

Esta aplicacion funciono bastante bien. Aproximadamente el 50% de los videos (al final tuve que compararlos uno por uno con el original) quedaron con el video acelerado y el audio a velocidad normal. Voy a hacer nuevas capturas y ver que pasa, pero esta parece ser la mejor opcion de convercion que tengo dado que ffmpeg no puede hacerlo.
Por mi doy el tema por terminado, gracias por sus aportes.

+1
0
-1

Saludos.----