"cropadd" filter issue VLC 2.1.3 Win 64bit

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
steve333
Blank Cone
Blank Cone
Posts: 64
Joined: 21 Dec 2008 21:24
Location: UK

"cropadd" filter issue VLC 2.1.3 Win 64bit

Postby steve333 » 03 May 2014 23:34

I am running VLC 2.1.3 (64bit) on WIndows 7 64 bit.
I have no information as to whether this issue is specific to WIndows, or a general VLC issue.

Summary:
The "cropadd" filter does not appear to work when the input is MPEG2 video.

Background:
I have some old 4:3 aspect ratio MPEG2 video (480 x 720 pixels) which I am converting to MPEG2 PS (so I can further process it to finally upload it to my PVR).

My 16:9 TV has an annoying habit of adding distracting mid-grey bars to the left and right sides when it displays 4:3 video.
I wanted to use the VLC "crop/add" filter to add 68 (or 67) pixels of padding to the left and right sides to give me a 16:9 aspect ratio which would then display nicely on my TV with black bands at the edges.

Observations:
When viewing live Video all seemed OK (selecting the filter under "advanced preferences" and setting the number of pixels to "padd" at left and right).
But when converting to file (using a profile I created) it failed to produce any video at all.
The profile was for PS container, MPEG2 video out (5 MB/s which is slightly more than the maximum expected input video rate), MPEG2 audio, "Video scaling filter" (with pixel "padd" setting in preferences as above).

Looking at the messages (see below) it seems that the correct aspect ratio information (480 x 720) is available to the chain, but somehow isn't getting through to the "cropadd" filter correctly, as it shows the output video to be "136 x 0", which obviously fails to produce any video output.

Some comments about the "cropadd" filter:
1) The filter is called "cropadd" but the "filters" list refers to it as "Video scaling filter" and the mouse-over help text refers to "postprocessing to enhance the picture quality .. or distort the video" which is confusing.
I suggest that it should be referred to as "CropAdd" throughout (to distinguish it from Erase or Video Scaling).

2) "Pad" is misspelt in the options menu (probably confused with "add" as in "cropadd").

3) With other codecs if I enable the "cropadd" filter then VLC gives me an error message telling me that it appears that the selected codec is missing from the installation.
For example:
- If I select the preset profile MP4 (Video H264 + MP3) my video is converted OK.
- But if I edit this profile to enable the "Video Scaling Filter" then it gives me an error message that the H264 codec is missing from my installation, and produces a file with audio only.

When I try to output MPEG2 with "Video Scaling Filter" enabled it produces no video output, but VLC does not give me any error messages either.



Some general comments about Convert/Save (transcoding):
1) The "open media" menu permits the user to select a list of input files.
But convert/save seems to be unable to accept a list of files to process, instead it operates on the first file only.

2) This used to support field substitutions such as %H for hour, so that one could give the output filename a date/timestamp etc. (eg. "file %Y%m%d %H%M").
If this was re-introduced and the syntax also supported substituting the input filename in the output (eg. %F), then it would easily be possible to process a list of input files to a list of output files (or optionally concatenate them to a single output file).

See messsages log attached below:
qt4 debug: MRL passed to the Sout: file:///E:/Video%20Processing/Test.mpg
qt4 debug: Transcode MRL: sout=#transcode

{vcodec=mp2v,vb=5000,vfilter=croppadd,scale=Auto,width=720,height=480,acodec=mpga,ab=192,channels=2,samplerate=48000}:std{access=file

{no-overwrite},mux=ps,dst='F:\Video Processing\terst.ps'}
qt4 debug: Adding option: file-caching=300
qt4 debug: Adding option: sout=#transcode

{vcodec=mp2v,vb=5000,vfilter=croppadd,scale=Auto,width=720,height=480,acodec=mpga,ab=192,channels=2,samplerate=48000}:std{access=file

{no-overwrite},mux=ps,dst='F:\Video Processing\terst.ps'}
main debug: adding item `Streaming' ( file:///E:/Video%20Processing/Test.mpg )
qt4 debug: Adding a new MRL to recent ones: file:///E:/Video%20Processing/Test.mpg
main debug: processing request item: Streaming, node: null, skip: 0
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 2 items, index 1
main debug: starting playback of the new playlist item
main debug: resyncing on Streaming
main debug: Streaming is at 1
main debug: creating new input thread
main debug: Creating an input for 'Streaming'
main debug: Creating an input for 'Streaming'
main debug: using sout chain=`transcode

