PDA

View Full Version : video/audio demuxer for quicktime files?


Mug Funky
26th August 2005, 11:28
hi all. is there anything out there that can demux (or better, transmux) uncompressed video from a mov file to an avi or even raw file?

i've tried using ffmpeg, but it seemed to skip frames for some reason (quite annoying i'm sure you can imagine).

i'm trying to get 8-bit 2vuy (4:2:2 uncompressed) mov files into avi files so i can process them without colourspace conversion in avisynth. RGB isn't good enough - it taints the colour in a way that can't be fixed with wilbert's Colormatrix.

tia :)

oldcpu
27th August 2005, 18:50
hi all. is there anything out there that can demux (or better, transmux) uncompressed video from a mov file to an avi or even raw file?

i've tried using ffmpeg, but it seemed to skip frames for some reason (quite annoying i'm sure you can imagine).

i'm trying to get 8-bit 2vuy (4:2:2 uncompressed) mov files into avi files so i can process them without colourspace conversion in avisynth. RGB isn't good enough - it taints the colour in a way that can't be fixed with wilbert's Colormatrix.I'm very much a newbie to this and I have never tried such a conversion. But in the interest of trying to help, a quick internet search gave: http://lists.suse.com/archive/suse-linux-e/2004-Mar/0043.html with the command line:

mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4:vhq -o <output_file.avi> <input_file.mov>

Have you also checked out the various linux tools with GUIs? I haven't played with them myself, but its possible one or more may do what you want:

avidemux [intended (falls short) as linux virtual dub clone, that can also encode mpeg1/2]
http://fixounet.free.fr/avidemux/

bitterbpp
http://sunfryes.com/bitterbpp/about.html

[B]kmenc15 [Last update April-2005. A Qt/KDE MEncoder frontend designed to be a VirtualDub replacement for Linux. Useful for editing and encoding AVIs. It does not support opening of MPEGs. Allows cutting and merging at exact frames, applying any MPlayer/MEncoder filter, with preview.]
http://kmenc15.sourceforge.net/

gmencoder [Last update June-2003. A gnome-2 front-end to mplayer/mencoder. Supports postprocesing, cropping, scaling, subtitles ripping, multiple passes for encoding]
http://gmencoder.sourceforge.net/

Konverter [Last update 24-June-2005 (v.0.93). A KDE MEncoder frontend for video conversions, scaling and cropping]
http://www.kraus.tk/projects/konverter/

Mug Funky
28th August 2005, 08:09
hmm. closest i could get with mencoder was -ovc copy. but it skipped frames for reasons i don't understand (the output file was just what i needed, but missing frames that were most definitely in the mov file. mencoder's CLI output gave a long list of "skipped frame xxx")

i do not want to lossily compress this stuff at all, at least not until standards-conversion in avisynth and encoding for DVD.

[edit] btw, contrary to the spirit of this subforum, i'd like to stick to windows tools :) - i hate macs with a passion, and i haven't had the time to really get stuck into learning linux (besides which, there's no 'nix boxes here - the closest being mac os X which i prefer not to use).

oldcpu
28th August 2005, 09:05
[edit] btw, contrary to the spirit of this subforum, i'd like to stick to windows tools :) - i hate macs with a passion, and i haven't had the time to really get stuck into learning linux (besides which, there's no 'nix boxes here - the closest being mac os X which i prefer not to use).Well, no dispute there are lots of good packages available for Windows, and hence the MANY threads on Windows apps. However I do believe Linux multimedia (with packages that have a GUI) are getting better by the day. I find I can now easily backup the main title of a DVD with Linux.

Where Linux fails (wrt DVDs) IMHO is there is no GUI-based/friendly Linux package like the Windows IfoEdit for keeping the original main menu, nor the subtitles, nor the extra languages, nor the complex menu navigation to other features. Possibly Pgcedit (for Linux) does something those lines, but I've failed trying to get it to run on my PC. Pgcedit has what is supposed to be a simple (but non-standard) installation method, and for whatever reason (probably something silly on my part), thats enough to stop it from executing on my Linux PC.
[Edit 28-Aug-05 - PgcEdit now runs on my PC. Possibly an earlier installation error on my part. Hence this criticism about not being able to edit/backup exiting menus in Linux may be incorrect].

