Thanx for d response. But i cant find way to do that :(
btw what i want is get some API sort of thing to do the conversion that i can embed within my code.
Any code sample would be of great help!!!!!
Main Topics
Browse All TopicsI want to write some code for converting different video files to mpeg format to create VCD/ DVD.This can be divided into two tasks:
1) Conversion of different file formats to Mpeg format
2) Writing these files to CD/DVD to be playable in any player.
Now for 1st part:
I need code to convert different video formats to mpeg format.
The problem is that i am unable to get any sample code that could help me how to do that.
I am not very much sure but i suppose this can be done using:
i) FFMpeg API
ii) DirectX API (not pretty much sure)
iii) QuickTime API (not pretty much sure for Video Conversion)
Taking i)
I have downloaded the FFMpeg project code through SVN, but that didnt helped me much, as i want only the conversion related code from that and i am not sure how to approach for this.
Taking ii)
I am not very much sure about this but i guess there might be some way of doing this. I want to know is there any way of doing this task of conversion using DirectX SDK? if so then how(code)?
Taking iii)
I am not very much sure about video conversion, but i m considering as it provide good support for audio conversions. I want to know is there any wayvideoconversion using Quicktime? if so then how(code)?
Now the 2nd part: VCD/DVD Writing
As explained above i want to create VCD/DVD from the mpeg files(if OK to use this format).
I dont know how to do this as i suppose IMAPI2 doesnt provide anything like TrackAtOnce for videoCD/ DVD writing.
Watever i think ineed to create some hierarical structure for this and remove headers from mpeg files for creation of stream to be passed to DiscBurner.
I am not sure how much i am right ................
Sorry for that long question but i want to tell u experts what i know so i could provide u much information about my problem.
and get a better response asap.
Thanks in advance
Tarun
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
thanks Mr. GuruDenis for your kind response, but what i want to do is s get some API sort of thing to do the conversion that i can embed within my code.
Any code sample would be of great help!!!!!
This might be the next option(also not really sure how to do that).Can you p[lz show me how to do that this might help me if nothing else work out)
>> Can you p[lz show me how to do that this might help me if nothing else work out)
I'm afraid that I cannot publish this code entirely because it's owned by my employer, while a short snippet will hardly be enough to demonstrate the concept. The idea, however, is to start mencoder.exe with command line parameters that match the desired output format, that's all. If you need to monitor conversion progress, mencoder outputs that to standard ouptut, so you can redirect it with CreatePipe and CreateProcess as described here:
http://msdn.microsoft.com/
>> i want to do is s get some API sort of thing
Consider using libavcodec then. It will be sufficiently more complicated than launching mencoder, though. See:
http://en.wikipedia.org/wi
http://www.inb.uni-luebeck
Thanks Gurudenis, I am now trying to compile ffmpeg using MINGm/Minsys way to get the lib files.
Now the problem is when i follow the procedure as given in several links, then a problem starts up during compilation the compilation is taking more than 6 hrs. and still not completed.
here is the complete output:
$ ./myconfig
install prefix C:/msys/1.0/local
source path /c/ffmpeg_latest
C compiler gcc
.align is power-of-two no
ARCH x86_32 (generic)
big-endian no
yasm no
MMX enabled yes
CMOV enabled no
CMOV is fast no
EBX available yes
EBP available no
gprof enabled no
debug symbols yes
strip symbols yes
optimizations yes
static yes
shared no
postprocessing support no
software scaler enabled no
new filter support no
filters using lavformat no
video hooking no
network support yes
IPv6 support no
threading support no
SDL support no
Sun medialib support no
AVISynth enabled no
liba52 support no
liba52 dlopened no
libamr-nb support no
libamr-wb support no
libdc1394 support no
libdirac enabled no
libfaac enabled no
libfaad enabled no
libfaad dlopened no
libgsm enabled no
libmp3lame enabled no
libnut enabled no
libschroedinger enabled no
libtheora enabled no
libvorbis enabled no
libx264 enabled no
libxvid enabled no
zlib enabled no
bzlib enabled no
Enabled decoders:
aac gif pcx
aasc h261 ptx
adpcm_4xm h263 qdm2
adpcm_adx h263i qdraw
adpcm_ct h264 qpeg
adpcm_ea huffyuv qtrle
adpcm_ea_maxis_xa idcin ra_144
adpcm_ea_r1 imc ra_288
adpcm_ea_r2 indeo2 rawvideo
adpcm_ea_r3 indeo3 rl2
adpcm_ea_xas interplay_dpcm roq
adpcm_g726 interplay_video roq_dpcm
adpcm_ima_amv jpegls rpza
adpcm_ima_dk3 kmvc rv10
adpcm_ima_dk4 loco rv20
adpcm_ima_ea_eacs mace3 sgi
adpcm_ima_ea_sead mace6 shorten
adpcm_ima_qt mdec smackaud
adpcm_ima_smjpeg mimic smacker
adpcm_ima_wav mjpeg smc
adpcm_ima_ws mjpegb snow
adpcm_ms mlp sol_dpcm
adpcm_sbpro_2 mmvideo sonic
adpcm_sbpro_3 motionpixels sp5x
adpcm_sbpro_4 mp2 sunrast
adpcm_swf mp3 svq1
adpcm_thp mp3adu svq3
adpcm_xa mp3on4 targa
adpcm_yamaha mpc7 theora
alac mpc8 thp
amv mpeg1video tiertexseqvideo
ape mpeg2video tiff
asv1 mpeg4 truemotion1
asv2 mpegvideo truemotion2
atrac3 msmpeg4v1 truespeech
avs msmpeg4v2 tscc
bethsoftvid msmpeg4v3 tta
bfi msrle txd
bmp msvideo1 ulti
c93 mszh vb
cavs nellymoser vc1
cinepak nuv vcr1
cljr pcm_alaw vmdaudio
cook pcm_dvd vmdvideo
cscd pcm_f32be vmnc
cyuv pcm_f32le vorbis
dca pcm_f64be vp3
dnxhd pcm_f64le vp5
dsicinaudio pcm_mulaw vp6
dsicinvideo pcm_s16be vp6a
dvbsub pcm_s16le vp6f
dvdsub pcm_s16le_planar vqa
dvvideo pcm_s24be wavpack
eacmv pcm_s24daud wmav1
eatgv pcm_s24le wmav2
eightbps pcm_s32be wmv1
eightsvx_exp pcm_s32le wmv2
eightsvx_fib pcm_s8 wmv3
escape124 pcm_u16be wnv1
ffv1 pcm_u16le ws_snd1
ffvhuff pcm_u24be xan_dpcm
flac pcm_u24le xan_wc3
flic pcm_u32be xl
flv pcm_u32le xsub
fourxm pcm_u8 zlib
fraps pcm_zork
Enabled encoders:
ac3 mp2 pcm_u24le
adpcm_adx mpeg1video pcm_u32be
adpcm_g726 mpeg2video pcm_u32le
adpcm_ima_qt mpeg4 pcm_u8
adpcm_ima_wav msmpeg4v1 pcm_zork
adpcm_ms msmpeg4v2 pgm
adpcm_swf msmpeg4v3 pgmyuv
adpcm_yamaha nellymoser ppm
alac pam qtrle
asv1 pbm rawvideo
asv2 pcm_alaw roq
bmp pcm_f32be roq_dpcm
dnxhd pcm_f32le rv10
dvbsub pcm_f64be rv20
dvdsub pcm_f64le sgi
dvvideo pcm_mulaw snow
ffv1 pcm_s16be sonic
ffvhuff pcm_s16le sonic_ls
flac pcm_s24be svq1
flv pcm_s24daud targa
gif pcm_s24le tiff
h261 pcm_s32be vorbis
h263 pcm_s32le wmav1
h263p pcm_s8 wmav2
huffyuv pcm_u16be wmv1
jpegls pcm_u16le wmv2
ljpeg pcm_u24be zlib
mjpeg
Enabled parsers:
aac dvdsub mpeg4video
ac3 h261 mpegaudio
cavsvideo h263 mpegvideo
dca h264 pnm
dirac mjpeg vc1
dvbsub mlp vp3
Enabled demuxers:
aac lmlm4 pcm_u16le
ac3 m4v pcm_u24be
aiff matroska pcm_u24le
amr mjpeg pcm_u32be
apc mlp pcm_u32le
ape mm pcm_u8
asf mmf pva
au mov rawvideo
avi mp3 redir
avs mpc rl2
bethsoftvid mpc8 rm
bfi mpegps roq
c93 mpegts rpl
daud mpegtsraw rtsp
dirac mpegvideo sdp
dsicin msnwc_tcp segafilm
dts mtv shorten
dv mvi siff
dxa mxf smacker
ea nsv sol
ea_cdata nut str
eac3 nuv swf
ffm ogg thp
flac oma tiertexseq
flic pcm_alaw tta
flv pcm_f32be txd
fourxm pcm_f32le vc1
gsm pcm_f64be vc1t
gxf pcm_f64le vmd
h261 pcm_mulaw voc
h263 pcm_s16be wav
h264 pcm_s16le wc3
idcin pcm_s24be wsaud
iff pcm_s24le wsvqa
image2 pcm_s32be wv
image2pipe pcm_s32le xa
ingenient pcm_s8 yuv4mpegpipe
ipmovie pcm_u16be
Enabled muxers:
ac3 m4v pcm_mulaw
adts matroska pcm_s16be
aiff matroska_audio pcm_s16le
amr mjpeg pcm_s24be
asf mmf pcm_s24le
asf_stream mov pcm_s32be
au mp2 pcm_s32le
avi mp3 pcm_s8
avm2 mp4 pcm_u16be
crc mpeg1system pcm_u16le
daud mpeg1vcd pcm_u24be
dirac mpeg1video pcm_u24le
dts mpeg2dvd pcm_u32be
dv mpeg2svcd pcm_u32le
eac3 mpeg2video pcm_u8
ffm mpeg2vob psp
flac mpegts rawvideo
flv mpjpeg rm
framecrc mxf roq
gif null rtp
gxf nut swf
h261 ogg tg2
h263 pcm_alaw tgp
h264 pcm_f32be vc1t
image2 pcm_f32le voc
image2pipe pcm_f64be wav
ipod pcm_f64le yuv4mpegpipe
Enabled protocols:
file pipe tcp
http rtp udp
Enabled filters:
crop
Enabled bsfs:
dump_extradata mov2textsub noise
h264_mp4toannexb mp3_header_compress remove_extradata
imx_dump_header mp3_header_decompress text2movsub
mjpega_dump_header
Enabled indevs:
vfwcap
Enabled outdevs:
License: LGPL
Creating config.mak and config.h...
And it hangs here i suppose(alhough the process is taking memmory from my system)...................
Any Help ...................
This looks like a compiler bug to me because no errors are reported, yet it hangs while creating a mak file (apparently). I'm no expert in MinGW, but I do remember having problems configuring it properly when I had to use it once. Make sure you're using the appropriate home directory and the command line switches are as described here:
http://forum.doom9.org/arc
Have you looked for a compiled binary? Have a look at these links, maybe they'll prove useful:
http://www.swindongallery.
http://downloads.sourcefor
http://www.bala-krishna.co
Also look for avcodec.dll and avformat.dll (and their lib files) on the web, this is what ffmpeg compiles to.
THanx Mr GuruDenis,
Sorry for so late reponse......
But stil i m not able to compile FFMPEG.
anyways thanx for ur help, i have downloaded files from http://arrozcru.no-ip.org/
and now trying to get something out of it.
You should use DirectShow API (part of DirectX) to do this conversion in code. DirectShow is far to large for me to give you example code, but here are the things you would need:
" DirectShow SDK (available from Microsoft for free)
" ffdshow (freeware encode/decode codec for directshow)
" GraphEditPlus (not necessary, but can generate c++ code for you from a graph making life easier)
Bsically, you would be creating a DirectShow graph that has the file you want to convert as the source filter (File Source Async.) then any demux/transform filters required, then ffdshow encoder filter, then any mux required, finally to file writer sink.
Sounds complicated, but its not that hard.
-radeus
Business Accounts
Answer for Membership
by: GurudenisPosted on 2008-09-03 at 01:03:18ID: 22374918
Try using mencoder:
http://www.mplayerhq.hu/
It has plenty of useful command line switches and verbose output. Therefore it can be controlled and monitored programmatically. I've done this before, and I can tell you that mencoder does the job pretty well.