VLC webtrancoding gives inconsistent start of file

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.
whome
Blank Cone
Blank Cone
Posts: 37
Joined: 14 Jun 2008 15:40

VLC webtrancoding gives inconsistent start of file

Postby whome » 26 Apr 2009 10:07

VLC web transcoding to mpeg2 file produces garbage and inconsistent beginning of the file. MEncoder.exe produces a perfect file from the start to the end. This specific use-case produces missing video stream in the beginning.

This is a showstopper in PS3Mediaserver dlna server where VLC is used a default webstream transcoding engine. Playstation3 is quite sensitive about the stream so missing video in the beginning gives unsupported data. MEncoder web streaming works ok, but its few annoying steps to switch from VLC to Mencoder each time :-(

MediaInfo says source .flv is video(format=VP6, codec=On2 VP6), audio(format=MPEG Audio ver 1 layer 3, codec=MPA1L3).

Is there a way to make this VLC script more error tolerance, more like mencoder is able to do?

VLC script

Code: Select all

@rem webpage: http://www.vimeo.com/2244465 set VLC=C:\apps\vlc-1.0.0-git\vlc.exe set source=http://www.vimeo.com/moogaloop/play/clip:2244465/21cc37fa95eb76c2839e4935671ba213/1240734600 "%VLC%" -vvv -I dummy "%source%" :sout=#transcode{vcodec=mp2v,vb=1024,acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=file,mux=ts,dst="output.mpeg"}}
MEncoder script

Code: Select all

@rem webpage: http://www.vimeo.com/2244465 set MENCODER=mencoder.exe set source=http://www.vimeo.com/moogaloop/play/clip:2244465/21cc37fa95eb76c2839e4935671ba213/1240734600 %MENCODER% %source% -prefer-ipv4 -nocache -quiet -oac lavc -of lavf -lavfopts format=dvd -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=4096:threads=2:acodec=libmp3lame:abitrate=128 -ofps 24000/1001 -o output.mpeg
Vimeo.com source url resolving is done using this xml page:
http://www.vimeo.com/moogaloop/load/cli ... ocal?ver=4
- see <request_signature> signature value
- see <request_signature_expires> time value

Then create the following direct video link:

Code: Select all

http://www.vimeo.com/moogaloop/play/clip:$CLIPID$/$SIGNATURE$/$EXPTIME$
edit: VLC gives following log in the beginning. First few seconds give "warning: cannot decode..." rows then after a while it stabilises a transcoding.

Code: Select all

..clip.. [0p27af930] avcodec decoder warning: cannot decode one frame (1781 bytes) [0p27af930] avcodec decoder warning: cannot decode one frame (1895 bytes) [0p27af930] avcodec decoder debug: disabling direct rendering [0p27704f8] stream_out_transcode stream out debug: decoder aspect is 648000:432000 [0p27704f8] stream_out_transcode stream out debug: source pixel aspect is 1.000000:1 [0p27704f8] stream_out_transcode stream out debug: scaled pixel aspect is 0.999023:1 [0p27704f8] stream_out_transcode stream out debug: source 504x336, destination 512x340 [0p27704f8] stream_out_transcode stream out debug: encoder aspect is 649906:432000 [0pb85fc8] main filter debug: looking for video filter2 module: 17 candidates [0pb85fc8] swscale filter debug: 504x336 chroma: I420 -> 512x340 chroma: I420 with scaling using Bicubic (good quality) [0pb85fc8] main filter debug: using video filter2 module "swscale" [0pb85fc8] main filter debug: TIMER module_need() : 2.469 ms - Total 2.469 ms /1 intvls (Avg 2.469 ms) [0p27704f8] main stream out debug: Filter 'swscale' (0pb85fc8) appended to chain [0p27704f8] stream_out_transcode stream out debug: destination (after video filters) 512x340 ..clip..

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

Re: VLC webtrancoding gives inconsistent start of file

Postby VLC_help » 26 Apr 2009 17:21

You get same issues if you download the file to hard-drive and transcode it?

whome
Blank Cone
Blank Cone
Posts: 37
Joined: 14 Jun 2008 15:40

Re: VLC webtrancoding gives inconsistent start of file

Postby whome » 26 Apr 2009 19:23

Direct .flv download link, after using xml resolving URL to get signature and exptime attributes. This will expire within few hours and must use new attributes from the xml url.
http://www.vimeo.com/moogaloop/play/cli ... 1240767000

Yes, same results even if transcoded from the local file, it is always the same spot 15secs from start. Before that 0-15sec can only hear audio and codec dialog shows audio stream only. Then >15 secs codec dialog displayes both video+audio information, its just I must not open codec dialog before that or VLC won't recognize video existence.

Original .flv is played perfectly from start to end in VLC and WMP player with FLVSplitter.ax filter. I tried VLC v0.8.6 and vlc-1.0.0-pre1-20090401-2206 transcoding, I don't think most up to date git change anything.

This reminds me of the VLC transcoding problems I had, still has, on some AVI to mp4. VLC creates quite easily green artifacts in the beginning, so in the end I had again use Mencoder.

Download file is 16MB .flv and this is what MediaInfo says.

Code: Select all

General Count : 246 Count of stream of this kind : 1 Kind of stream : General Kind of stream : General Stream identifier : 0 Count of video streams : 1 Count of audio streams : 1 Video_Format_List : VP6 Video_Format_WithHint_List : VP6 Codecs Video : On2 VP6 Audio_Format_List : MPEG Audio Audio_Format_WithHint_List : MPEG Audio Audio codecs : MPEG-1 Audio layer 3 Complete name : C:\test\vimeo-2244465.flv Folder name : C:\test File name : vimeo-2244465 File extension : flv Format : Flash Video Format : Flash Video Format/Url : http://www.macromedia.com/go/getflashplayer Format/Extensions usually used : flv Codec : Flash Video Codec : Flash Video Codec/Url : http://www.macromedia.com/go/getflashplayer Codec/Extensions usually used : flv File size : 16557126 File size : 15.8 MiB File size : 16 MiB File size : 16 MiB File size : 15.8 MiB File size : 15.79 MiB Duration : 219014 Duration : 3mn 39s Duration : 3mn 39s 14ms Duration : 3mn 39s Duration : 00:03:39.014 Overall bit rate : 604787 Overall bit rate : 605 Kbps Stream size : 246093 Stream size : 240 KiB (1%) Stream size : 240 KiB Stream size : 240 KiB Stream size : 240 KiB Stream size : 240.3 KiB Stream size : 240 KiB (1%) Proportion of this stream : 0.01486 File creation date : UTC 2009-04-26 17:00:01.985 File last modification date : UTC 2009-04-26 17:00:28.693 Tagging application : FlixEngineLinux_8.0.12.0 (www.on2.com) Video Count : 144 Count of stream of this kind : 1 Kind of stream : Video Kind of stream : Video Stream identifier : 0 Format : VP6 Codec : On2 VP6 Codec : On2 VP6 Duration : 219014 Duration : 3mn 39s Duration : 3mn 39s 14ms Duration : 3mn 39s Duration : 00:03:39.014 Bit rate : 472582 Bit rate : 473 Kbps Width : 504 Width : 504 pixels Height : 336 Height : 336 pixels Display aspect ratio : 1.500 Display aspect ratio : 1.500 Frame rate : 29.970 Frame rate : 29.970 fps Frame count : 6564 Bits/(Pixel*Frame) : 0.093 Delay : 0 Stream size : 13244519 Stream size : 12.6 MiB (80%) Stream size : 13 MiB Stream size : 13 MiB Stream size : 12.6 MiB Stream size : 12.63 MiB Stream size : 12.6 MiB (80%) Proportion of this stream : 0.79993 Audio Count : 121 Count of stream of this kind : 1 Kind of stream : Audio Kind of stream : Audio Stream identifier : 0 Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Format settings : Joint stereo Codec : MPA1L3 Codec : MPEG-1 Audio layer 3 Codec profile : Joint stereo Duration : 219014 Duration : 3mn 39s Duration : 3mn 39s 14ms Duration : 3mn 39s Duration : 00:03:39.014 Bit rate mode : CBR Bit rate mode : Constant Bit rate : 112000 Bit rate : 112 Kbps Channel(s) : 2 Channel(s) : 2 channels Sampling rate : 44100 Sampling rate : 44.1 KHz SamplingCount : 9658517 Resolution : 16 Resolution : 16 bits Delay : 5 Delay : 5ms Delay : 5ms Delay : 5ms Delay : 00:00:00.005 Video delay : 5 Video delay : 5ms Video delay : 5ms Video delay : 5ms Video delay : 00:00:00.005 Video0 delay : 5 Video0 delay : 5ms Video0 delay : 5ms Video0 delay : 5ms Video0 delay : 00:00:00.005 Stream size : 3066514 Stream size : 2.92 MiB (19%) Stream size : 3 MiB Stream size : 2.9 MiB Stream size : 2.92 MiB Stream size : 2.924 MiB Stream size : 2.92 MiB (19%) Proportion of this stream : 0.18521
edit: another issue I just realized, WMP player cannot play VLC output.mpeg file, but Mencoder output.mpeg is fine.

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

Re: VLC webtrancoding gives inconsistent start of file

Postby VLC_help » 27 Apr 2009 15:54

This reminds me of the VLC transcoding problems I had, still has, on some AVI to mp4. VLC creates quite easily green artifacts in the beginning, so in the end I had again use Mencoder.
That is known one.
http://trac.videolan.org/vlc/ticket/2453


Return to “VLC media player for Windows Troubleshooting”

Who is online

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