Have you succeeded in doing your very specific demux (mov to avi) under Windows?

oldcpu
28th August 2005, 10:09
hmm. closest i could get with mencoder was -ovc copy. but it skipped frames for reasons i don't understand (the output file was just what i needed, but missing frames that were most definitely in the mov file. mencoder's CLI output gave a long list of "skipped frame xxx")I assume you tried transcode and ffmpeg together?
transcode -i file.mov -y ffmpeg -F wmv2 -o file.avi
Reference: http://users.dslextreme.com/~craig.lawson/linux_notes/video.html

Another idea is the Gmerlin transcoder (I haven't tried this myself):
http://gmerlin.sourceforge.net/

Mug Funky
28th August 2005, 10:31
that reference says it can transcode any recognised format. i'm trying to direct stream copy a format that is not recognised by anything but the BlackMagic codecs, though the frustrating thing is it is clearly just uncompressed VYUY with a fancy fourCC code.

the closest i've got now is -dumpvideo, then loading stream.dump with rawsource in avisynth. but the frame headers mean the frame shifts horizontally by 2 pixels per frame, something i'm currently unable to correct (times like these i wish i'd done more programming so i could strip out the frame headers, or simply write an input plugin for 2vuy mov files...)

linux isn't an option because i'm doing this at work, and i don't think anybody would take kindly to me installing an OS i simply don't know how to use, that doesn't support NTFS (which locks me and everyone else out of a lot of data). this last thing isn't linux's fault, but windows being bastards and not sharing their format.

r0lZ
28th August 2005, 14:43
Pgcedit has what is supposed to be a simple (but non-standard) installation method, and for whatever reason (probably something silly on my part), thats enough to stop it from executing on my Linux PC.@oldcpu

Which version have you used? The standalone executable, or the Tcl/Tk cource code? What are the symptoms?

Normally, the executable may be launched without problem from any place, but you need write permission on the install directory the first time you launch a new version.
The source code requires a full and up-to-date installation of Tcl/Tk.
In both cases, you need write permission on your home, too, but that should not be the problem.

Since it's the first time I heard about installation problems under Linux, if you find why it doesn't work, please let me know. Thanks.

oldcpu
28th August 2005, 18:15
Since it's the first time I heard about installation problems under Linux, if you find why it doesn't work, please let me know. Thanks.Thankyou for your kind offer.

Motivated by the possibility of help, I tried once again (from scratch), this time on my secondary system (an Athlon-1100+). I downloaded pgcedit (for linux), did a cut and paste (and printed out) the "Installation" instructions, making notes along the way so I could explain what I did.

Much to my pleasant surprise, "pgcedit" window popped up, and it appears it works. Well, at least the GUI worked. I plan to install it now on my main system (Athlon-2800+) and I will try the functionally aspects later this week or next weekend.

I can't figure out what I did differently this time, other than this time I copied the "pgcedit" executable into "/home/oldcpu/bin/" directory. Last time I had the executeable in my "/home/oldcpu/new-tar/pgcedit/" directory. Perhaps something to do with the path ....

Anyway, thanks for motivating me to try again. I'm keen to see if it can help me improve the quality of my DVD backups (via better menus, subtitles, additional languages etc ...).

r0lZ
28th August 2005, 19:25
Thanks for the info.

Note that PgcEdit is not a VOB editor. It is not able to add or remove streams. But it allow you to import or blank whole domains.
His main purpose is the edition of the navigation commands and parameters, so that you can make a DVD backyp the way you want it.
Good luck.

oldcpu
28th August 2005, 19:57
Note that PgcEdit is not a VOB editor. It is not able to add or remove streams. But it allow you to import or blank whole domains.
His main purpose is the edition of the navigation commands and parameters, so that you can make a DVD backyp the way you want it.
Good luck.Thankyou for your comment. I'm hoping that I am very close to achieving the objective I set out for myself sometime back (in backing up my DVD9s to DVD5s in Linux (including the menu/languages/subtitles), independant of MS-Windows operating system).

I'm pretty confident, with my current knowledge and Linux tools (command line and/or ripper/requantize software), that I can create one large .mpg file (VOB compliant format), appropriately shrunk in size from the original DVD size. All I need to do learn to do now is:
a. divide that into 1GByte or smaller VOB chunks (keeping the subtitles and language tracks), and
b. restore it back into the DVD's original menu structure, and regenerate chapters/buttons, etc ...

I'm hoping PgcEdit helps me partly with item-b above, which I think/hope is what you mean by "editing the navigation commands and parameters".

I still am concerned/suspect I may be forced to use IfoEdit under wine for the vob importing, which I think is the add/remove streams (which would also partly "defeat" my goal of "linux" only). I haven't been very successful with IfoEdit in the past (it runs under wine on my PC, but I've failed creating playable DVDs). Maybe PgcEdit will help me cross that barrier.

r0lZ
28th August 2005, 20:27
Hum, not sure. PgcEdit cannot recreate IFOs from scratch, nor rebuild the tables for a new VOB set. But you may import the original menu domain back in your new compilation, or edit, import or export the menu button params.

Note: In point A, you may safely cut the VOB files at any place, but the VOB files must be less than 1GB (not equal to 1GB!), and the cut point must be at a sector boundary (ie the file must be a multiple of 2048 bytes). Some authoring programs cuts them just before a nav pack, but it's not a requirement.
The way the VOB is cutted is not included in the IFOs, so you don't need to edit them.

Zep
29th August 2005, 13:10
if all you are trying to do is get the encoded data to an avi file then just export to
avi with passthrough (compression = NONE) turned on. That should work on
many encode formats if not try ffmpegX (I assume you only tried ffmpeg CLI?)

http://homepage.mac.com/major4/video.html

Just use passthrough

NOTE: ffmpegX is a GUI front end to ffmpeg and mencoder and all sorts of other encode projects.


you could try the Movtoavi
http://lags.leetcode.net/Codec_mac.html


or


MOV to AVI Converter
http://www.filetrial.com/convert/movtoavi.html


or


you could try rad tools which has a mov to avi converter also
http://www.radgametools.com/bnkdown.htm

Mug Funky
30th August 2005, 07:09
the trick is avoiding colourspace conversions... "uncompressed" doesn't necessarily mean "lossless" if the video is being turned into RGB.

but thanks for the links :)

