Command Line File Conversion Not Adding Video Stream

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.
Davy
Blank Cone
Blank Cone
Posts: 14
Joined: 13 Jan 2011 18:44

Command Line File Conversion Not Adding Video Stream

Postby Davy » 14 Jan 2011 11:03

I used the example given on this site to create a batch job to convert .mp4 files downloaded from YouTube into .mpg files that Windows Media Player 11 can play.
The command line is:
CALL "C:\Program Files\VideoLAN\VLC\vlc" -I dummy -vvv %1 --sout=#transcode{vcodec=mpeg1,vb=1024,acodec=mpga,ab=192,channels=2}:standard{access=file,mux=ts,dst="%_commanm%.mpg"} vlc://quit

It runs OK but giving a output file size compatible with an audio only file and when I try to play the output file using VideoLan there is audio but no video.
The command console displays the following error - 'cannot add this stream' - see below:

t0x10991a4] stream_out_transcode stream out debug: scaled pixel aspect is 1.0000
[0x10991a4] stream_out_transcode stream out debug: source 320x240. destination 3 2 0x2 40
[0x10991a4] stream_out_transcode stream out debug: encoder aspect is 576000:4320 2)0
[0x10991a4] stream_out_transcode stream out debug: destination (after video filters) 320x240
[OxiO7eda4] main encoder debug: looking for encoder module: 12 candidates [OxlO7eda4] avcodec encoder debug: libavcodec already initialized
i[OxlO7eda4] avcodec encoder debug: found encoder MPEG—i Uideo
[OxiO7eda4] main encoder debug: using encoder module ‘avcodec’
[OxlOVeda4] main encoder debug: TIMER module_need() : 3.000 ms — Total 3.000 ms / I intvls (Avg 3.000 ms)
[OxiOaOdB4] main mux debug: adding a new input
[OxlOaOdO4] mux_ts mux debug: adding input code=mpeg pid69
[OxlOaOdB4] main mux error: cannot add this stream
[0x10991a4] stream_out_transcode stream out error: cannot add this stream [0x29f145c] avcodec decoder debug: ffmpeg codec (H264 — MPEG—4 AUG (part 10)) stopped
[E0x29f145c] main decoder debug: removing module ‘avcodec’
[OxlO7eda4] main encoder debug: removing module “avcodec’

If I run the task from the GUI it works fine.

Can anybody suggest what the problem may be?

Davy. VideoLan v1.0.3, Windows XP

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Command Line File Conversion Not Adding Video Stream

Postby VLC_help » 14 Jan 2011 15:21

You might want to put MPEG-1 video inside PS container (mux=ps).

Davy
Blank Cone
Blank Cone
Posts: 14
Joined: 13 Jan 2011 18:44

Re: Command Line File Conversion Not Adding Video Stream

Postby Davy » 15 Jan 2011 11:30

Thanks VLC Help but if I change the muxing to PS I get the same problem.

More detailed examination of the log shows that everything works well, the input container is successfully opened, both video decoder and encoders found, then the key lines:

[OxiOaOdB4] main mux debug: adding a new input
[OxlOaOdO4] mux_ts mux debug: adding input code=mpeg pid69
[OxlOaOdB4] main mux error: cannot add this stream
[0x10991a4] stream_out_transcode stream out error: cannot add this stream [0x29f145c]

which seems to indicate that the decoding/encoding is going fine until the video stream is to be added to the mux which fails with no reason given.

Davy

Davy
Blank Cone
Blank Cone
Posts: 14
Joined: 13 Jan 2011 18:44

Re: Command Line File Conversion Not Adding Video Stream

Postby Davy » 16 Jan 2011 13:20

Experimenting has shown the the problem is the 'vcodec=mpeg1' statement. 'mpeg1' is not a valid parameter. If I use mp2v then it works fine.
Davy


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 36 guests