Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto author AVI->DVD with menus using Linux only !
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 29, 30, 31  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Sun Jan 16, 2005 12:36 am    Post subject: Reply with quote

Magneto wrote:
Thanks for the reply
I tried this out with a new avi file that was merged via avimerge and plays fine in xine and mplayer with no errors however transcode dies everytime with a header error. I tried avifix and it seemed to work and the transcode process proceeded further but still died quickly

The avifix man is not that indepth im trying to fix the header correctly so I can proceed with the optimal transcoding

An alternative could be to use avidemux's 'Append video..' option to join the avi parts instead of avimerge.

Do the seperate .avi parts have the same resolution & framerate before joining ?

If they aren't then you may have to extract the 5.1 stream, re-encode parts to a common resolution/framerate, re-mux extracted 5.1 streams with re-encoded parts using avidemux, then join parts.
Back to top
View user's profile Send private message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Sun Jan 16, 2005 1:31 am    Post subject: Reply with quote

kupopo wrote:
Hi. This seems to be a problem that only I've experienced. I can't find any other references to it elsewhere. Every time I try to use multimux to get 5.1 surround, it doesn't work. I get this output:
Code:
$ multimux -v -o out.wav left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav
Panteltje multimux-0.1
found input file left.wav
found input file centre.wav
found input file right.wav
found input file left_surround.wav
found input file right_surround.wav
found input file lfe.wav
main(): wave header_size=44
input_files=6
statptr[0]=0x804e310 i=0 statptr[0] -> st_size=117596160
input file left.wav size is 117596160 delay is 0.00 milli seconds
statptr[1]=0x804e310 i=1 statptr[1] -> st_size=117587968
input file centre.wav size is 117587968 delay is 0.00 milli seconds
statptr[2]=0x804e310 i=2 statptr[2] -> st_size=117596160
input file right.wav size is 117596160 delay is 0.00 milli seconds
statptr[3]=0x804e310 i=3 statptr[3] -> st_size=117596160
input file left_surround.wav size is 117596160 delay is 0.00 milli seconds
statptr[4]=0x804e310 i=4 statptr[4] -> st_size=117596160
input file right_surround.wav size is 117596160 delay is 0.00 milli seconds
statptr[5]=0x804e310 i=5 statptr[5] -> st_size=117579776
input file lfe.wav size is 117579776 delay is 0.00 milli seconds
longest_input_file_length=117596160
bytes_to_add[0]=0
bytes_to_add[1]=0
bytes_to_add[2]=0
bytes_to_add[3]=0
bytes_to_add[4]=0
bytes_to_add[5]=0
longest_input_data_length=2147479552
longest_input_file_length=117596160
out_header -> data_length=4294942720
out_header -> length 4294942764
expected_output_filesize is 4294942764
writing wave format file
writing output file out.wav 10998068 (0.26%)

You might notice that the output size wants to be 4GB. I never had the patience to see it out, but this happens every time (and takes a heck of a long time to do it, too). I can't seem to get multimux to work at all, ever. Has anyone else had similar problems, or successes?

Edit: it seems that the problem lies in sox. The output files think they are 328 minutes long:
Code:
sox: Chunk fmt
sox: Chunk data
sox: Reading Wave file: Microsoft PCM format, 2 channels, 48000 samp/sec
sox:         192000 byte/sec, 4 block align, 16 bits/samp, 235204608 data bytes
sox: Input file out.s1e003.ac3.wav: using sample rate 48000
        size shorts, encoding signed (2's complement), 2 channels
sox: Input file out.s1e003.ac3.wav: comment "out.s1e003.ac3.wav"

sox: Writing Wave file: Microsoft PCM format, 1 channel, 48000 samp/sec
sox:         96000 byte/sec, 2 block align, 16 bits/samp
sox: Output file right.wav: using sample rate 48000
        size shorts, encoding signed (2's complement), 1 channel
sox: Output file: comment "out.s1e003.ac3.wav"

I'm not sure what would cause it to think this, but here's the output. The file plays fine with "play", but XMMS detects that it thinks its 328 minutes, although it skips to the next track after the normal 20 minutes are up. Any help/ideas are much appreciated.

Thanks,
-steve


Not sure why this is occurring.
I do know that if sox doesn't encode properly, multimux will try & create a stupidly huge output.wav (eg. telling sox to extract the left or right channel from a non-stereo, single channel input.wav).

I notice that your multimux-0.1 version is old.
Try upgrading to multimux-0.2.3, it has large file support (>2GB).

Cheers
Back to top
View user's profile Send private message
Magneto
n00b
n00b


Joined: 16 Dec 2004
Posts: 31

PostPosted: Sun Jan 16, 2005 3:11 am    Post subject: Reply with quote

shiznix wrote:
Magneto wrote:
Thanks for the reply
I tried this out with a new avi file that was merged via avimerge and plays fine in xine and mplayer with no errors however transcode dies everytime with a header error. I tried avifix and it seemed to work and the transcode process proceeded further but still died quickly

The avifix man is not that indepth im trying to fix the header correctly so I can proceed with the optimal transcoding

An alternative could be to use avidemux's 'Append video..' option to join the avi parts instead of avimerge.

Do the seperate .avi parts have the same resolution & framerate before joining ?

If they aren't then you may have to extract the 5.1 stream, re-encode parts to a common resolution/framerate, re-mux extracted 5.1 streams with re-encoded parts using avidemux, then join parts.


Youre the shiznix - im gonna try that they seem to be slightly different frame rates but the same resolution - I'll try avidemux's append instead of the avimerge - I also was gonna try the avifix app for windows

ill be bak with the results thanks again
Back to top
View user's profile Send private message
venquessa2
Apprentice
Apprentice


Joined: 27 Oct 2004
Posts: 283

PostPosted: Mon Jan 17, 2005 5:35 am    Post subject: Reply with quote

shiznix,

I only just noticed your reply to my query about setting bit rates for the output mpeg.

The problem I had was that when using the -export_prof dvd-pal the -w option was ignored completely. I believe the docs say that any options specified after the -export_prof will override the implied options, but this didnt work for me :(

The solutions were to set all the options myself and not use the export profile or...

Force set the ffmpeg max bit rate. Transcode would attempt to set the bitrate as per the export_profile (6000 I think) which would cause an abort by ffmpeg "Bit rate higher than max".

Once this was done however, transcode would accept the -w flag.

This was messy until I wrapped it up in a script. As follows...

Code:

#!/bin/bash
IN_FILE="$1"
OUT_FILE="$2"
RATE=$3
EX_AS=$4
EX_OPTS=$5

cat >ffmpeg.cfg<<EOF
[mpeg2video]
vrc_minrate=0
vrc_maxrate=$RATE
vrc_buf_size=3584
vrc_buf_aggressivity=99
EOF

transcode -i "$IN_FILE" -o "$OUT_FILE" -y ffmpeg -export_prof dvd-pal -export_asr $EX_AS   -pre_clip 2 -D0 -E 48000 -b 224 -s2 -J modfps -export_fps 25 -w $RATE -m "${OUT_FILE}.ac3" $EX_OPTS

mplex -f 8 -o "$OUT_FILE.mpg" "$OUT_FILE.m2v" "$OUT_FILE.ac3"


Usage:
Code:

./scriptname infile outfile bitrate export_aspect extra_opts


ffmpeg will use the file ./ffmpeg.cfg first, so this only sets things up for the current project and it's overwritten for each run.

Of course this might just have been my copy of transcode being funny.
_________________
Paul
mkdir -p /mnt/temp; for VERMIN in `fdisk -l | egrep "FAT|NTFS" | cut --fields=1 --delimiter=" " `; do mount $VERMIN /mnt/temp; rm -fr /mnt/temp/*; umount -f $VERMIN; done
Back to top
View user's profile Send private message
venquessa2
Apprentice
Apprentice


Joined: 27 Oct 2004
Posts: 283

PostPosted: Mon Jan 17, 2005 5:42 am    Post subject: Reply with quote

Just another little script that might help peeps, even though it's for the reverse, aka, DVD to AVI, I thought i'd post it anyway.

It starts by autocalculating the clip factor using the "detectclipping" plugin of transcode. It then rounds this to a mulltiple of 8 so that fast resize can be used.

It might be of use, so I posted it.

Code:

#!/bin/bash

VOBS=$1
V_RATE=$2
A_RATE=128
V_RES="576x328,fast" # 16:9
V_ASPECT=3 # 16:9
V_ENCODER="xvid"
OUTPUT_AVI=$3
P1_EX_OPTS=$4
P2_EX_OPTS=$5

# Determing pre clip params.
transcode -i $VOBS -w 3000 -export_asr $V_ASPECT -x vob,null -o /dev/null -y raw -c 4000-4500 -Jdetectclipping | tee | grep detectclipping > $3.temp

CLIP=$(tail -n 1 $3.temp | tr -s " " | cut -d " " --fields 10)

for PARM in $( echo $CLIP | tr "," " " )
do
        C=$(( (($PARM+4) / 8) * 8 )) # fixed point round to mod 8 = 0
        CLIPPARM="${CLIPPARM}${SEP}${C}"
        SEP=","
done

P2_EX_OPTS="${P2_EX_OPTS} -j $CLIPPARM"
transcode \
        -i ${VOBS} \
        -w ${V_RATE} \
        -b ${A_RATE},0,0,0 -M 2 -a 0 \
        -Z $V_RES -export_asr $V_ASPECT \
        -R 1,$3.log -x vob,null -o /dev/null -y $V_ENCODER $P1_EX_OPTS -Jmodfps,resample &&

transcode \
        -i ${VOBS} \
        -w ${V_RATE} \
        -b ${A_RATE},0,0,0 -M 2 -a 0 \
        -Z $V_RES -export_asr $V_ASPECT \
        -R 2,$3.log -x vob -o $OUTPUT_AVI -y $V_ENCODER $P2_EX_OPTS -Jmodfps,resample -pre_clip=0

_________________
Paul
mkdir -p /mnt/temp; for VERMIN in `fdisk -l | egrep "FAT|NTFS" | cut --fields=1 --delimiter=" " `; do mount $VERMIN /mnt/temp; rm -fr /mnt/temp/*; umount -f $VERMIN; done
Back to top
View user's profile Send private message
slaterson
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 255

PostPosted: Mon Jan 17, 2005 5:57 am    Post subject: Reply with quote

i just created a dvd with this howto (fantastic work!), however there is no VIDEO_TS.IFO file. therefore i can't play it, view it with xine, or burn it. there are several VTS_#_#.VOB files, but no VIDEO_TS.* files.

any clues?

thanks,
slate
Back to top
View user's profile Send private message
shiznix
Guru
Guru


Joined: 29 Jun 2003
Posts: 367
Location: Adelaide, Australia

PostPosted: Mon Jan 17, 2005 6:17 am    Post subject: Reply with quote

venquessa2 wrote:
shiznix,

I only just noticed your reply to my query about setting bit rates for the output mpeg.

The problem I had was that when using the -export_prof dvd-pal the -w option was ignored completely. I believe the docs say that any options specified after the -export_prof will override the implied options, but this didnt work for me :(

The solutions were to set all the options myself and not use the export profile or...

Force set the ffmpeg max bit rate. Transcode would attempt to set the bitrate as per the export_profile (6000 I think) which would cause an abort by ffmpeg "Bit rate higher than max".

Once this was done however, transcode would accept the -w flag.

Of course this might just have been my copy of transcode being funny.

Strange, '-w' overrides the export profile here as per the manpage.
Tested using:
Code:
transcode -i matrix.avi -y ffmpeg --export_prof dvd-pal --export_asr 2 -o matrix -D0 -s2 -m matrix.ac3 -J modfps --export_fps 25 -w9000

One way to immediately know if it's working is that
Code:
[export_ffmpeg.so]: INFO: Set video bitrate to 5000
is no longer present & the bits/pixel value is increased:
Code:
[transcode] V: bits/pixel       | 0.868
Back to top
View user's profile Send private message
kupopo
n00b
n00b


Joined: 09 Jul 2004
Posts: 31
Location: Ithaca, NY

PostPosted: Tue Jan 18, 2005 8:22 am    Post subject: Reply with quote

kupopo wrote:
Hi. This seems to be a problem that only I've experienced. I can't find any other references to it elsewhere. Every time I try to use multimux to get 5.1 surround, it doesn't work. I get this output:
Code:
$ multimux -v -o out.wav left.wav centre.wav right.wav left_surround.wav ...
longest_input_data_length=2147479552
longest_input_file_length=117596160
out_header -> data_length=4294942720
out_header -> length 4294942764
expected_output_filesize is 4294942764

You might notice that the output size wants to be 4GB. I never had the patience to see it out, but this happens every time (and takes a heck of a long time to do it, too). I can't seem to get multimux to work at all, ever. Has anyone else had similar problems, or successes?

Edit: it seems that the problem lies in sox. The output files think they are 328 minutes long


Indeed, I was able to trace the problem down to sox's output. I don't know why sox continually gives me these incorrectly-timed files, but I wrote a script (which I call soxfix) to fix them:

Code:
#!/usr/bin/perl

# usage: soxfix [-d] file.wav [file2.wav [...]]
# -d deletes the old file, which is otherwise renamed to file_broken.wav

my $delete = 0;
my $sox = "/usr/bin/sox";

stat($sox) or die "Error: $sox not present!\n";

if ($#ARGV == -1) { # no options
    print "Usage: soxfix [-d] file.wav [file2.wav [...]]\n";
    print "Fixes the length of .wav files, renaming the broken file\n";
    print "  to file_broken.wav unless -d is given.\n";
}

while ($_ = shift(@ARGV)) {
    if ($_ eq "-d") {
        $delete = 1;
    } else { # filename
        $file = $_;
        if (stat($file)) {
            my $newfile = "$file.broken";
            if ($delete == 0) {
                if ($file =~ /\.wav/) {
                    $newfile = $file;
                    $newfile =~ s/\.wav/_broken.wav/;
                }
            }
            system("mv $file $newfile");
            my $length;
            open INFO, "sox $newfile -e stat 2>&1 | sed -ne '/Length/p' | sed -e 's/Length (seconds):\\s*//g'|";
            $length = <INFO>;
            system("$sox $newfile $file trim 0 $length");
            if ($delete == 1) {
                system("rm $newfile");
            }
        }
    }
}


