Trouble transcoding "short" videos

This forum is about all development around libVLC.
Timothy Grove
Blank Cone
Blank Cone
Posts: 33
Joined: 07 Sep 2011 13:17

Trouble transcoding "short" videos

Postby Timothy Grove » 03 May 2017 23:33

Has anyone had trouble transcoding short videos (< 2 seconds) and found a solution? I'm trying to transcode a .m1v video to .mp4 and I end up with a video which won't play. I'm seeing this with other formats also and I'm suspecting that the shortness of the videos is the problem since longer videos of the same formats are transcoding okay. I'm working with the commandline through the python bindings, but transcoding through the full gui doesn't work either. The program output is as follows. Thanks for any suggestions.

level 0: 'VLC media player - 2.2.4 Weatherwax'
level 0: 'Copyright \xc2\xa9 1996-2016 the VideoLAN team'
level 0: 'revision 2.2.4-0-g888b7e89'
level 0: "configured with ../extras/package/win32/../../../configure '--enable-update-check' '--enable-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame' '--enable-quicktime' '--enable-avcodec' '--enable-merge-ffmpeg' '--enable-dca' '--enable-mpc' '--enable-libass' '--enable-x264' '--enable-schroedinger' '--enable-realrtsp' '--enable-live555' '--enable-dvdread' '--enable-shout' '--enable-goom' '--enable-caca' '--disable-sdl' '--enable-qt' '--enable-skins2' '--enable-sse' '--enable-mmx' '--enable-libcddb' '--enable-zvbi' '--disable-telx' '--enable-nls' '--host=i686-w64-mingw32' 'host_alias=i686-w64-mingw32'"
level 0: 'creating audio output'
level 0: 'looking for audio output module matching "any": zd candidates'
level 0: 'found 2 devices'
level 0: 'using audio output module "directsound"'
level 0: 'keeping audio output'
level 0: "Creating an input for 'bad.m1v'"
level 0: "using sout chain=`transcode{vcodec=h264,height=576}:std{access=file,mux=ffmpeg{mux=mp4},dst=C:/Users/Videos/bad_id0.mp4}'"
level 0: "stream=`std'"
level 0: 'looking for sout stream module matching "std": zd candidates'
level 0: 'set config option: sout-standard-access to file'
level 0: 'set config option: sout-standard-mux to ffmpeg{mux=mp4}'
level 0: 'set config option: sout-standard-dst to C:/Users/Videos/bad_id0.mp4'
level 0: 'looking for sout access module matching "file": zd candidates'
level 0: 'file access output opened (C:/Users/Videos/bad_id0.mp4)'
level 0: 'using sout access module "access_output_file"'
level 0: 'looking for sout mux module matching "ffmpeg": zd candidates'
level 0: 'CPU flags: 0x0107d3db'
level 0: 'set config option: sout-avformat-mux to mp4'
level 0: 'using sout mux module "avcodec"'
level 0: "using `file/ffmpeg{mux=mp4}://C:/Users/Videos/bad_id0.mp4'"
level 0: 'using sout stream module "stream_out_standard"'
level 0: "stream=`transcode'"
level 0: 'looking for sout stream module matching "transcode": zd candidates'
level 0: 'set config option: sout-transcode-vcodec to h264'
level 0: 'set config option: sout-transcode-height to 576'
level 0: 'Checking video codec mapping for h264 got h264 '
level 0: 'codec video=h264 0x576 scaling: 0.000000 0kb/s'
level 0: 'using sout stream module "stream_out_transcode"'
level 0: "using timeshift granularity of 50 MiB, in path 'C:\\Users\\...\\AppData\\Local\\Temp'"
level 0: "`file:///C:/Users/Videos/bad.m1v' gives access `file' demux `' path `/C:/Users/Videos/bad.m1v'"
level 0: "specified demux `any'"
level 0: "creating demux: access='file' demux='any' location='/C:/Users/Videos/bad.m1v' file='C:\\Users\\Videos\\bad.m1v'"
level 0: 'looking for access_demux module matching "file": zd candidates'
level 0: 'no access_demux modules matched'
level 0: "creating access 'file' location='/C:/Users/Videos/bad.m1v', path='C:\\Users\\Videos\\bad.m1v'"
level 0: 'looking for access module matching "file": zd candidates'
level 0: "opening file `C:\\Users\\Videos\\bad.m1v'"
level 0: 'using access module "filesystem"'
level 0: 'Using stream method for AStream*'
level 0: 'starting pre-buffering'
level 0: 'received first data after 0 ms'
level 0: 'pre-buffering done 1024 bytes in 0s - 1000000 KiB/s'
level 0: 'looking for stream_filter module matching "any": zd candidates'
level 0: 'no stream_filter modules matched'
level 0: 'looking for stream_filter module matching "record": zd candidates'
level 0: 'using stream_filter module "record"'
level 0: "creating demux: access='file' demux='any' location='/C:/Users/Videos/bad.m1v' file='C:\\Users\\Videos\\bad.m1v'"
level 0: 'looking for demux module matching "any": zd candidates'
level 0: 'TS module discarded (lost sync)'
level 0: 'MOD validation failed (ext=m1v)'
level 0: 'looking for packetizer module matching "any": zd candidates'
level 0: 'using packetizer module "packetizer_mpegvideo"'
level 0: 'selecting program id=0'
level 0: 'using demux module "mpgv"'
level 0: 'looking for a subtitle file in C:\\Users\\Samuel\\SooSL\\testvideos\\'
level 0: 'looking for packetizer module matching "any": zd candidates'
level 0: 'using packetizer module "packetizer_mpegvideo"'
level 0: 'starting in sync mode'
level 0: 'looking for meta reader module matching "any": zd candidates'
level 0: 'Trying Lua scripts in C:\\Users\\Samuel\\AppData\\Roaming\\vlc\\lua\\meta\\reader'
level 0: 'Trying Lua scripts in C:\\Program Files (x86)\\VideoLAN\\VLC\\lua\\meta\\reader'
level 0: 'Trying Lua playlist script C:\\Program Files (x86)\\VideoLAN\\VLC\\lua\\meta\\reader\\filename.luac'
level 0: 'no meta reader modules matched'
level 0: "`file:///C:/Users/Videos/bad.m1v' successfully opened"
level 0: 'size 720x576 fps=25.000'
level 0: 'Buffering 0%'
level 0: 'switching to async mode'
level 0: 'Buffering 0%'
level 0: 'size 720x576 fps=25.000'
level 0: 'Buffering 13%'
level 0: 'adding a new sout input (sout_input:10B7B288)'
level 0: 'Buffering 26%'
level 0: 'Buffering 40%'
level 0: "creating video transcoding from fcc=`mpgv' to fcc=`h264'"
level 0: 'Buffering 53%'
level 0: 'Buffering 66%'
level 0: 'looking for decoder module matching "any": zd candidates'
level 0: 'Buffering 80%'
level 0: 'Buffering 93%'
level 0: 'Stream buffering done (320 ms in 0 ms)'
level 0: 'CPU flags: 0x0107d3db'
level 0: 'trying to use direct rendering'
level 0: 'allowing 4 thread(s) for decoding'
level 3: 'threaded frame decoding is not compatible with DXVA2, disabled'
level 0: 'avcodec codec (MPEG-1/2 Video) started'
level 0: 'using decoder module "avcodec"'
level 0: 'looking for encoder module matching "any": zd candidates'
level 0: 'version x264 0.142.X'
level 2: 'using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2\n'
level 2: 'profile High, level 3.0\n'
level 0: 'using encoder module "x264"'
level 0: 'removing module "x264"'
level 0: 'framecount still in libx264 buffer: 0'
level 0: 'Decoder wait done in 10 ms'
level 0: 'available software decoder output format 0 (yuv420p)'
level 3: 'plane 0 not aligned'
level 3: 'disabling direct rendering'
level 0: 'decoder aspect is 1.365031:1'
level 0: 'source pixel aspect is 1.092025:1'
level 0: 'scaled pixel aspect is 1.092025:1'
level 0: 'source 720x576, destination 720x576'
level 0: 'source fps 25/1, destination 25/1'
level 2: 'input interval 40000 (base 1)'
level 2: 'output interval 40000 (base 1)'
level 0: 'encoder aspect is 128160:93888'
level 0: 'destination (after video filters) 720x576'
level 0: 'looking for encoder module matching "any": zd candidates'
level 0: 'version x264 0.142.X'
level 2: 'using SAR=178/163\n'
level 2: 'using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2\n'
level 2: 'profile High, level 3.0\n'
level 0: 'using encoder module "x264"'
level 0: 'adding a new input'
level 0: 'adding input'
level 0: 'Muxing framerate will be 25/1 = 25.00 fps'
level 0: 'Muxing aspect ratio will be 178/163'
level 3: 'Missing video bitrate, assuming 512k'
level 0: 'EOF reached'
level 0: 'waiting decoder fifos to empty'
level 0: 'removing module "packetizer_mpegvideo"'
level 0: "killing decoder fourcc `mpgv', 0 PES in FIFO"
level 0: 'removing a sout input (sout_input:10B7B288)'
level 0: 'removing module "avcodec"'
level 0: 'ffmpeg codec (MPEG-1/2 Video) stopped'
level 0: 'removing module "x264"'
level 0: 'framecount still in libx264 buffer: 36'
level 0: 'removing input'
level 3: 'no more input streams for this mux'
level 0: 'removing module "mpgv"'
level 0: 'removing module "packetizer_mpegvideo"'
level 0: 'removing module "record"'
level 0: 'removing module "filesystem"'
level 0: "Program doesn't contain anymore ES"
level 0: 'destroying useless sout'
level 0: 'destroying chain... (name=transcode)'
level 0: 'removing module "stream_out_transcode"'
level 0: 'destroying chain done'
level 0: 'destroying chain... (name=std)'
level 0: 'removing module "stream_out_standard"'
level 0: 'removing module "avcodec"'
level 0: 'removing module "access_output_file"'
level 0: 'file access output closed'
level 0: 'destroying chain done'
level 0: 'removing module "directsound"'

Timothy Grove
Blank Cone
Blank Cone
Posts: 33
Joined: 07 Sep 2011 13:17

Re: Trouble transcoding "short" videos

Postby Timothy Grove » 04 May 2017 21:25

I'm not sure why, but including "--sout-x264-tune=zerolatency" in my chain seems to fix this problem. The resulting video seems to be a little shorter than the original but that may be another issue ... ?

Timothy Grove
Blank Cone
Blank Cone
Posts: 33
Joined: 07 Sep 2011 13:17

Re: Trouble transcoding "short" videos

Postby Timothy Grove » 05 May 2017 09:29

Another observation, while including zerolatency 'fixes' my problem, the resulting video has a large green/black/missing band when played in other video players apart from VLC...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests