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 14th January 2009, 19:19   #221  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
if you have installed something AFTER h264enc has created its config file, it won't find it. The reason why is explained in the -r option which you should read and run to recreate the config file. Also aacplusenc is only for HE-AAC (aka AAC+) audio, if you need LC-AAC, use neorAacEnc or FAAC, though nero also supports HE and HEv2

if you still get problems, you can set the paths to the programs manually by opening the config file which is located in

/home/username/.h264enc/config
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 15th January 2009, 21:17   #222  |  Link
ggking7
Registered User
 
Join Date: Sep 2006
Posts: 249
It works great! Thank you!

I'm wondering about the aspect ratio. My video ends up being stretched to fit the entire screen. Is there a way to have it preserve whatever aspect ratio the movie has without having to manually specify it each time?

Is there a way to have h264enc encode a video in the same way each time so I don't have to go through the interactive choices?
ggking7 is offline   Reply With Quote
Old 15th January 2009, 21:26   #223  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by ggking7 View Post
It works great! Thank you!

I'm wondering about the aspect ratio. My video ends up being stretched to fit the entire screen. Is there a way to have it preserve whatever aspect ratio the movie has without having to manually specify it each time?
I think this is normal when mplayer plays the video, but I'll look into it. Can't promise anything.

Quote:
Is there a way to have h264enc encode a video in the same way each time so I don't have to go through the interactive choices?
you can save the settings to the batch file. If you want to encode multiple video files inside a directory with the same settings, use "dir" instead of "file" when asked for source. this way the script operates in full batch mode
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 15th January 2009, 22:06   #224  |  Link
ggking7
Registered User
 
Join Date: Sep 2006
Posts: 249
Quote:
I think this is normal when mplayer plays the video, but I'll look into it. Can't promise anything.
I should have said it fills the 320x240 Nokia screen, not with mplayer. It must need the top and bottom black bars. Can that be set automatically?
ggking7 is offline   Reply With Quote
Old 15th January 2009, 22:11   #225  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by ggking7 View Post
I should have said it fills the 320x240 Nokia screen, not with mplayer. It must need the top and bottom black bars. Can that be set automatically?
I have no idea how Nokia displays video and honestly I don't know if I can implement such a thing. Doesn't the Nokia's have some aspect adjustments for video?
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 15th January 2009, 22:15   #226  |  Link
ggking7
Registered User
 
Join Date: Sep 2006
Posts: 249
It doesn't seem like a Nokia thing, I think it's in the encoding. Didn't h264enc expand the movie's aspect ratio to fill 320x240 when I specified that resolution? In the past I used an unreliable ffmpeg script to encode a different movie and it preserved the aspect ratio with black bars on the top and bottom.
ggking7 is offline   Reply With Quote
Old 15th January 2009, 22:25   #227  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by ggking7 View Post
It doesn't seem like a Nokia thing, I think it's in the encoding. Didn't h264enc expand the movie's aspect ratio to fill 320x240 when I specified that resolution? In the past I used an unreliable ffmpeg script to encode a different movie and it preserved the aspect ratio with black bars on the top and bottom.
h264enc doesn't do any expanding, it only supports forcing input aspect ratio. Though the expand filter is automatically added by mencoder each time encoding starts. If you show me the ffmpeg settings you used maybe I can add something, though again no guarantees here
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 15th January 2009, 22:32   #228  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
do you want me to add support for the expand filter so one can tweak the settings?
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 16th January 2009, 01:30   #229  |  Link
ggking7
Registered User
 
Join Date: Sep 2006
Posts: 249
Quote:
h264enc doesn't do any expanding, it only supports forcing input aspect ratio.
Does "forcing input aspect ratio" mean forcing it to preserve the original aspect ratio? That's exactly what I want to do.

Quote:
do you want me to add support for the expand filter so one can tweak the settings?
You're great. I can't say I'm totally sure how the problem is being caused, but if you think that's what's necessary to preserve the aspect ratio, then yes please.
ggking7 is offline   Reply With Quote
Old 16th January 2009, 01:41   #230  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by ggking7 View Post
Does "forcing input aspect ratio" mean forcing it to preserve the original aspect ratio? That's exactly what I want to do.


You're great. I can't say I'm totally sure how the problem is being caused, but if you think that's what's necessary to preserve the aspect ratio, then yes please.
I'm no expert on aspect ratios but forcing the input ratio is useful when the file/dvd has an incorrect aspect. I've found quite a few DVDs that are 16/9 but when played back they go to 4/3 so one needs to force the correct ratio.

I don't have much experience with the expand filter, but it can be either used to add black bars or set the aspect ratio for the output, eg -vf expand=320:::::16/9

you will probably have to do a few experiments on your own to see how it goes for you
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 16th January 2009, 19:47   #231  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
ChangeLog for version 8.6.9
Code:
* Add title/movie name to MKV and OGM as meta-info. The title is taken from the output name
provided by the user. For directory encodings, this will be skipped
* Add audio codec and audio language meta-info to MKV when encoding DVDs and copying the audio track(s).
Requested by Quentin Jackson
* Added support for the expand video filter
* Slightly improved info when the script is called without any parameters
* Implemented denoising presets for the 'tn' temporal denoiser
* Merge the mp3, aac, ac3 exporting code with the ffac3 and ffdts one since it's the same for the second audio track
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 19th January 2009, 18:18   #232  |  Link
ggking7
Registered User
 
