Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Linux, Mac OS X, & Co

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th April 2008, 18:44   #61  |  Link
rberger
Registered User
 
Join Date: Apr 2008
Posts: 10
Quote:
Originally Posted by nm View Post
MEncoder calls libx264's parameter parsing code, so all parameters are always supported and the syntax is basically the same as in x264.
It even seems to be *exactly* the same up to a few parameters where mencoder has it's own version or plain wouldn't allow the x286 parameter because it could interfere with mencoders own operation, like -passfile for --stats or --progress leading to premature exit since it would mess with mencoders output.

Apart from those few, x264 parameters seem to be handed down by mencoder untouched. The reason they may have different names in the mencoder docs is because some options are implemented with several names in x264 itself, like --filter being the same as --deblock. Apparently, you can always look into common/common.c in the x264 source tree to find out what is what.

Quote:
Only x264 features that are not supported are the GTK+ GUI and Matroska and MP4 output since that part is handled by MEncoder.
Seems to me all those were never part of x264 proper. It's just an encoder library with a CLI.

Quote:
However, MP4 output should work with libavformat's muxer (-of lavf -lavfopts format=mp4).
I wouldn't recommend that. As of SVN-r26492, mencoder's MP4 muxing is once again - and likely always has been - broken. It even warns about that.

There's always the possibility to encode video and audio separately with mencoder and mux with gpac/mp4box. This generally works pretty well with PAL sources, but the moment you do IVTC on NTSC material or other frame juggling filtering, you might run into A/V sync problems. In these cases, it really matters what options you feed to mencoder, and it becomes a kind of a trial and error situation.

See e.g. sections 14.1.9 and 14.1.12.1 here:
http://www.mplayerhq.hu/DOCS/HTML/en...dvd-mpeg4.html

and how people already have run into sync troubles
http://forum.doom9.org/showthread.php?t=122018
http://thread.gmane.org/gmane.comp.v...yer.user/48954
http://thread.gmane.org/gmane.comp.v...yer.user/49206

That's one of the reasons encoding on Linux still sucks, that while mencoder seems to be the most advanced full feature transcoding frontend (transcode being another) and often enough working quite well right out of the box, it might always unexpectedly fail in some only slightly subtle situation. MP4 muxing definitely seems to be one of those.
rberger is offline   Reply With Quote
Old 28th April 2008, 21:27   #62  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Quote:
Originally Posted by rberger View Post
Seems to me all those were never part of x264 proper. It's just an encoder library with a CLI.
Well, they are part of x264, but not the core library (libx264). GUI and MP4 support need to be enabled when configuring the build (and they need external libraries, of course). Matroska output support is built-in to the CLI.

Quote:
I wouldn't recommend that. As of SVN-r26492, mencoder's MP4 muxing is once again - and likely always has been - broken. It even warns about that.
Ok, I was actually thinking whether I should say that it might work or if it should work, and I opted for the latter since there were rumors that it now works. I wouldn't recommend using it either if there is doubt.

Quote:
That's one of the reasons encoding on Linux still sucks, that while mencoder seems to be the most advanced full feature transcoding frontend (transcode being another) and often enough working quite well right out of the box, it might always unexpectedly fail in some only slightly subtle situation. MP4 muxing definitely seems to be one of those.
Avidemux is also worth trying, although it's more GUI-oriented. At least it can output MP4 properly
nm is offline   Reply With Quote
Old 29th April 2008, 01:34   #63  |  Link
rberger
Registered User
 
Join Date: Apr 2008
Posts: 10
Quote:
Originally Posted by nm View Post
Avidemux is also worth trying, although it's more GUI-oriented. At least it can output MP4 properly
Right, thanks for the reminder. I looked at avidemux at one point during the past weeks, but wasn't that much impressed, don't ask me why.

Also, I silently assumed it would link against ffmpeg libraries anyways and hence offer no real functional advantage compared to mplayer. Doesn't seem to be the case though, albeit I'm not yet completely sure about that. If they really maintain own muxers working better than the ffmpeg variants, that would definitely be great (although I have a distinct feeling that linking against gpac would be the best thing all these projects could do, as it appears to be the most advanced and robust mp4 muxer).

Considering avidemux offers a CLI, which escaped me the other day, and they advertise scriptability, I'm almost ready to get a little excited.

If anybody shared their avidemux experiences, especially regarding AVC/AAC coding and MP4 muxing, I would sure appreciate it.
rberger is offline   Reply With Quote
Old 29th April 2008, 02:45   #64  |  Link
nfm
MAGIK
 
Join Date: Feb 2006
Posts: 54
With ihq (Insane High Quality) preset mencoder crashes, uhq preset works fine. @nf and @rberger, thanks for good info, I dumped mp4 in favor of mkv in linux, although I still choose mp4 in windows.

Edit: Looks like mencoder crashes with custom x264 settings too:
Quote:
#!/bin/bash
#

mencoder "/media/vol05/DVD Rips/MainMovie/INSIDE MAN/VIDEO_TS/VTS_01_2.VOB" -o /dev/null -fps 30000/1001 -ofps 24000/1001 -frames 1000 -vf pullup,crop=720:352:0:64,softskip,harddup -af volnorm=2 -oac faac -faacopts mpeg=4:br=110bject=2 -ovc x264 -x264encopts pass=1:bitrate=1000:ref=5:mixed-refs:no-fast-pskip:bframes=5:b-pyramid:b-rdo:bime:weightb:direct=auto:filter=-2,-1:subme=6:trellis=2artitions=p8x8,b8x8,i4x4,i8x8:8x8dct:me=umh:threads=auto:thread-inputrogress:no-dct-decimate:no-psnr:no-ssim -passlogfile ./h264.stats 2>/dev/null

mencoder "/media/vol05/DVD Rips/MainMovie/INSIDE MAN/VIDEO_TS/VTS_01_2.VOB" -o ./ouput.avi -fps 30000/1001 -ofps 24000/1001 -frames 1000 -vf pullup,crop=720:352:0:64,softskip,harddup -af volnorm=2 -oac faac -faacopts mpeg=4:br=110bject=2 -ovc x264 -x264encopts pass=2:bitrate=1000:ref=5:mixed-refs:no-fast-pskip:bframes=5:b-pyramid:b-rdo:bime:weightb:direct=auto:filter=-2,-1:subme=6:trellis=2artitions=p8x8,b8x8,i4x4,i8x8:8x8dct:me=umh:threads=auto:thread-inputrogress:no-dct-decimate:no-psnr:no-ssim -passlogfile ./h264.stats 2>/dev/null
Screw mencoder, looks like I have do try the old way, ffmpeg | x264.

Last edited by nfm; 29th April 2008 at 04:19.
nfm is offline   Reply With Quote
Old 29th April 2008, 06:38   #65  |  Link
rberger
Registered User
 
Join Date: Apr 2008
Posts: 10
Throw out 'thread-input' and 'progress', then try again (I mentioned the issue with progress above already).
rberger is offline   Reply With Quote
Old 29th April 2008, 06:59   #66  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Quote:
Originally Posted by rberger View Post
Also, I silently assumed it would link against ffmpeg libraries anyways and hence offer no real functional advantage compared to mplayer. Doesn't seem to be the case though, albeit I'm not yet completely sure about that. If they really maintain own muxers working better than the ffmpeg variants, that would definitely be great
They use the lavf MP4 muxer, which works just fine AFAIK. The problem seems to be in MEncoder and its b-frame handling.

Quote:
(although I have a distinct feeling that linking against gpac would be the best thing all these projects could do, as it appears to be the most advanced and robust mp4 muxer).
I doubt it would improve the situation in this case. GPAC is also a bitch to compile.

Quote:
If anybody shared their avidemux experiences, especially regarding AVC/AAC coding and MP4 muxing, I would sure appreciate it.
Never had a problem with it for these purposes and this seems to be what most people are now using it for. Personally I prefer MEncoder, but that's because I already know the tricks to make it work.

