Hello everyone,
I have an avi file, since the index block is stored at the end of media file, so it is not convenient for streaming. I want to convert avi file to other formats so that streaming is better supported. But I tried to convert from avi to flv/mp4 takes a long time (almost the same length of time as the video length itself). My question is whether there is a very quick way to convert from avi file to asf file very quickly -- just add a container and simply do a file copy?
BTW some more background of my streaming issues (I am using IIS 7.0 Media Pack): the streaming issue I met with is, I cannot jump to an arbitrary location of the media if the media is not buffered already. After some search work, I think it may be caused by the index block of avi file is stored at the end, so Windows Media Player could not jump to any arbitrary location before buffered locally.
Here is an example, if my recorded avi video is 10 mins, and now I am playing to the 4th mins, and the local buffered streaming media is buffered to the 5th mins, I cannot jump to any time after the 5th mins, like the 7th mins in Windows Media Player.
thanks in advance,
George
+ Reply to Thread
Results 1 to 30 of 35
-
-
VidTo Asf
Code:vidtoasf -flag value ... Flags are: -in file.ext Input Video file (required) -out file.asf Output Video file (default: in file with .asf in place of extension) -leadtime milliseconds Maximum time before playing begins (default: 1000) -video stream Stream Number of the video stream to use (Useful if an AVI has more than one) (default: use the only video stream in the AVI) -audio stream Same as -video, but for audio streams -script filename Specify a script file giving urls and markers (default: none) -seekable on/off Create a seekable file, even if there are not enough key frames (default: off) -audiofile filename Specify an audio file to use in place of the audio in the video file (default: use the audio from the video file)
-
Thanks Midzuki,
1.
An issue with your command is, in my experiment, it takes still long time to convert a long avi file, i.e. the bigger avi file, the longer time. Is your command doing things like re-encoding?
2.
How do you think of this command? My purpose is just to convert avi to asf format as soon as possible, I could keep original format or even sacrifice quality for speed. Any comments?
ffmpeg.exe -i test.avi -acodec copy -vcodec copy test.asf
Originally Posted by Midzuki
George -
No, vidtoasf.exe does not re-encode.
Try to run it under the "Windows XP compatibility mode",
maybe it does not like Vista (even though it's from Microsoft too).
Another good option would be the SolveigMM ASF Muxer.
ffmpeg.exe -i test.avi -acodec copy -vcodec copy test.asf
fine.But you'd better always test the outputs from ffmpeg --- sometimes,
the remuxed files can only be played by ffplay itself.
Good-luck! -
-
Thanks Midzuki,
I am using command the following command to convert from avi to asf, and conversion is very fast (30 seconds), but when I use Windows Media Player to play the generated asf file, there is error like this, any ideas? What is the strange CRAN codec?
Output from vidtoasf,
Code:vidtoasf.exe -in capture-1.avi -out capture-1.asf Stream0: capture-1.avi Video #1 (Video - 5.0000 fps) (Used) Stream1: capture-1.avi Audio #1 (Audio - 22050 Hz, 44100 bytes/sec) (Used) Calculating bitrate............. Bitrate: 7800000 Packetsize: 57344 Building ASF..................................................The ASFChop ocx ha s not been registered. Warning: No index built.
Code:Windows Media Player Error Message Help You've encountered error message C00D10D1 while using Windows Media Player. The following information might help you troubleshoot the issue. Codec is missing Windows Media Player cannot play the file (or cannot play either the audio or video portion of the file) because the CRAN codec is not installed on your computer.
Originally Posted by Midzuki
George -
Thanks poisondeathray!
Mp4 is also a format which I like! I have downloaded the mp4box tool and have a quick try. The tool let me input track number. I did not find comprehensive help for mp4box tool, and if I want to convert both video and audio, what command line option should I use?
(in my sample, I want to convert capture-1.avi to an mp4 format to make streaming better)
Code:MP4Box.exe capture-1.avi Import probing results for capture-1.avi: File has 2 tracks Track 1 type: Video (CRAM) Track 2 type: Audio (....)
Originally Posted by poisondeathray
George -
mp4box -add movie.avi#video:fps=23.976 -add movie.avi#audio -new output.mp4
Documentation:
http://gpac.sourceforge.net/doc_mp4box.php
For ffmpeg autobuilds
http://ffmpeg.arrozcru.org/autobuilds/
For binary to compile
http://www.ffmpeg.org/download.html
http://ffmpeg.arrozcru.org/autobuilds/extra/mingw32/ -
Originally Posted by George2
Really, me too had to learn thru the difficult way
find the file asfchop.ocx, copy it into the system32 directory,
then run the command "regsvr32 asfchop.ocx"
otherwise vidoasf will not work properly
( over here, it didn't work at all before registering asfchop.ocx)
As for WMP misbehaviors, I really have no idea of how it discoverd/invented
the "CRAN" codec (it has always been known as CRAM)
Also, "5.000fps" <--- are you sure
Please read this carefully:
When you convert a low frame rate .avi file into a .asf file with the
command line utility Vidtoasf.exe, the file size of the .asf file
increases dramatically.
Back to the top
CAUSE
With low frame rate files, the first frame of the file is usually very
large. This large frame must be sent within one second (the default)
to the client. In order for this to be accomplished, the bit rate of
the file is raised and filler is added to the file. The filler is what
raises the bit rate and increases the file size.
Back to the top
RESOLUTION
When you use Vidtoasf.exe with low frame rate files, increase the lead
time parameter from 1000 milliseconds (default) to a larger number.
(Note: You probably won't see any benefit above 4000 milliseconds.) By
increasing the lead time for the file, there is more time available to
stream the first frame of the video when the file is streamed to a
client. An example of this would be as follows:
vidtoasf.exe -in myfile.avi -out myfile.asf -leadtime 3000
It should give you less headaches, I hope.
As for ffmpeg.exe, I'm using the latest "official" release (version 0.5) ---
--- even though Chris K has very-good reasons to avoid it
https://forum.videohelp.com/topic365959.html#1952609
### -
I agree with midzuki, solveig asf muxer is the way to go if your video format is supported in .asf . There is a free version floating around if you search. You can add audio in later with windows media stream editor
If it is indeed CRAM (as detected by your mp4box dialog), not CRAN , that should come installed with Windows. Otherwise you can enable CRAM in the ffdshow configuration and use it as a directshow decoder for WMP
-
Thanks poisondeathray,
1.
Originally Posted by poisondeathray
2.
Originally Posted by poisondeathray
Code:I have tried to get the binary of ffmpeg from, http://ffmpeg.arrozcru.org/autobuilds/ffmpeg-latest-mingw32-static.tar.bz2 then run the following command, C:\software\ffmpeg-latest-mingw32-static\bin>ffmpeg.exe -i test.avi -acodec copy -vcodec copy test.asf FFmpeg version SVN-r18506, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e nable-avisynth --enable-gpl --enable-zlib --enable-bzlib --enable-libgsm --enabl e-libfaac --enable-pthreads --enable-libvorbis --enable-libmp3lame --enable-libo penjpeg --enable-libtheora --enable-libspeex --enable-libxvid --enable-libfaad - -enable-libschroedinger --enable-libx264 libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.25. 0 / 52.25. 0 libavformat 52.32. 0 / 52.32. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 built on Apr 14 2009 04:04:47, gcc: 4.2.4 Input #0, avi, from 'test.avi': Duration: 00:00:44.86, start: 0.000000, bitrate: 5291 kb/s Stream #0.0: Video: msvideo1, rgb555le, 1280x1024, 5 tbr, 5 tbn, 5 tbc Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s Output #0, asf, to 'test.asf': Stream #0.0: Video: CRAM / 0x4D415243, rgb555le, 1280x1024, q=2-31, 1k tbn, 5 tbc Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 224 fps=222 q=-1.0 Lsize= 29426kB time=44.80 bitrate=5380.7kbits/s video:26910kB audio:1932kB global headers:0kB muxing overhead 2.023317% C:\software\ffmpeg-latest-mingw32-static\bin> http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&mpver=11.0....nalid=C00D36E6 then have the following error when using Windows Media Player to play it, does anyone have any ideas? http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&mpver=11.0....nalid=C00D36E6
George -
Thanks Midzuki!
1.
Where to get and what is asfchop.ocx? I find all places in my computer and vidtoasf package, there is no such file.
2.
Originally Posted by Midzuki
3.
Originally Posted by Midzuki
4.
Originally Posted by Midzuki
regards,
George -
Thanks Midzuki,
I have just followed your advice to try Solveig ASF Muxer, but when I use TestMuxerApp.exe to open the avi file, there is the following error.
Any ideas what is wrong? Any additional setup needed for Solveig ASF Muxer?
Please check my attachment for more details about error information.
regards,
George
-
Thanks poisondeathray,
1.
Originally Posted by poisondeathray
2.
Originally Posted by poisondeathray
http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&mpver=11.0....09B&codec=CRAN
Any ideas what is wrong?
3.
I am very interested to learn more about ffdshow. What is its function? Manage all decoder codec on local machine or manage all decoder codec used by Windows Media Player or something function else?
regards,
George
-
George2 wrote:
Where to get and what is asfchop.ocx? I find all places in my computer and vidtoasf package, there is no such file.
I have got ffmpeg and I posted my issue when play the asf file by ffmpeg just above this post, do you have any ideas?
you'd better always test the outputs from ffmpeg --- sometimes,
the remuxed files can only be played by ffplay itself. -
Hi Midzuki,
1.
I have registered asfchop.ocx successfully, and then make a conversion from avi to asf. This time no warning/error from console which indicates no index building or something (you can compare with my previous output). Here is the output.
Code:vidtoasf.exe -in capture-5.avi -out capture-5.asf Stream0: capture-5.avi Video #1 (Video - 5.0000 fps) (Used) Stream1: capture-5.avi Audio #1 (Audio - 22050 Hz, 44100 bytes/sec) (Used) Calculating bitrate......... Bitrate: 1150000 Packetsize: 14375 Building ASF.................................................
Code:http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&mpver=11.0....09B&codec=tscc Windows Media Player Error Message Help You've encountered error message C00D10D1 while using Windows Media Player. The following information might help you troubleshoot the issue. Codec is missing Windows Media Player cannot play the file (or cannot play either the audio or video portion of the file) because the TechSmith Screen Capture Codec (tscc) codec is not installed on your computer. The missing codec might be available to download from the Internet. To search for the TechSmith Screen Capture Codec (tscc) codec, see WMPlugins.com.
I am interested in which party released asfchop.ocx? Could you help to provide the original party which release this cool stuff? I want to learn more by myself.
3.
Originally Posted by Midzuki
regards and have a nice day,
George
capture-new.avi -
Thanks poisondeathray,
I have tried using the following command, but mp4 box will always crash. I am using Windows Vista x64 enterprise. I have uploaded both my avi video and my screen snapshot. I am using the following command with mp4 box. Any ideas what is wrong?
mp4box -add capture-new.avi#video:fps=5 -add capture-new.avi#audio -new capture-new.mp4
Originally Posted by poisondeathray
George
mp4boxerror.zip -
I’d recommend checking out the xillisoft product: http://www.download.com/Xilisoft-Video-Converter-Platinum/3000-2194_4-10535116.html . That’s a link to the video converter (I believe it does audio as well) on CNET’s Download.com.
Cheers,
Ron
Windows Outreach Team -
I don't think techsmith (tscc) is supported in mp4 container, and highly unlikely to be supported in .asf.
If you use mediainfo (view=>text) , it tells you info about your file. (tscc video , PCM audio) Instead of CRAM, enable techsmith in the ffdshow configuration, and your video will play in MPC, WMP11 or directshow players. And yes, ffdshow is a decoder in this scenario, but it is capable of a lot more eg. preprocessing , filtering, color correction etc...
In the future, if you are using camtasia to record, you can record directly to h264/aac by changing the settings, which is much better suited for streaming (smaller filesize and better quality, with moov atom at the beginning).
I'm not sure that you can do much to re-wrap you current file, you might have to bite the bullet and re-encode
EDIT: I take that back, the asf wrapper can support your format. (Done with the sdk version of solveig asf muxer - there is a trial available; the free beta version does work, you just have to register the .ax by using the .bat file). of course you need a directshow decoder for this to work (i.e. ffdshow)
captureasf.asf -
why you said the resulting converted media could only be played by ffplay? (in my understanding, ffplay is a kind of media player released by ffmpeg team, please correct me if I am wrong.)
,
and as ffplay uses the same "basic engine" as ffmpeg, then, ...
For example, ffmpeg can indeed wrap VC-1 in a .MP4 file,
or even MLP audio in an MPG/VOB; ffplay supports such "beasts" natively,
Mplayer requires a little hex-edit of the "monsters", and that's all.
Don't know whether ffmpeg has ever created non-compliant ASF files,
but considering what I have just said, that possibility always exists.
\\\ -
Hi poisondeathray,
1.
I have tried to play your attached asf file, met with the following error. Looks like WMP can not load tech smith codec correctly.
Here is the error informaiton URL, do you have any ideas? I have uploaded my two error screen snapshots for your analysis.
http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&mpver=11.0....09B&codec=tscc
2.
I totally agree with you recording to h264 is much better, but I have to record screen into .camrec format, then re-encode to h264 format. The re-encode process is very slow. It is why I choose to record to avi format, which could skip the re-encode process. Do you have any ideas skip the re-encode process and record video in h264 format directly other than record to avi format? I would like to follow your ideas if we could record to h264 directly. Maybe I need to install some h264 encoder to let Camtasia recorder to recognize it?
regards,
George
errs.zip -
Hi Midzuki,
I have tried to use ffmpeg. Here is my command and output from ffmpeg, seems ok.
Code:ffmpeg.exe -i capture-5.avi -acodec copy -vcodec copy capture-5.asf FFmpeg version SVN-r18506, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e nable-avisynth --enable-gpl --enable-zlib --enable-bzlib --enable-libgsm --enabl e-libfaac --enable-pthreads --enable-libvorbis --enable-libmp3lame --enable-libo penjpeg --enable-libtheora --enable-libspeex --enable-libxvid --enable-libfaad - -enable-libschroedinger --enable-libx264 libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.25. 0 / 52.25. 0 libavformat 52.32. 0 / 52.32. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 built on Apr 14 2009 04:04:47, gcc: 4.2.4 Input #0, avi, from 'capture-5.avi': Duration: 00:01:06.80, start: 0.000000, bitrate: 499 kb/s Stream #0.0: Video: camtasia, rgb555le, 1024x768, 5 tbr, 5 tbn, 5 tbc Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s Output #0, asf, to 'capture-5.asf': Stream #0.0: Video: tscc / 0x63637374, rgb555le, 1024x768, q=2-31, 1k tbn, 5 tbc Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 333 fps= 0 q=-1.0 Lsize= 4482kB time=66.50 bitrate= 552.2kbits/s video:1074kB audio:2864kB global headers:0kB muxing overhead 13.815020%
Code:http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&mpver=11.0....09B&codec=tscc Windows Media Player Error Message Help You've encountered error message C00D10D1 while using Windows Media Player. The following information might help you troubleshoot the issue. Codec is missing Windows Media Player cannot play the file (or cannot play either the audio or video portion of the file) because the TechSmith Screen Capture Codec (tscc) codec is not installed on your computer. The missing codec might be available to download from the Internet. To search for the TechSmith Screen Capture Codec (tscc) codec, see WMPlugins.com.
regards,
George
capture-new.avi -
Ron, my requirements are,
1. my original avi file is not supporting streaming quite well, for example, I can not jump to a media play location when the location is not buffered yet;
2. I want to convert to streaming friendly format, but want to reduce the re-encode time as much as possible. So I am looking for some solution which could solve it by adding just a container (take very little time). But any other possible solution which takes little time to do format conversion is ok.
I have tried the Xilisoft Converter, seems it is still takes quite long time to convert avi to mp4. But maybe I am wrong for setting it. I have tried to convert 100M avi file which is about 30 mins, it takes about 20 mins. My target is conversion time should be around 15 seconds. Any good ideas or comments?
BTW: I have uploaded a sample video (a small one) for your better analysis.
Originally Posted by RonS [WINDOWS-TEAM -
Until proven otherwise, WMP 9 is designed to not accept
the Camtasia codec in an ASF file.I have transformed your
.AVI file into a .ASF one with both vidtoasf.exe and Solveig DS Filter,
and the resulting files played fine in VirtualDub, MPC Homecinema,
Mplayer, and even ActiveMovie (amovie.ocx).
OTOH, ffmpeg created a .ASF whose video part is 100% unwatchable garbage. -
1) The asf file works for me in WMP11 and MPC, is there a reason you are using WMP9 ? It also works fine in the players Midzuki listed, and several more e.g. kmplayer , vlc
2) You don't have to capture in .camrec, you have the option to capture to other .avi formats (assuming you are using camtasia studio , you didn't say which version?) e.g. h264vfw, wmv9 in avi, etc... it also depends how fast your system is, but if you are doing 5fps, most modern systems should be able to keep up.....e.g. you could record h264vfw in avi, then remux to .mp4. You can adjust all these settings in the options
3) And you should re-encode the audio; PCM audio is a waste of space/bitrate, especially if these are meant to be tutorials -
Hi Midzuki,
I have some new findings which solve my issue. I am trying to use MPC player from the link below and I find even if avi file streaming is supported. So cool. Any ideas or comments? You can try MPC player with my uploaded avi file.
http://sourceforge.net/projects/guliverkli/
Another question, is it possible to embed MPC player into web browser? I want user to have web based experience. Thanks.
Originally Posted by Midzuki -
Thanks poisondeathray,
1. I have tried to use MPC player, and it works with streaming to arbitrary location even with avi files. It is so magic. I have a further question, how to embed MPC player into web browser?
MPC player I mean => http://sourceforge.net/projects/guliverkli/
2. I like your solution to record using other codec like h264 in cam recorder. But I did not find such codec supported in my Camtasia Studio 6 codec list. Please check my attached file for a screen snapshot for a list of supported codecs. Any ideas?
3. What audio format do you suggest I set in Camtasia Studio?
Originally Posted by poisondeathray
George
Similar Threads
-
Convert Webcam Video for TV - uncompressed avi > asf > mov - best solution?
By nakedgun in forum Video ConversionReplies: 0Last Post: 17th Nov 2011, 05:41 -
question about different ways to convert srt to sub/idx
By jimdagys in forum SubtitleReplies: 7Last Post: 15th May 2009, 00:12 -
Batch Convert AVI to MOV Quickly
By huttonhenrysfinest in forum MacReplies: 7Last Post: 9th Feb 2009, 20:23 -
Convert AVI to MPEG-4 (asf) for DVD player
By digitalife in forum Newbie / General discussionsReplies: 2Last Post: 15th Sep 2007, 11:49 -
What program will convert AVI to .RMVB quickly?
By Salva Veritate in forum Video ConversionReplies: 8Last Post: 13th Aug 2007, 21:15