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. |
6th March 2009, 23:01 | #261 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
Quote:
|
|
9th March 2009, 00:31 | #262 | Link | |
Registered User
Join Date: Jan 2009
Posts: 2
|
Quote:
Now I can set up my own scripts with the batchfiles and just let it all run. I wish I had a robot to insert all my dvds to convert them to isos, though. |
|
29th March 2009, 13:31 | #263 | Link |
Registered User
Join Date: Jan 2009
Posts: 6
|
Resizing 16:9 video and mp4 output problem
First of all, I thank froggy1 for creating such a wonderful shell script. It has really helped me a lot. I faced a few problems though.
Firstly, the mp4 output was not complete. If my input file was 2 hours 22 minutes, the mp4 output file was only 2 hours in length. This has happened three times so far. But the avi output has no problems. So i need some help here. Since the avi file is complete, can somebody please tell me how to put it into an mp4 container? I dont want to do the encoding process all over again. My second problem is related to converting dvds. My dvd's are all widescreen and have black bars in the top and bottom. I am converting the videos for my ipod whose aspect ratio is 4:3. When i run h264enc, i first crop the file to remove the black bars. There are no problems there. Then i set the output resolution to 640x480 and force the input aspect ratio to 4:3. But the output file does not have the dimensions i want. It is still rectangular and when i play it on the ipod, i get black bars in the top and bottom again (since the ipod has a squarish screen). Then i used the expand filter and put aspect=4/3. But this does not help. The output file has the dimensions i want but the black bars are there again. I think i am doing something wrong here. Can somebody help me out with the settings? Basically, I have a widescreen dvd with black bars. I need a file with 640x480 resolution and 4:3 aspect ratio with correct file dimensions (i mean width and height). Thank you. |
31st March 2009, 11:06 | #264 | Link | ||
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
Quote:
To remux your existing AVI encodes to MP4, do the following Code:
MP4Box -aviraw video file.avi MP4Box -aviraw audio file.avi Code:
MP4Box -fps <value> -add video.h264 -add audio.aac -new output.mp4 If you still get shorter files than the original length, then mp4box is screwing up and you should dump the audio & video with mencoder instead, like this Code:
mencoder file.avi -oac copy -ovc copy -of rawvideo -o output.h264 mencoder file.avi -oac copy -ovc copy -of rawaudio -o output.aac Quote:
|
||
31st March 2009, 12:53 | #265 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
If you want to crop the widescreen DVD video to display it on a 4:3 screen while keeping the correct frame/movie aspect ratio, follow these steps: 1. Determine the crop height, as you already did before. I haven't used h264enc, but I have understood that it uses MPlayer's cropdetect filter and also allows the user to specify the cropping parameters manually. So, we use automatic detection to find out the crop height and get rid of possible letterboxing. Then we calculate a smaller crop width so that left and right sides of the widescreen frame also get discarded. 2. Find out whether the DVD is anamorphic (its display aspect ratio is 16:9) or plain 4:3. This can be done by playing the disc with some desktop media player app that displays the video with the correct aspect ratio and doesn't crop black bars automatically. If the video is played in a wide window, it is 16:9. MPlayer can also tell you this automatically (just make sure you select the correct title): Code:
mplayer -identify -vo null -ao null -frames 10 -really-quiet dvd://TITLE_NUM | grep ASPECT 3.Now you can calculate the crop width by using this formula: Code:
crop_width = crop_height * TARGET_DAR * SOURCE_WIDTH / (SOURCE_HEIGHT * SOURCE_DAR) For example, having an anamorphic PAL DVD with letterboxed 2.40:1 video as a source, the crop width would be about: 416 * 4/3 * 720 / (576 * 16/9) = 390 Crop a 390x416 rectangle from the center of the frame and scale that to a square-pixel resolution like 640x480 if the player can't handle anamorphic video. Last edited by nm; 31st March 2009 at 12:56. |
|
3rd April 2009, 05:57 | #266 | Link |
Registered User
Join Date: Jan 2009
Posts: 6
|
Hi. @froggy1 and @nm, thanks for your replies. Sorry for my late reply.
@froggy1, i used the MP4Box commands you mentioned and they worked fine. @nm, your formula worked perfectly. However i was wondering if it is possible to do this without cropping the sides. I understand i will lose the original aspect ratio (circles become ovals etc). But i have some files for which i don't want to crop the sides. Anyway to do it? |
3rd April 2009, 09:30 | #267 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
Code:
crop=w:h:x:y,dsize=640:480,scale=640:480 |
|
5th April 2009, 16:20 | #268 | Link |
Registered User
Join Date: Jan 2004
Posts: 17
|
Hi froggy, thanks for your script, I'm using it all the time
I was wondering if you could implement VBR encoding for faac? The current ABR solution is not really optimal... Code:
faac -faacopts mpeg=4:br=256:object=2 regards |
6th April 2009, 15:39 | #269 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
Quote:
|
|
6th April 2009, 15:54 | #270 | Link | ||
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
Quote:
|
||
6th April 2009, 16:05 | #271 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
this will complicate the codebase and may introduce A/V sync problems, especially when using frame rate doubling or halving video filters (bobbing, interlacing, etc). It's much easier for him to just save the settings to the batch file and change br= to quality= or whatever and then start encoding from the batch file
|
12th April 2009, 17:02 | #275 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
ChangeLog for version 8.7.3
Code:
* Optimize output file naming for file/vcd encodings. Based on a patch by Jouni Suorsa * Added support for the dsize video filter * Added support for VBR audio encoding when using FAAC or neroAacEnc as encoder. This automatically disables target file size calculation until I find out how to map quality values to bitrates for these codecs |
13th April 2009, 20:33 | #276 | Link | |
Registered User
Join Date: Dec 2002
Location: Finland
Posts: 6
|
First: Excellent script, I find it to be very, very useful.
I have a suggestion/request for the next release though: Would it be possible to add -noconfig all (or something comparable) to the mplayer command lines? Experimenting with some of the mplayer configs (notably msgcolor), I managed to get h264enc to fail with output like the following: Code:
$ h264enc -scan Would you like to scan a video file or a DVD? [file/dvd]: file Provide the input video file: /path/to/video/file.mpg -> Scanning the file... MPlayer Demuxer: Video Format: (standard_in) 1: syntax error Video Bitrate: kbps Video FPS: Video Resolution: Video Aspect: (standard_in) 1: syntax error Video Length: seconds or minutes (May not be accurate) (standard_in) 1: syntax error Number Of Frames: (May not be accurate) Audio Codec: /usr/local/bin/h264enc: line 589: /1000: syntax error: operand expected (error token is "/1000") -> No preset specified! -> Use: h264enc -help Quote:
|
|
14th April 2009, 00:55 | #277 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
Quote:
|
|
14th April 2009, 11:00 | #278 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
ChangeLog for version 8.7.4
Code:
* Proper file extension handling for directory batch encodings * Removed workaround for bug present in old versions of tsMuxeR. Please upgrade to tsMuxeR version 1.9.1(b). The previous one is no longer supported * Optimizations to the Blu-ray and AVCHD muxing code * Add video fps value to the tsMuxeR meta file for TS/Blu-ray/AVCHD muxing * User request: add an mplayer variable to the config file where the user can set custom mplayer options. One should be careful which options he uses as some of them may introduce problems and make h264enc behave badly. The default option set in the new MPLAYEROPTS variable is '-noconfig all' which disables parsing of the mplayer config file * Made the VCD device scanning code a function -> get_vcd_devices_func() * Updated the -scan option to also support VCD scanning * Small cleanups |
Tags |
h264enc, ipod, mencoder, ps3, xbox360 |
Thread Tools | Search this Thread |
Display Modes | |
|
|