Last edited by nm; 29th April 2008 at 07:01.
nm is offline   Reply With Quote
Old 29th April 2008, 07:16   #67  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Quote:
Originally Posted by nfm View Post
Edit: Looks like mencoder crashes with custom x264 settings too:
In addition to rberger's solution, there are a few other things to change:
  • When trying new stuff, don't redirect error messages to /dev/null. That is, remove "2>/dev/null" from the end of the command.
    Now you missed the helpful message "Option x264encopts: Unknown suboption progress" because of this.
  • Use turbo=1 or turbo=2 for the first pass (or just use CRF instead of bitrate modes)
  • Only use AVI output for H.264 if that's the last option. Try encoding audio and video separately (use -of rawvideo for H.264 ES output) and mux the resulting streams with mkvmerge or MP4Box.
Quote:
Screw mencoder, looks like I have do try the old way, ffmpeg | x264.
How do you intend to do IVTC in that workflow? I'd replace ffmpeg with MEncoder for better filtering, even if you insist on calling x264 separately.
nm is offline   Reply With Quote
Old 29th April 2008, 09:12   #68  |  Link
rberger
Registered User
 
Join Date: Apr 2008
Posts: 10
Quote:
Originally Posted by nm View Post
They use the lavf MP4 muxer, which works just fine AFAIK. The problem seems to be in MEncoder and its b-frame handling.
Which means the same muxer as mencoder. And the latter failed on me with the only x264 option specified being crf, which means zero b frames. Maybe it's mencoder, but frankly it'd surprise me.

Quote:
Never had a problem with it for these purposes and this seems to be what most people are now using it for. Personally I prefer MEncoder, but that's because I already know the tricks to make it work.
Thanks for the feedback. In the meantime, I checked again and found once more that avidemux is not really what I want, effectively being too gui bound. The quest continues.
rberger is offline   Reply With Quote
Old 29th April 2008, 09:15   #69  |  Link
nfm
MAGIK
 
Join Date: Feb 2006
Posts: 54
I got it to work, taking out 'thread-input' and 'progress' did the trick. Pardon me but I'm very much newbie in encodings, always will be
Regrading the "2>/dev/null", that' why I didn't see errors, now I understand that the standard output was redirected to /dev/null.
Quote:
Use turbo=1 or turbo=2 for the first pass (or just use CRF instead of bitrate modes)
Will do nm, thanks.
I tried matroska container "-o output.mkv -of lavf" there's no audio when faac is used, there's a problem with audio resampling rate. I still haven't got gpac to compile. I'm no doom9 guru, but isn't there a problem storing b-frames within an avi? Is mencoder affected by this? I think I will go about encoding audio and video separately, and mux them into mkv. Again, nm and rberger, big thanks.
nfm is offline   Reply With Quote
Old 29th April 2008, 09:31   #70  |  Link
rberger
Registered User
 
Join Date: Apr 2008
Posts: 10
Don't apologize, I'm pretty much new to the subject myself, and we all have to start somewhere and somehow.

Regarding muxing into Matroska (mkv), I believe its not supported by mencoder. It only has a demuxer (i.e. it can read) for that container type, but not a muxer (can not write). If it had one, your command line would anyway look like this "-o output.mkv -of lavf -lavfopts format=mkv". But as said I'm pretty much sure that's not supported.

Look at the output of your mencoder run. At some point early on it likely tells you that it muxes into avi (the default output container format) since your options make no sense to mencoder. That's also likely the cause your sound isn't muxed in, because avi doesn't support AAC.

Regarding b frames and avi I don't know, being not that proficient with this format myself.
rberger is offline   Reply With Quote
Old 29th April 2008, 09:39   #71  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Quote:
Originally Posted by rberger View Post
Which means the same muxer as mencoder. And the latter failed on me with the only x264 option specified being crf, which means zero b frames. Maybe it's mencoder, but frankly it'd surprise me.
Yes, MEncoder uses the same libavformat MP4 muxer, but it does work fine when used through ffmpeg and Avidemux. People use it all the time.

Quote:
Thanks for the feedback. In the meantime, I checked again and found once more that avidemux is not really what I want, effectively being too gui bound. The quest continues.
Well, the only scriptable tool that is better than MEncoder for handling telecine and variable framerate scenarios is AviSynth (since its IVTC filters support writing timecode files). I'd suggest using it through Wine if you have an x86 system.
nm is offline   Reply With Quote
Old 29th April 2008, 09:54   #72  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Quote:
Originally Posted by nfm View Post
I'm no doom9 guru, but isn't there a problem storing b-frames within an avi? Is mencoder affected by this?
Yes, there are problems. If the audio is AVI-compliant, it can be muxed with H.264 video but the A/V sync may be off a little. This depends on how many B-frames the encoder uses in the first batch that it inserts, IIRC. AVI output may be the last option if you have otherwise problems keeping the sync when encoding hybrid NTSC sources (part 24000/1001 fps film, part 30000/1001 fps video).
nm is offline   Reply With Quote
Old 3rd May 2008, 12:53   #73  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
@froggy1

just a simple request

would be possible to start h264enc (and btw xvidenc/divxenc) with only specify the input file ?

just start asking only the input file, then start asking pass/preset/audio/fps.. and so on
would be a little easier

one more: the script can check if a new version is released and download id

thanks

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 3rd May 2008, 14:22   #74  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,476
Quote:
Originally Posted by buzzqw View Post
@froggy1

just a simple request

would be possible to start h264enc (and btw xvidenc/divxenc) with only specify the input file ?

just start asking only the input file, then start asking pass/preset/audio/fps.. and so on
would be a little easier

one more: the script can check if a new version is released and download id

thanks

BHH
unfortunately this is not possible at the moment as i'll have to rewrite a lot of stuff and i'm a bit lazy at the moment to do that... as for checking for a newer version, i think i can add this
__________________
ffx264--ffhevc--ffxvid
froggy1 is offline   Reply With Quote
Old 3rd May 2008, 17:25   #75  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
thanks for your answer, i will glady wait :P

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 5th May 2008, 03:12   #76  |  Link
Lokean
Registered User
 
Lokean's Avatar
 
Join Date: Jul 2006
Posts: 38
Quote:
Originally Posted by rberger View Post
I looked at avidemux at one point during the past weeks,

Also, I silently assumed it would link against ffmpeg libraries anyways and hence offer no real functional advantage compared to mplayer. Doesn't seem to be the case though, albeit I'm not yet completely sure about that.
Avidemux uses an internal copy of the ffmpeg libraries (i.e. it doesn't link to the system ffmpeg).
Lokean is offline   Reply With Quote
Old 21st May 2008, 01:28   #77  |  Link
blaz
Registered User
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 57
dd or pv for iso encoding

froggy1's programs use dd or pv to create iso's from a dvd.

I've never heard of pv and am running into walls searching for it.

Can someone (froggy1?) point me to it (on the web ?) and maybe provide any advice as to whether it is preferable to dd.

One problem I'm having is copying older scratched dvds.
blaz is offline   Reply With Quote
Old 21st May 2008, 09:38   #78  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,476
well, i don't know which distro you use, but on openSUSE, pv is in the Packman repository. A search on rpmfind, finds this utility http://rpmfind.net/linux/rpm2html/search.php?query=pv

pv is an alternative to dd and displays a nice progress bar when making an ISO image out of a DVD. As for scratched DVDs, there's little I can do about it, it's beyond my control
__________________
ffx264--ffhevc--ffxvid
froggy1 is offline   Reply With Quote
Old 21st May 2008, 14:04   #79  |  Link
blaz
Registered User
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 57
Hmmm, I had looked at the pv package on debian but somehow: "PV ("Pipe Viewer") is a tool for monitoring the progress of data through a pipeline" didn't seem like what I was looking for.
But now on installing it and reading the man page, I see that it does a lot more than that.
Will give it a try. Thanks again.
blaz is offline   Reply With Quote
Old 30th May 2008, 13:28   #80  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,476
ChangeLog for version 8.4.4
Code:
* Small menu enhancements to the FPS settings
* Fixed wrong explanation for the temporal denoiser
* Removed support for the Sonic and SonicLS audio codecs since they
are experimental and far from complete for daily use
* Updated the man page
__________________
ffx264--ffhevc--ffxvid
froggy1 is offline   Reply With Quote
Reply

Tags
h264enc, ipod, mencoder, ps3, xbox360

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.