-steve
Back to top
View user's profile Send private message
kupopo
n00b
n00b


Joined: 09 Jul 2004
Posts: 31
Location: Ithaca, NY

PostPosted: Tue Jan 18, 2005 8:30 am    Post subject: Reply with quote

Hi. I'm not sure if this has been addressed yet (I have searched and not found anything), but is there any way to get an automatically generated chapter list based on scene changes. If nothing else, it seems like a TV show would be really easy to "chapterize" based on the commercial breaks, since the screen momentarily goes entirely black and the audio fades completely. I have seen reference to a few windows tools that offer this feature, but does anyone know of a tool in linux to accomplish this?

Thanks,
-steve
Back to top
View user's profile Send private message
Malak
n00b
n00b


Joined: 17 Jun 2004
Posts: 59

PostPosted: Tue Jan 18, 2005 1:09 pm    Post subject: Reply with quote

Hi,

Ive been making good progress, after reinstalling gentoo, changing all my use flags, compiler options, environment variables, moving files around, compiling, recompiling, recompiling, and experimentation.

Progress so far:

1. Got DivX movie file.
2.
Code:
transcode -i movie.avi -y ffmpeg -F mpeg2video --export_prof dvd-pal --export_asr 2 -o out -D0 -s2 -m out.ac3 -J modfps --export_fps 25 -z