[edit]

w00t! ffmpeg succeeds where mencoder fails. cool.

now to find a way to do it without intermediate files :)

oldcpu
30th August 2005, 07:47
ffmpeg succeeds where mencoder fails. cool.

now to find a way to do it without intermediate files :)Not sure if it will help, but there is an effort going on in the linux "world" to create a GUI specifically for ffmpeg. (Note there already is one for the Mac, but that has not been ported to linux). The Linux package is xmffmpeg and its still in an "alpha" version, which could mean its possibly still unstable.

XMFFMPEG - a GUi for ffmpeg programmed in language tcl/tk, you can encode from your dvd drive to mp4g4/xvid, snow, mpeg1 , DVd, PVCd, PDVD.etc... It includes matrix editor.
http://sourceforge.net/projects/xmffmpeg/

Note that I haven't tried to install nor run it on my PC

Lastest version is xmffmpeg-alpha-1.0.7, released on 23-Aug-05.

oldcpu
31st August 2005, 07:36
ffmpeg succeeds where mencoder fails. cool.Since I previously posted a link for a development GUI for ffmpeg, here is a link for a GUI for mencoder: http://it.geocities.com/fnt400/dvdkup/

or perhaps, here from the source is a list of many front ends for mencoder:
http://www4.mplayerhq.hu/homepage/design6/projects.html

Zep
31st August 2005, 07:50
the trick is avoiding colourspace conversions... "uncompressed" doesn't necessarily mean "lossless" if the video is being turned into RGB.

but thanks for the links :)

[edit]

w00t! ffmpeg succeeds where mencoder fails. cool.

now to find a way to do it without intermediate files :)


1) Did you try the mov to avi converters by any chance? the one
looked very good. (I'm just curious since i never tried them myself
because i never have had a need to do that)

2) was that ffmpeg or ffmpegX that you got it working?
(note it was me that ported the first working OSX version of ffmpeg
to OSX LOL I few others tried a month or so before me but it was all
the bugs that made me do my own version. After i got it working i
left the project with my fixes in CVS and others have since (Like major)
have taken it to a whole new level by adding the front end GUI and a lots
more i never dreamed would happen)