{vcodec=mp2v,vb=5000,vfilter=croppadd,scale=Auto,width=720,height=480,acodec=mpga,ab=192,channels=2,samplerate=48000}:std{access=file

{no-overwrite},mux=ps,dst='F:\Video Processing\terst.ps'}'
main debug: stream=`std'
main debug: looking for sout stream module matching "std": 21 candidates
main debug: set config option: sout-standard-access to file{no-overwrite}
main debug: set config option: sout-standard-mux to ps
main debug: set config option: sout-standard-dst to F:\Video Processing\terst.ps
main debug: looking for sout access module matching "file": 8 candidates
main debug: set config option: sout-file-overwrite to (null)
main debug: no fetch required for (null) (art currently (null))
qt4 debug: IM: Setting an input
access_output_file debug: file access output opened (F:\Video Processing\terst.ps)
main debug: using sout access module "access_output_file"
main debug: looking for sout mux module matching "ps": 10 candidates
mux_ps info: Open
main debug: using sout mux module "mux_ps"
main debug: muxer support adding stream at any time
main debug: muxer prefers to wait for all ES before starting to mux
stream_out_standard debug: using `file{no-overwrite}/ps://F:\Video Processing\terst.ps'
main debug: using sout stream module "stream_out_standard"
main debug: stream=`transcode'
main debug: looking for sout stream module matching "transcode": 21 candidates
main debug: set config option: sout-transcode-vcodec to mp2v
main debug: set config option: sout-transcode-vb to 5000
main debug: set config option: sout-transcode-vfilter to croppadd
main debug: set config option: sout-transcode-scale to Auto
main debug: set config option: sout-transcode-width to 720
main debug: set config option: sout-transcode-height to 480
main debug: set config option: sout-transcode-acodec to mpga
main debug: set config option: sout-transcode-ab to 192
main debug: set config option: sout-transcode-channels to 2
main debug: set config option: sout-transcode-samplerate to 48000
stream_out_transcode debug: codec audio=mpga 48000Hz 2 channels 192Kb/s
stream_out_transcode debug: codec video=mp2v 720x480 scaling: 0.000000 5000kb/s
main debug: using sout stream module "stream_out_transcode"
main debug: using timeshift granularity of 50 MiB, in path 'C:....\AppData\Local\Temp'
main debug: `file:///E:/Video%20Processing/Test.mpg' gives access `file' demux `' path `/E:/Video%20Processing/Test.mpg'
main debug: creating demux: access='file' demux='' location='/E:/Video%20Processing/Test.mpg' file='E:\Video Processing\Test.mpg'
main debug: looking for access_demux module matching "file": 12 candidates
main debug: no access_demux modules matched
main debug: creating access 'file' location='/E:/Video%20Processing/Test.mpg', path='E:\Video Processing\Test.mpg'
main debug: looking for access module matching "file": 20 candidates
filesystem debug: opening file `E:\Video Processing\Test.mpg'
main debug: using access module "filesystem"
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 0 ms
main debug: pre-buffering done 1024 bytes in 0s - 1000000 KiB/s
main debug: looking for stream_filter module matching "any": 6 candidates
main debug: no stream_filter modules matched
main debug: looking for stream_filter module matching "record": 6 candidates
main debug: using stream_filter module "record"
main debug: creating demux: access='file' demux='' location='/E:/Video%20Processing/Test.mpg' file='E:\Video Processing\Test.mpg'
main debug: looking for demux module matching "any": 63 candidates
mod debug: MOD validation failed (ext=mpg)
ts debug: TS module discarded (lost sync)
main debug: using demux module "ps"
main debug: looking for a subtitle file in E:\Video Processing\
main debug: starting in sync mode
main debug: looking for meta reader module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:....\AppData\Roaming\vlc\lua\meta\reader
lua debug: Trying Lua scripts in C:....\VideoLAN\64 Bit\VLC\lua\meta\reader
lua debug: Trying Lua playlist script C:....\VideoLAN\64 Bit\VLC\lua\meta\reader\filename.luac
main debug: no meta reader modules matched
main debug: `file:///E:/Video%20Processing/Test.mpg' successfully opened
ps warning: garbage at input, trying to resync...
ps warning: found sync code
main debug: selecting program id=0
main debug: looking for packetizer module matching "any": 21 candidates
main debug: using packetizer module "packetizer_mpegvideo"
main debug: Buffering 0%
main debug: switching to async mode
main debug: Buffering 0%
packetizer_mpegvideo debug: size 720x480 fps=29.970 <<<<<<<<<<<<<<<<<<<<< seems OK so far
main debug: Buffering 1%
................. etc. repeated lines deleted
main debug: Buffering 16%
main debug: adding a new sout input (sout_input:0000000003527c50)
main debug: Buffering 17%
stream_out_transcode debug: creating video transcoding from fcc=`mpgv' to fcc=`mp2v'
main debug: Buffering 17%
main debug: Buffering 18%
main debug: looking for decoder module matching "any": 39 candidates
main debug: looking for packetizer module matching "any": 21 candidates
main debug: using packetizer module "a52"
avcodec debug: trying to use direct rendering
avcodec debug: allowing 4 thread(s) for decoding
avcodec debug: avcodec codec (MPEG-1/2 Video) started
main debug: Buffering 18%
avcodec debug: using slice thread mode with 4 threads
main debug: using decoder module "avcodec"
a52 debug: A/52 channels:2 samplerate:48000 bitrate:192000
main debug: adding a new sout input (sout_input:000000000388ced0)
main debug: looking for encoder module matching "any": 16 candidates
main debug: Buffering 19%
............... etc. repeated lines deleted
main debug: Buffering 44%
avcodec debug: found encoder MPEG-1/2 Video
main debug: using encoder module "avcodec"
main debug: removing module "avcodec"
stream_out_transcode debug: creating audio transcoding from fcc=`a52 ' to fcc=`mpga'
main debug: looking for decoder module matching "any": 39 candidates
main debug: Buffering 44%
.................. etc. repeated lines deleted
main debug: Buffering 50%
main debug: using decoder module "a52"
main debug: Buffering 50%
main debug: Buffering 51%
main debug: looking for encoder module matching "any": 16 candidates
main debug: Buffering 52%
............. etc. repeated lines deleted
main debug: Buffering 54%
main debug: using encoder module "twolame"
main debug: input 'a52 ' 48000 Hz Stereo frame=1536 samples/0 bytes
main debug: conversion: 'a52 '->'s16l' 48000 Hz->48000 Hz Stereo->Stereo
main debug: Buffering 55%
main debug: looking for audio converter module matching "any": 12 candidates
main debug: Buffering 55%
main debug: no audio converter modules matched
main debug: Buffering 56%
main debug: Buffering 56%
main debug: looking for audio converter module matching "any": 12 candidates
main debug: Buffering 57%
................. etc. repeated lines deleted
main debug: Buffering 68%
main debug: using audio converter module "a52tofloat32"
main debug: looking for audio converter module matching "any": 12 candidates
audio_format debug: f32l->s16l, bits per sample: 32->16
main debug: using audio converter module "audio_format"
main debug: conversion pipeline complete
main debug: looking for audio resampler module matching "any": 3 candidates
main debug: using audio resampler module "ugly_resampler"
main debug: adding a new input
mux_ps debug: adding input codec=mpga
main debug: Buffering 68%
............... etc. repeated lines deleted
main debug: Buffering 99%
main debug: Stream buffering done (300 ms in 0 ms)
main debug: Decoder buffering done in 0 ms
a52 debug: A/52 channels:2 samplerate:48000 bitrate:192000
avcodec debug: using direct rendering
main debug: looking for video filter2 module matching "croppadd": 55 candidates
croppadd debug: Crop: Top: 0, Bottom: 0, Left: 0, Right: 0
croppadd debug: Padd: Top: 0, Bottom: 0, Left: 68, Right: 68
croppadd debug: 720x480 -> 136x0 <<<<<<<<<<<<<<<<<<<< clearly this is incorrect
main debug: using video filter2 module "croppadd"
main debug: Filter 'croppadd' (0000000003638f40) appended to chain
stream_out_transcode debug: decoder aspect is nan:1
stream_out_transcode debug: source pixel aspect is nan:1
stream_out_transcode debug: scaled pixel aspect is nan:1
stream_out_transcode debug: source 136x0, destination 136x0
stream_out_transcode debug: encoder aspect is 0:0
main debug: looking for video filter2 module matching "any": 55 candidates
swscale error: could not init SwScaler and/or allocate memory
scale debug: 720x480 -> 136x0
main debug: using video filter2 module "scale"
main debug: Filter 'scale' (0000000003639760) appended to chain
stream_out_transcode debug: destination (after video filters) 136x0
main debug: looking for encoder module matching "any": 16 candidates
avcodec warning: invalid size 136x0
main debug: no encoder modules matched
stream_out_transcode error: cannot find video encoder (module:any fourcc:mp2v)
main debug: removing module "avcodec"
avcodec debug: ffmpeg codec (MPEG-1/2 Video) stopped
main debug: Filter 0000000003639760 removed from chain
main debug: removing module "scale"
main debug: Filter 0000000003638f40 removed from chain
main debug: removing module "croppadd"
main debug: EOF reached
main debug: waiting decoder fifos to empty
main debug: finished input
main debug: removing module "packetizer_mpegvideo"
main debug: killing decoder fourcc `mpgv', 0 PES in FIFO
main debug: removing a sout input (sout_input:0000000003527c50)
main debug: removing module "a52"
main debug: killing decoder fourcc `a52 ', 0 PES in FIFO
main debug: removing a sout input (sout_input:000000000388ced0)
main debug: removing module "a52"
main debug: removing module "twolame"
main debug: removing module "ugly_resampler"
main debug: removing module "a52tofloat32"
main debug: removing module "audio_format"
mux_ps debug: removing input
main warning: no more input streams for this mux
main debug: removing module "ps"
main debug: Program doesn't contain anymore ES
main debug: removing module "record"
main debug: removing module "filesystem"
main debug: dead input
main debug: destroying useless sout
main debug: destroying chain... (name=transcode)
main debug: removing module "stream_out_transcode"
main debug: destroying chain done
main debug: destroying chain... (name=std)
main debug: removing module "stream_out_standard"
main debug: removing module "mux_ps"
mux_ps info: Close
main debug: removing module "access_output_file"
access_output_file debug: file access output closed
main debug: destroying chain done
main debug: changing item without a request (current 1/2)
main debug: nothing to play
qt4 debug: IM: Deleting the input

Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 53 guests