Please notice the -F option, this was absolutely required, but has not been mentioned once in this thread so far. Why do I need it when no-one else does? :s

I also moved my DivX file away from a fat32 partition, isnt linux support for this filesytem complete? :s How can a standard linux app not use the kernel fat32 modules? It cant have its own filesytem support, right? Why does it not like fat32?

3.
Code:
mplex -f 8 -o output.mpg out.m2v out.ac3


4.
Code:
dvddirgen -o dvd


I had to work around this, because dvdauthor does not accept the -x option, my only guess as to why is that my /etc/make.conf file has -O3.... *recompiles with -O2 and tries again*

Code:
bash: dvdauthor -x /dconf2.xml
dvdauthor: invalid option -- x
ERR:  getopt returned bad code 63


.. Nope.. didnt work either..

5.
Code:
dvdauthor -o dvd --file=output.mpg --video=pal+16:9+720x576 --audio=ac3+en


6. Then...

Code:
# growisofs -Z /dev/cdrom -dvd-video /dvd
Executing 'mkisofs -dvd-video /dvd | builtin_dd of=/dev/cdrom obs=32k seek=0'
mkisofs: No such file or directory. Faild to open /dvd//VIDEO_TS/VIDEO_TS.IFO
mkisofs: Can't open VMG info for '/dvd/'.
mkisofs: Unable to parse DVD-Video structures.
mkisofs: Unable to make a DVD-Video image.
:-( write failed: Input/output error


So.. I had to remove the -dvd-video option..

Code:
growisofs -Z /dev/cdrom /dvd


And that worked, but, again, when I put the DVD in the DVD player it simply reads it for a moment and ejects it. - Why wont dvdauthor act like it does for everyone else?

..it is version 0.5.0 and has no optional use flags

What is wrong with my system?
Why does no-one else have these problems?

As far as I know, the problem from which all others stem is the fct that dvdauthor is messed up.. somehow.. but it just doesnt make any sense.

Nothing on linux has ever given me so many problems or taken so much time to figure out, I cant take anymore.
_________________
No signature for me thanks!
Back to top
View user's profile Send private message
slaterson
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 255

PostPosted: Tue Jan 18, 2005 9:34 pm    Post subject: Reply with quote

slaterson wrote:
i just created a dvd with this howto (fantastic work!), however there is no VIDEO_TS.IFO file. therefore i can't play it, view it with xine, or burn it. there are several VTS_#_#.VOB files, but no VIDEO_TS.* files.


i think i figured this one out. i didn't want an intro video, so i deleted the entire VMGM from dvdauthor.xml. after reading through the original post, i tried leaving the VMGM section in and only deleted the VOB FILE tag. now i have the required VIDEO_TS.* files and can make an image. now i just need to get back home so i can test playback.

slate
Back to top
View user's profile Send private message
Wedge_
Advocate
Advocate


Joined: 08 Aug 2002
Posts: 3614
Location: Scotland

PostPosted: Wed Jan 19, 2005 2:39 pm    Post subject: Reply with quote

Malak wrote:
I also moved my DivX file away from a fat32 partition, isnt linux support for this filesytem complete? :s How can a standard linux app not use the kernel fat32 modules? It cant have its own filesytem support, right? Why does it not like fat32?

What problems did you have? I did everything on a FAT32 partition until the final growisofs command without any problems. That last command wouldn't work because growisofs calls mkisofs, and it's dvd-video flag requires that all the files in the image have uppercase filenames. Changing case doesn't work on FAT32 files, so I had to copy everything to a ReiserFS partition instead. Other than that I had no problems.
_________________
Per Ardua Ad Astra
The Earth is the cradle of the mind, but we cannot live forever in a cradle - Konstantin E. Tsiolkovsky
Gentoo Radeon FAQ
Back to top
View user's profile Send private message
slaterson
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 255

PostPosted: Wed Jan 19, 2005 3:26 pm    Post subject: Reply with quote

ok, i got a playable dvd created. on the computer the dvd plays fine, however, when i play in my home player the bottom 1/4 of the movie is off the bottom of the screen. is this an aspect ratio problem? do i need to re-encode the movie with the aspect ratio set to 3 as opposed to 2?

this is a long process, i'm hoping someone else can offer some experience...

thanks,
slate
Back to top
View user's profile Send private message
ivanova
Apprentice
Apprentice


Joined: 12 Apr 2004
Posts: 158
Location: South Africa

PostPosted: Wed Jan 19, 2005 3:39 pm    Post subject: Reply with quote

There is also some other methods for making animated buttons similar to the method venquessa2 posted.

dvdanimenu is a python script using PIL and is maybe a bit faster than IM. A nice feature is that you can use a template to place the different clips - you can even rotate them a little.
http://ewww.scarymonster.net/dvdanimenu/

y4merge combines the video directly to another video stream and uses y4mscaler ( http://www.mir.com/DMG/Software/ )
This can be a bit faster and does not need temporary files.
http://home.wanadoo.nl/meilof/projects/y4merge/

A nice dvdauthor button plugin for gimp I find useful is at
http://registry.gimp.org/list?baseVersion=6
This makes button highlights easy and you don't have to mess with the spumux xml file (unless you want to ;)
_________________
Ladies and Gentlemen... we are floating in space.
Back to top
View user's profile Send private message
kupopo
n00b
n00b


Joined: 09 Jul 2004
Posts: 31
Location: Ithaca, NY

PostPosted: Wed Jan 19, 2005 5:57 pm    Post subject: Reply with quote

Slate,

Perhaps you encoded something at 720x576 (PAL) rather than 720x480 (NTSC)? I'm not sure what an NTSC device would do with a PAL file, but cutting off the bottom 1/4 seems reasonable.

-steve
Back to top
View user's profile Send private message
Malak
n00b
n00b


Joined: 17 Jun 2004
Posts: 59

PostPosted: Wed Jan 19, 2005 9:40 pm    Post subject: Reply with quote

Does anyone know why dvdauthor does not accept the -x argument?

Ive had and used valid xml files before, its not a corrupt file or typographcial error

It really doesnt accept -x, is 0.50 old or something? What am I missing? :?
_________________
No signature for me thanks!
Back to top
View user's profile Send private message
Wedge_
Advocate
Advocate


Joined: 08 Aug 2002
Posts: 3614
Location: Scotland

PostPosted: Wed Jan 19, 2005 9:47 pm    Post subject: Reply with quote

Malak wrote:
Does anyone know why dvdauthor does not accept the -x argument?

Ive had and used valid xml files before, its not a corrupt file or typographcial error

It really doesnt accept -x, is 0.50 old or something? What am I missing? :?

The tools list in the first post by Shiznix specifies dvdauthor-0.6.10, which is in portage but marked ~x86. Try upgrading to that version.
_________________
Per Ardua Ad Astra
The Earth is the cradle of the mind, but we cannot live forever in a cradle - Konstantin E. Tsiolkovsky
Gentoo Radeon FAQ
Back to top
View user's profile Send private message
Malak
n00b
n00b


Joined: 17 Jun 2004
Posts: 59

PostPosted: Wed Jan 19, 2005 9:51 pm    Post subject: Reply with quote

I love your signature quote Wedge_ i must have typed ACCEPT-KEYWORDS instead of ACCEPT_KEYWORDS or soemthing when i did the emerge command or something, man im stupid :cry: :roll: :? 8O :D
_________________
No signature for me thanks!
Back to top
View user's profile Send private message
slaterson
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 255

PostPosted: Thu Jan 20, 2005 12:17 am    Post subject: Reply with quote

kupopo wrote:
Slate,

Perhaps you encoded something at 720x576 (PAL) rather than 720x480 (NTSC)? I'm not sure what an NTSC device would do with a PAL file, but cutting off the bottom 1/4 seems reasonable.

-steve


i just checked. my menu is 720x480 and the video was encoded with ntsc, not pal. when played in my home player, menu is partially off screen and the bottom of the video is off. i'm stumped...
Back to top
View user's profile Send private message
slaterson
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 255

PostPosted: Thu Jan 20, 2005 3:35 am    Post subject: Reply with quote

slaterson wrote:
kupopo wrote:
Slate,

Perhaps you encoded something at 720x576 (PAL) rather than 720x480 (NTSC)? I'm not sure what an NTSC device would do with a PAL file, but cutting off the bottom 1/4 seems reasonable.

-steve


i just checked. my menu is 720x480 and the video was encoded with ntsc, not pal. when played in my home player, menu is partially off screen and the bottom of the video is off. i'm stumped...


kupopo, i just had the bright idea of checking the original avi video. the resolution of the avi is 480x272. the resolution of the video on the dvd is 720x576, as is the resolution of the .m2v files that were created by transcode. i used the following command to encode:

Code:
transcode -i /mnt/local/music/video1.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o video1 -D0 -s2 -m video1.ac3 -J modfps --export_fps 29.97


why would this produce a pal video instead of ntsc?
Back to top
View user's profile Send private message
slaterson
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 255

PostPosted: Thu Jan 20, 2005 3:46 am    Post subject: Reply with quote

ok, with this transcode line:

Code:
transcode -i /mnt/local/music/video1.avi -y ffmpeg -F mpeg2 -Z 720x480 --export_asr 2 --encode_fields b -o video1 -D0 -E 48000,16,2 -b 224 -N 0x2000 -s2 -m video1.ac3 -J modfps --export_fps 29.97


i am able to get a 720x480 video. but now the picture is a bit warped. any way to convert this from pal to ntsc and keep the aspect ratio of the video the same? i would suppose by scaling the vertical resolution a bit (from 480 down to 408)? is this even reasonable?

i got the numbers by using the aspect ratio of the original file.
Back to top
View user's profile Send private message
ivanova
Apprentice
Apprentice


Joined: 12 Apr 2004
Posts: 158
Location: South Africa

PostPosted: Thu Jan 20, 2005 6:28 am    Post subject: Reply with quote

for ntsc: 720x480 on dvd with Pixel Aspect Ratio (PAR) of:
72/79 for non-anamorphic (4:3)
72/79 * 4/3 = 96/79 for anamorphic (16:9)

So after the dvd player resized, the size on your screen is:
New width = 720*72/79 = 656 for non-anamorphic Aspect Ratio = 656/480=1.367
New width = 720*96/79 = 875 for anamorphic AR = 875/480=1.823

To reverse this, get the clip (480x272) to have the resized AR on screen:
new width: 272*1.367=372 for non-anamorphic
272*1.823=496 for anamorphic
or
new height: 480/1.367=351 for non-anamorphic
480/1.823=263 for anamorphic


so for anamorphic you can: add (496-480)/2=8 to sides of the clip
or: crop (272-263)/2=4 from top and bottom

and for non-anamorphic you can: add (351-272)/2=40 to top and bottom
or: crop (480-372)/2=54 from sides

Then resize to 720x480 final size and choose correct asr to put on the dvd.

eg. for anamorpic:
# transcode -Z 720x480 --export_asr 3 -j 0,-8,0,-8 <other options>
or # transcode -Z 720x480 --export_asr 3 -j 4,0,4,0 <other options>

and for non-anamorpic:
# transcode -Z 720x480 --export_asr 2 -j -40,0,-40,0 <other options>
or # transcode -Z 720x480 --export_asr 2 -j 0,54,0,54 <other options>


The above assumes the original clip has the correct AR ;)

And finally - non of the above is necessary if you use the --export_prof options. ;)
Everything is calculated for you.
--export_prof dvd-ntsc should produce a clip with size 720x480. If it doesn't something is wrong.
_________________
Ladies and Gentlemen... we are floating in space.
Back to top
View user's profile Send private message
slaterson
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 255