3) there should be no color space conversion since it is passthrough
in quicktime and the data is untouched only the wrapper is changed
from mov to avi. You must have been doing something wrong
because it works fine here in QT 7.0.1 Pro.

Zep
31st August 2005, 08:18
the trick is avoiding colourspace conversions... "uncompressed" doesn't necessarily mean "lossless" if the video is being turned into RGB.

but thanks for the links :)

[edit]

w00t! ffmpeg succeeds where mencoder fails. cool.

now to find a way to do it without intermediate files :)


BTW - QT on windows does more avi wise. Maybe you should
try that? and stay in windows the whole time lol

Zep
31st August 2005, 09:06
the trick is avoiding colourspace conversions... "uncompressed" doesn't necessarily mean "lossless" if the video is being turned into RGB.
There is no trick. We all have told you need to passthrough the encoded
data. The video/audio data is never decoded/encoded and thus never RGB.
If whatever app you are using changes the encoded video/audio data in any
way then it is not passthrough or you are doing something wrong.
(which appears to be the case because you have intermediate files)

"uncompressed" and "lossless" have nothing to do with this.

lossless has to do more with encoding and not a term used when
talking about a simple data passthrough from one wrapper to another
wrapper where untouched video/audio data is a given.

uncompressed means nothing to passthrough which could not care
less if the video/audio data was uncompressed.



now to find a way to do it without intermediate files :)

ok you are SO doing something funky. (pun intended lol) There is
no need at ALL to use intermediate files in ffmpeg or ffmpegX or
Quicktime (OSX or windows versions)

BTW - Are you on linux box or OSX or both?
(I assume you run windows lol)

Mug Funky
1st September 2005, 12:47
hmm. okay... there seems to be a little confusion in what i'm actually doing (hehe... my fault), so i'll go over precisely what i'm doing and why:

- i'm capturing NTSC film footage with a decklink card on a Mac. this captures into the "2Vuy" format, or the "2vuy" format (note the lowercase v... for some reason this is important though the formats themselves are identical data-wise).

- i'm then intending to process these massive mov files with avisynth - i get to IVTC, speed up and resize to PAL all in one nice move.

i'm not sure how much avisynth y'all know, but QTreader can import quicktime with the QT codecs no problem, but it does so via RGB24 - qtreader is a TMPGenc plugin, and that program for whatever reason is RGB24 only. directshowsource does the same - rgb all the way.

the other route is premiere pro - now, theoretically it should return yuy2 if the source and destination ask for it. but this simply isn't so.

so what i've been trying to do is trans-mux the mov file into an avi, for which blackmagic codecs exist. this avi is the intermediate file i'm talking about. this way i can just use "avisource("z:\movie.avi")" and get a very hefty speed gain.

now the tricky part here is that programs that purport to convert mov to avi have to be able to decode the mov first - the windows quicktime app doesn't actually support avi codecs - it can only do uncompressed RGB and maybe cinepak and indeo (like they're useful...).

i solved the muxing problem, for video at least (i don't have the syntax to make ffmpeg change big endian PCM to little endian, but i'm sure it's simple) by using this line for the win32 version of ffmpeg:

ffmpeg -i "clip01.mov" -vcodec copy -an clip01.avi

out comes a blackmagic avi with no audio which i can load and process at a nice speed.

now, yesterday i discovered that the blackmagic codec itself returns ONLY rgb24! that's a horrible thing, and i've emailed decklink support about it. so far they have no idea what i'm talking about, and suggested i use after effects (o...kay). obviously i'm not doing that as last time i compared the two, avisynth was 17 times faster and higher quality due to no conversions... this was for a simple compositing task.

so - i've got a 2x speed improvement thanks to ffmpeg (thankyou devs!), but still there's the rgb thing. i guess i can request that ffmpeg include 2yuv decoding in their next release... i can provide short clips in both NTSC and PAL... it's all copyrighted content though, unless anyone wants the colourbars at the start of a tape... at any rate this isn't the thread to discuss ffmpeg feature requests in.

stephanV
1st September 2005, 13:06
You could try a remux in graphedit with 3ivx splitter and AVI muxer...

container forum seems more appropriate for this thread anyways...