Log in

View Full Version : [HELP] .asf difficult to transcode (not properly indexed)


Barabba
10th March 2016, 21:44
Hi and thank you a lot for help!
I've a small IP camera which saves video and I can open them with MPC and VLC, but about convert VLC fails, virtualdub gives seek error, Avistynth can open by DSS2mod (and parameters DSS2("D:\file.asf", fps=23.976, preroll=15, lavs="L3", lavd="L3 hm1 hc5") but video frozen at last frame for all the period, useless. Can you please try to decode it and tell me how it can work? Thank you!

Brazil2
10th March 2016, 22:25
http://www.radioactivepages.com/asfbin.aspx

Barabba
12th March 2016, 23:41
thank you a lot for your kind answer! I tried the program with different advanced settings and it doesn't work, it produces a file of few kbytes.

This decoding is really challenging! Since mpc and vlc can show it, how it's not possible to decode?? Crazy.

Thank you for any expert who can help me!

sneaker_ger
12th March 2016, 23:44
ffmpeg seems to be able to convert it (though trowing some warnings). The question is: what format do you want?

ffmpeg -i input.asf -c copy output.mkv

StainlessS
13th March 2016, 03:38
Assuming that you may have more of these in future, here is a batch file that will convert to AVI (Lossless UT_Video codec)
with uncompressed PCM audio, and write to OUTDIR (as supplied, D: ie root of D: drive).
Will cope with all mentioned file extensions (I added '*.asf' for this post).
(As supplied with INDIR='.') You can create directory, put this bat in it and copy source files there too, then execute and all
files [EDIT: with extension menioned in the FOR line] in the directory will be converted to AVI in OUTDIR.


setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file/s, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."


REM Where to place output file, No terminating Backslash. "." would be same as .bat file
set OUTDIR="D:


FOR %%A IN (*.264 *.vob *.wmv *.asf *.mpg *.m2v *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.y4m *.yuv *.webm) DO (
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"

)

Pause


Afterwards, you could edit/re-encode however you wish.

EDIT: Changing 'utvideo' to 'huffyuv' would use HuffYUV codec instead.

EDIT: If you did want to convert all to MKV without re-encode, just change FFMPEG line to below

%FFMPEG% -i "%INDIR%\%%A" -c copy "%OUTDIR%\%%~nxA.MKV"

or

%FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"

Brazil2
13th March 2016, 09:24
Since mpc and vlc can show it, how it's not possible to decode??
Because your file contains H.264 video and ADPCM audio which is kind of strange for a Windows Media container.

And this is why Asfbin and some other tools can't work it out. So at this point it looks like the ffmpeg method described by Sneaker_ger is your best bet.

Barabba
13th March 2016, 13:17
wow! Works great!!!!!!!! Thank youuu!!! Thanks sneaker_ger for testing and the solution, thanks StainlessS for the really cool explanation! Thanks to all for the kind attention!!
I hope this topic will be useful in future!