Join Date: Sep 2006
Posts: 249
Thank you very much for the update. I tried forcing the input ratio and it created a video which had the correct aspect ratio on my computer via mplayer but the Nokia expands it to fill the whole screen.

I also tried the expand filter and it's on the right track but I can't get it right. If I specify either 320:::::4/3 or 240:::::4/3 I get the right shape with a 4/3 video window and black bars on the top and bottom on my computer, but the resolution ends up being 428x320 and of course the Nokia refuses to play it. I can't figure out how to expand a 16/9 video to 4/3 by creating black bars and maintaining 320x240 resolution.
ggking7 is offline   Reply With Quote
Old 19th January 2009, 18:34   #233  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by ggking7 View Post
Thank you very much for the update. I tried forcing the input ratio and it created a video which had the correct aspect ratio on my computer via mplayer but the Nokia expands it to fill the whole screen.

I also tried the expand filter and it's on the right track but I can't get it right. If I specify either 320:::::4/3 or 240:::::4/3 I get the right shape with a 4/3 video window and black bars on the top and bottom on my computer, but the resolution ends up being 428x320 and of course the Nokia refuses to play it. I can't figure out how to expand a 16/9 video to 4/3 by creating black bars and maintaining 320x240 resolution.
I'm not very confident with the expand filter and how it works, so in order not to give you false information, I suggest you send your question about your problem to the mencoder-users mailing list. You have to subscribe first though. Sorry if I'm not much of a help here
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 19th January 2009, 18:39   #234  |  Link
ggking7
Registered User
 
Join Date: Sep 2006
Posts: 249
No problem, I'll report back with findings.
ggking7 is offline   Reply With Quote
Old 19th January 2009, 21:31   #235  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by ggking7 View Post
I can't figure out how to expand a 16/9 video to 4/3 by creating black bars and maintaining 320x240 resolution.
I had to look this up:
-vf expand=aspect=4/3,scale=320:240

Seems that the operations and their order is exactly the same as in your question. Logical.

Last edited by nm; 19th January 2009 at 21:35.
nm is offline   Reply With Quote
Old 19th January 2009, 21:47   #236  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by nm View Post
I had to look this up:
-vf expand=aspect=4/3,scale=320:240

Seems that the operations and their order is exactly the same as in your question. Logical.
thanks for info, it seems it works that way. Though currently the expand filter is placed after the scale one in h264enc. Maybe I can add a question where to place it in h264enc, before or after scaling? If no one objects, I'll do it
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 20th January 2009, 02:21   #237  |  Link
ggking7
Registered User
 
Join Date: Sep 2006
Posts: 249
When I answer:

Specify the Expand filter values [press 'Enter' to skip]: aspect=4/3

I get the following when encoding should begin:

Code:
The round option must be an integer: =4/3
Option vf: Error while parsing expand parameter round (=4/3)

Exiting... (error parsing command line)
-> MEncoder has exited with a non-zero value!
-> Exiting in function: mencoder_exit()
What am I missing?
ggking7 is offline   Reply With Quote
Old 20th January 2009, 02:25   #238  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by ggking7 View Post
When I answer:

Specify the Expand filter values [press 'Enter' to skip]: aspect=4/3

I get the following when encoding should begin:

Code:
The round option must be an integer: =4/3
Option vf: Error while parsing expand parameter round (=4/3)

Exiting... (error parsing command line)
-> MEncoder has exited with a non-zero value!
-> Exiting in function: mencoder_exit()
What am I missing?
you can't use it now that way because I need to change the code. Also even if you could use it now, you'll still get it wrong as the expand filter comes after the scale one, so the aspect=4/3 won't work like you want. Wait till tomorrow, I'll release a new version. If you can't wait, save settings to batch file and manually add expand=aspect=4/3,scale=320:240 to the filter chain in the file. Then run h264enc -b /path/to/file/batchfile
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 20th January 2009, 02:42   #239  |  Link
ggking7
Registered User
 
Join Date: Sep 2006
Posts: 249
I can wait. Thanks!
ggking7 is offline   Reply With Quote
Old 20th January 2009, 16:36   #240  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
ChangeLog for version 8.7.0 - small release

Code:
* Added support for setting the position of the expand filer when scaling is used.
The user can now choose to place it before or after the scale filter. Previously the expand
filter was always placed after the scale filter which is not optimal in certain cases
* Small improvement/fix: when encoding two audio tracks to HE-AAC audio and muxing  them
into MKV, mkvmerge uses for both tracks the same track ID (1) while h264enc assumes that
the second track uses track ID 2 which is wrong so the option --aac-is-sbr 2:1 is incorrect here
and should actually be --aac-is-sbr 1:1 for the second audio track
@ ggking7

you can now use aspect=4/3 (and place the expand filter before scaling)
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 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 22:44.


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