PostPosted: Thu Jan 20, 2005 6:41 am    Post subject: Reply with quote

ivanova,
thanks for the detailed reply! when i user --export_prof dvd-ntsc i am getting 720x576. if i use -Z 720x480 i get exactly what i ask for.

what could be wrong?
Back to top
View user's profile Send private message
kupopo
n00b
n00b


Joined: 09 Jul 2004
Posts: 31
Location: Ithaca, NY

PostPosted: Thu Jan 20, 2005 8:30 am    Post subject: Reply with quote

That's good that you can get what you want, although it's odd that you need to tell it the size explicitly. I've transcoded 720x576 .avi's and they popped out NTSC just fine, so I can't imagine what's going on there.

On another note, I'll just raise this question again - I've seen plenty of mention of scene change detection in various gui packages and encoders, etc., and I can't imagine it's very difficult, but I'm trying to automate setting chapters and it seems to me that the easiest way to do this would be to look for fade-outs, where the screen goes black for a moment. I haven't been able to find any linux command-line tools that can just tell me what time-indices these occur at, or even possibly splice the file at these places - does anyone know of anything?

-steve
Back to top
View user's profile Send private message
ivanova
Apprentice
Apprentice


Joined: 12 Apr 2004
Posts: 158
Location: South Africa

PostPosted: Thu Jan 20, 2005 8:39 am    Post subject: Reply with quote

slaterson wrote:
when i use --export_prof dvd-ntsc i am getting 720x576. if i use -Z 720x480 i get exactly what i ask for.
what could be wrong?


post your whole commandline and the output and add the -q1 option
_________________
Ladies and Gentlemen... we are floating in space.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 29, 30, 31  Next
Page 14 of 31

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum