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 ... 19, 20, 21 ... 29, 30, 31  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
jflintz
n00b
n00b


Joined: 10 May 2005
Posts: 37

PostPosted: Fri May 13, 2005 7:45 am    Post subject: Reply with quote

It appears to be working good through the system even though it is only 2 channel audio so I am not going to worry about it. Sound is coming out of all speakers (front, back, center, sub). I just thought that it was wierd that I was getting that error when trying to use ffmpeg to convert the ac3 to wav.

What codec parameters is it exactly complaining about? Even though the sound is working through all the speakers this error is bugging me. I have tried it on 3 different systems and get the same error.
Back to top
View user's profile Send private message
circuit_breaker
n00b
n00b


Joined: 15 May 2005
Posts: 1
Location: Florida, USA

PostPosted: Sun May 15, 2005 7:14 pm    Post subject: Anyone Reply with quote

Anyone got a copy of this script, any2vob ? the filename is any2vob-0.18.sh

(the author's site in this HOWTO has had a squid error displaying for a few days.)

google gives me -nothing-, don't think i didn't try!

Please, I need the script badly- gotta make some movies for a party tonight.

thanks!!:wink:
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Thu May 19, 2005 10:51 am    Post subject: Re: Anyone Reply with quote

circuit_breaker wrote:
Anyone got a copy of this script, any2vob ? the filename is any2vob-0.18.sh

(the author's site in this HOWTO has had a squid error displaying for a few days.)

google gives me -nothing-, don't think i didn't try!

Please, I need the script badly- gotta make some movies for a party tonight.

thanks!!:wink:


Apologies, site is back up.:oops:
Back to top
View user's profile Send private message
gmichels
Guru
Guru


Joined: 20 Jun 2003
Posts: 480
Location: Brazil

PostPosted: Thu May 19, 2005 5:12 pm    Post subject: Reply with quote

Hi All

This is an excellent howto! However I have a few doubts and it's hard to find if they have been already asked on a 20-page thread 8O

I have some experience on this process using Windows tools (mainly CCESP, Avisynth and DVDLab Pro), but I'd really like to do everything in Linux. In fact, that's the only thing I still do in Windows.

So here's the video I am trying to convert to DVD:
Code:
$ tcprobe -i movie.avi
[tcprobe] RIFF data, AVI video
[avilib] V: 23.976 fps, codec=XVID, frames=308989, width=608, height=256
[avilib] A: 48000 Hz, format=0x2000, bits=0, channels=5, bitrate=448 kbps,
[avilib]    201345 chunks, 721689538 bytes, CBR
[tcprobe] summary for movie.avi, (*) = not default, 0 = not detected
import frame size: -g 608x256 [720x576] (*)
       frame rate: -f 23.976 [25.000] frc=1 (*)
      audio track: -a 0 [0] -e 48000,0,5 [48000,16,2] -n 0x2000 [0x2000] (*)
                   bitrate=448 kbps
           length: 308989 frames, frame_time=41 msec, duration=3:34:47.429


I would like to encode it to NTSC Half D1 DVD size, due to its large length, while using a better bitrate so the quality does not suffer (that) much. So, the final resolution would be 352x480.

I also would like to keep the original AC3 audio intact (I mean don't process it, use the original). Actually that was my main question, but I decided to show you the whole process just to be sure I am doing the right thing.

Here's what I have done so far:

- extracted the audio using tcextract:
Code:
$ tcextract -d2 -i movie.avi -a0 -x ac3 | tcextract -d2 -x ac3 -t raw > audio.ac3


- discovered what clipping should be done as I won't use the "--export_prof" option:
Code:
$ transcode -i movie.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -c 0-00:00:00 2>&1 |grep "pre clip frame"
[transcode] V: pre clip frame   | 608x360 (-52,0,-52,0)


- created the ffmpeg.cfg (I am using 5000 as maxrate since I am encoding to Half D1 size):
Code:
$ cat ffmpeg.cfg
[mpeg2video]
vrc_minrate=1000
vrc_maxrate = 5000
vrc_buf_size = 1792


- created the m2v file using the following command line:
Code:
$ transcode -i movie.avi -y ffmpeg -F mpeg2 -Z 352x480 --export_asr 3 --encode_fields b -j -52,0,-52,0 --pulldown -o movie -P 2 -w 2200


The video is encoding, at roughly 31 fps, for an hour already, so I am at this step.

So here are the questions:

:arrow: As you can see, I am using the "-P 2" option to bypass audio processing. Is that the correct way of doing that?

:arrow: I am using "--pulldown" to add the flag and get 29.97 fps, so I don't have to deal with frame rates. Is that the correct way of doing that?

As for the rest of the process, everything is pretty much straightforward, so I guess there won't be any problems.

Thanks for your help and this excellent howto!
Back to top
View user's profile Send private message
danorris
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2004
Posts: 108

PostPosted: Thu May 19, 2005 6:13 pm    Post subject: Reply with quote

gmichels wrote:
:arrow: As you can see, I am using the "-P 2" option to bypass audio processing. Is that the correct way of doing that?


No; instead, you probably want to say "-y ffmpeg,null" to select a null audio codec. This is from the transcode man page:

Code:
-P flag
       pass-through flag (0=off|1=V|2=A|3=A+V) [0].
       Pass-through for flag != 1 is broken and not a trivial thing  to
       fix.


gmichels wrote:
:arrow: I am using "--pulldown" to add the flag and get 29.97 fps, so I don't have to deal with frame rates. Is that the correct way of doing that?


I don't think so, but I'm not entirely positive. I would suggest using the modfps plugin on the transcode commandline:

Code:
-J modfps=clonetype=3 --export_fps=29.97,4


The clonetype tells it how to replicate frames to get up to 29.97 fps. 3 means to take an average of the two adjacent frames, which seems (for me) to give the best results, although for normal CRT TVs you might want to try clonetype=1. The full list of modfps options is available on the Transcode Wiki.

gmichels wrote:
As for the rest of the process, everything is pretty much straightforward, so I guess there won't be any problems.


Good luck!
Back to top
View user's profile Send private message
gmichels
Guru
Guru


Joined: 20 Jun 2003
Posts: 480
Location: Brazil

PostPosted: Thu May 19, 2005 6:34 pm    Post subject: Reply with quote

danorris wrote:
No; instead, you probably want to say "-y ffmpeg,null" to select a null audio codec. This is from the transcode man page:

Code:
-P flag
       pass-through flag (0=off|1=V|2=A|3=A+V) [0].
       Pass-through for flag != 1 is broken and not a trivial thing  to
       fix.

Thanks! Strangely my ffmpeg installation doesn't have any man pages, so I got that from google. I already changed the ffpmeg command line.

danorris wrote:
:I don't think so, but I'm not entirely positive. I would suggest using the modfps plugin on the transcode commandline:

Code:
-J modfps=clonetype=3 --export_fps=29.97,4


The clonetype tells it how to replicate frames to get up to 29.97 fps. 3 means to take an average of the two adjacent frames, which seems (for me) to give the best results, although for normal CRT TVs you might want to try clonetype=1. The full list of modfps options is available on the Transcode Wiki.


Ok, as you are not certain, I will first try using the --pulldown option. If that doesn't work, I'll try your method, but then I would need to process the ac3 audio also, right?

Thanks a lot!
Back to top
View user's profile Send private message
gmichels
Guru
Guru


Joined: 20 Jun 2003
Posts: 480
Location: Brazil

PostPosted: Fri May 20, 2005 12:37 am    Post subject: Reply with quote

Ok, the --pulldown option really didn't work, dvdauthor complainted about the frame rate.

So, I used the same application I used in Windows, called PULLDOWN.EXE. I ran it thru wine (it's a CLI application) and then the movie had its frame rate changed to 29.97 fps, allowing dvdauthor to use the muxed m2v file.

Regarding quality, I would say it's pretty good for my needs (even considering the length of the movie), however using CCE SP gives me somewhat better quality. Perhaps it's because I usually do a 2-pass encoding in CCE SP (apart from the first analysis pass, so it's more like 3-pass) and in transcode I did only one pass.

I'll try 2-pass encoding with transcode to see if quality gets better. First I have to figure out how to do that! :D
Back to top
View user's profile Send private message
redguy666
n00b
n00b


Joined: 24 May 2005
Posts: 1

PostPosted: Tue May 24, 2005 5:09 pm    Post subject: Reply with quote

Maybe this was mentioned before, but...

how about "jump titleset x menu y;" and "call titleset x menu y;" commands? according to the dvdauthor documentation these commands are correct, but in reality dvdauthor throws error on them...

this functionality would be very useful for me...

is there any fixup, tip or plans to implement such commands?
Back to top
View user's profile Send private message
nife
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2003
Posts: 87

PostPosted: Wed May 25, 2005 11:40 am    Post subject: Reply with quote

I am now having trouble creating the menus in gimp. I have a png that is transparent except for 9 lime green boxes. They are each about 2 pixels. However when I try to use spumux it never works. It finds the buttons then gives me an error about not being able to find the masks.... I'm not sure what has happened since my old png's still work just fine with spumux.

Here is the image:

[img=http://img164.echo.cx/img164/6061/sel8ep.th.png]

Here is the output

Code:

spumux spumux.xml < menu.mpg > menu_final.mpg
DVDAuthor::spumux, version 0.6.11.
Build options: gnugetopt magick iconv freetype
Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=C
INFO: Converting filenames to ANSI_X3.4-1968
INFO: Picture sel.png had 15 colors
INFO: Picture sel.png had 15 colors
INFO: Constructing blank img
INFO: Autodetect 0 = 495x52-576x109
INFO: Autodetect 1 = 273x124-436x160
INFO: Autodetect 2 = 248x164-411x200
INFO: Autodetect 3 = 221x204-384x240
INFO: Autodetect 4 = 212x244-375x280
INFO: Autodetect 5 = 193x284-356x320
INFO: Autodetect 6 = 210x324-373x360
INFO: Autodetect 7 = 237x364-400x400
INFO: Autodetect 8 = 272x405-435x441
ERR: Cannot pick button masks
ERR: Blank image, skipping line -1
WARN:  Read 0, expected 4
INFO: 0 subtitles added, 1 subtitles skipped, stream: 32, offset: 0.18

Statistics:
- Processed 0 subtitles.
- The longest display line had -1 characters.
- The maximum number of displayed lines was 0.
- The normal display height of the font arial.ttf was 0.
- The bottom display height of the font arial.ttf was 0.
- The biggest subtitle box had 0 bytes.



so it looks like it is getting the buttons but failing.... I don't know....

and running

Code:

convert -colors 2 sel.png sel-out.png
convert: Invalid bit depth for RGBA image `sel-out.png'.
so I can't change the number of colors.... What have I done wrong ? The only thing that I can think of is that one of my export settings in gimp is wrong, but I'm not sure what it could be. I have tried all the combonations... I think they all fail to change anything... all I know is that I am outta ideas... any help would be grealy appreciated.
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1317
Location: UK

PostPosted: Fri May 27, 2005 2:36 pm    Post subject: Reply with quote

hey, that any2vob script is "da bomb" as some people would say

using it on an avi but i think theres a small corruption in the avi, is there any way to make it ignore the fact and keep going because it wont encode past 23 mins

Code:
[mpeg4 @ 0xb53d59d0]header damaged15.70 fps, EMT: 0:23:39, ( 1| 0| 8)
[transcode] warning : [import_ffmpeg.so] frame decoding failed| 0| 4)
sh: line 1: 13476 Broken pipe             tcextract -a 0 -i "Easy_Rider.avi" -x mp3 -d 0
     13477                       | tcdecode -x mp3 -d 0 -z 44100
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Fri May 27, 2005 11:46 pm    Post subject: Reply with quote

nife wrote:
I am now having trouble creating the menus in gimp. I have a png that is transparent except for 9 lime green boxes. They are each about 2 pixels. However when I try to use spumux it never works. It finds the buttons then gives me an error about not being able to find the masks.... I'm not sure what has happened since my old png's still work just fine with spumux.

Here is the image:

[img=http://img164.echo.cx/img164/6061/sel8ep.th.png]

Here is the output

Code:

spumux spumux.xml < menu.mpg > menu_final.mpg
DVDAuthor::spumux, version 0.6.11.
Build options: gnugetopt magick iconv freetype
Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=C
INFO: Converting filenames to ANSI_X3.4-1968
INFO: Picture sel.png had 15 colors
INFO: Picture sel.png had 15 colors
INFO: Constructing blank img
INFO: Autodetect 0 = 495x52-576x109
INFO: Autodetect 1 = 273x124-436x160
INFO: Autodetect 2 = 248x164-411x200
INFO: Autodetect 3 = 221x204-384x240
INFO: Autodetect 4 = 212x244-375x280
INFO: Autodetect 5 = 193x284-356x320
INFO: Autodetect 6 = 210x324-373x360
INFO: Autodetect 7 = 237x364-400x400
INFO: Autodetect 8 = 272x405-435x441
ERR: Cannot pick button masks
ERR: Blank image, skipping line -1
WARN:  Read 0, expected 4
INFO: 0 subtitles added, 1 subtitles skipped, stream: 32, offset: 0.18

Statistics:
- Processed 0 subtitles.
- The longest display line had -1 characters.
- The maximum number of displayed lines was 0.
- The normal display height of the font arial.ttf was 0.
- The bottom display height of the font arial.ttf was 0.
- The biggest subtitle box had 0 bytes.



so it looks like it is getting the buttons but failing.... I don't know....

and running

Code:

convert -colors 2 sel.png sel-out.png
convert: Invalid bit depth for RGBA image `sel-out.png'.
so I can't change the number of colors.... What have I done wrong ? The only thing that I can think of is that one of my export settings in gimp is wrong, but I'm not sure what it could be. I have tried all the combonations... I think they all fail to change anything... all I know is that I am outta ideas... any help would be grealy appreciated.


Try using '-depth 8' in your convert command line.

For creating the PNG files from gimp without the need to 'convert', your button mask layers need to have no more than 4 colours in each.

Some things to note:
  • Transparency counts as being one colour, so your really limited to 3.
  • Anti-aliased or hinted text cannot be used as it uses hundreds of colours.
  • When creating a new layer, ensure 'Layer fill type' is set to 'Transparent'
  • Change colours using either 'Color exchange' or 'Color map rotation' (under Right click in image -> Filters -> Colors -> Map) in Gimp-2.0
  • When saving the layer as a PNG, leave everything as default with only the following enabled:
    * Save background color
    * Save resolution
    * Save creation time (optional)
    * Save comment (optional)
    * Save color values from transparent pixels
    * Compression level: 9
You can double check how many colours you have in an image in Gimp by doing:
Right click in image -> Filters -> Colors -> Colorcube Analysis

Good luck!
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Fri May 27, 2005 11:59 pm    Post subject: Reply with quote

viperlin wrote:
hey, that any2vob script is "da bomb" as some people would say

using it on an avi but i think theres a small corruption in the avi, is there any way to make it ignore the fact and keep going because it wont encode past 23 mins

Code:
[mpeg4 @ 0xb53d59d0]header damaged15.70 fps, EMT: 0:23:39, ( 1| 0| 8)
[transcode] warning : [import_ffmpeg.so] frame decoding failed| 0| 4)
sh: line 1: 13476 Broken pipe             tcextract -a 0 -i "Easy_Rider.avi" -x mp3 -d 0
     13477                       | tcdecode -x mp3 -d 0 -z 44100
Hey Viperlin,
Thanks for the compliment, and thanks to those who have submitted patches, bugfixes & suggestions.
A new version (0.20) was released a few days ago with numerous enhancements, check the Changelog.

As far as your problem with 'header damage' goes, there's not a lot that can be done about it in the script aside from maybe using ffmpeg to do the encoding instead of transcode (this is an idea that I am toying with, but if it does happen, transcode will be left in as a legacy option).
Outside the script you could try running 'avifix' on the avi to repair the header.
Avifix is part of transcode, so perhaps a good idea for the transcode devels is to include an option where if transcode comes across an error like this, it invokes avifix automatically.
If avifix doesn't work, try running it through mencoder or ffmpeg first, before trying it on transcode again. :wink:
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Sat May 28, 2005 12:37 am    Post subject: Reply with quote

redguy666 wrote:
Maybe this was mentioned before, but...

how about "jump titleset x menu y;" and "call titleset x menu y;" commands? according to the dvdauthor documentation these commands are correct, but in reality dvdauthor throws error on them...

this functionality would be very useful for me...

is there any fixup, tip or plans to implement such commands?

They do work, but it depends on where they are called from.
Could you post your dvdauthor.xml & the error that dvdauthor is giving you ?
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Sun May 29, 2005 10:33 am    Post subject: Reply with quote

gmichels wrote:
Ok, the --pulldown option really didn't work, dvdauthor complainted about the frame rate.

So, I used the same application I used in Windows, called PULLDOWN.EXE. I ran it thru wine (it's a CLI application) and then the movie had its frame rate changed to 29.97 fps, allowing dvdauthor to use the muxed m2v file.

Regarding quality, I would say it's pretty good for my needs (even considering the length of the movie), however using CCE SP gives me somewhat better quality. Perhaps it's because I usually do a 2-pass encoding in CCE SP (apart from the first analysis pass, so it's more like 3-pass) and in transcode I did only one pass.

I'll try 2-pass encoding with transcode to see if quality gets better. First I have to figure out how to do that! :D

With regard to changing from 23.976->29.97 fps, I agree with danorris that using '-J modfps' is the better more compatible option. And also that if you find the video jerky, experiment with different clonetypes.

However, if you still would like to use 3:2 pulldown telecine to go from 23.976 to 29.97 fps, here's how you do it:
Do not use Transcode's '--pulldown' option, dvdauthor will fail every time.

Have transcode use ffmpeg's 'fps_code = 4' option, (you can also do this with Transcode's mpeg2enc export module '-y mpeg2enc,ac3 -F 8,-p', but ffmpeg is much faster & mpeg2enc cannot handle '-Z 352x240', only '-Z 720x480')
Create an ffmpeg.cfg file like so:
Code:
[mpeg2video]
fps_code = 4

Code:
transcode -i movie.avi -y ffmpeg -F mpeg2 -Z 352x240 --export_asr 3 --encode_fields b -o movie -E 48000,16,2 -b 224 -N 0x2000 -s2 -m movie

The above will result in a telecined movie.m2v video file which will report itself as now being 29.97fps, & a movie.ac3 audio file which will need to be sped up to be in sync with the new framerate.

Note that Transcode's mp2 export module can speed the audio up with '-y ffmpeg,mp2=speed=1.25', however it's not an option. Voices will sound like chipmunks as it changes the pitch also.

To process the audio track correctly, convert the movie.ac3 to WAV format:
Code:
ffmpeg -i movie.ac3 movie.wav

Emerge libsoundtouch ( homepage here -> http://sky.prohosting.com/oparviai/soundtouch/ ), it comes with an app. called soundstretch:
Code:
soundstretch movie.wav movie_new.wav -tempo=25

Convert back to AC3 format:
Code:
ffmpeg -i movie_new.wav -ar 48000 -ab 384 movie_new.ac3

Then mplex
Code:
mplex -f8 -o movie.VOB movie.m2v movie_new.ac3

This is not just limited to 23.976->29.97 framerate conversions however.
Specifying a different 'fps_code' in ffmpeg.cfg will have the same effect, here are the different codes as taken from 'man mpeg2enc':

1 - 24000.0/1001.0 (NTSC 3:2 pulldown converted FILM)
2 - 24.0 (NATIVE FILM)
3 - 25.0 (PAL/SECAM VIDEO / converted FILM)
4 - 30000.0/1001.0 (NTSC VIDEO)
5 - 30.0
6 - 50.0 (PAL FIELD RATE)
7 - 60000.0/1001.0 (NTSC FIELD RATE)
8 - 60.0

Obviously the audio will need to stretched/shrunk depending on what the source file framerate is.
The 'tempo=' value for soundstretch is calculated using the following formula:
(( OUTPUT_FPS / SOURCE_FPS ) - 1 ) * 100

Converting from 23.976->29.97:
(( 29.97 / 23.976 ) - 1 ) * 100 = 25

Converting from 23.976->25:
(( 25 / 23.976 ) - 1 ) * 100 = 4.27

Using this method may only have the advantage of creating smoother frames as not a single frame is dropped or cloned.
The encoding process is neither faster nor slower than when using modfps.
One major drawback is that if your source contains a 5.1 surround audio track you'll lose it during the audio shrinking/stretching process, you can try & re-encode it back to 5.1 but front-to-rear panning will be lost.


Last edited by shiznix on Thu Jun 02, 2005 10:08 pm; edited 3 times in total
Back to top
View user's profile Send private message
danorris
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2004
Posts: 108

PostPosted: Sun May 29, 2005 3:28 pm    Post subject: Reply with quote

Shiznix, I don't understand why you would need to stretch the audio track. Suppose I have a demuxed 60-second video clip, so I have a 60-second audio track and a 60-second video track at 23.976 fps. Then I convert the video up to 29.97 fps. It hasn't gotten any longer... it's still 60 seconds long... it just has more frames and is in a bigger file. If I now mux the new video back in with the original audio stream, won't everything be fine? The player should still keep everything in sync since the timestamps on the video frames have been updated to reflect the new frame rate, right?

The only time I have ever needed to stretch an audio track is when converting PAL DVDs of NTSC source material back to NTSC. When the studios convert NTSC source material to PAL, they just speed up the audio, pitch shifting and all, to go from 23.976 to 29.97. In these cases I change the video's fps flag back to 23.976 (without actually doing any resampling or frame interpolation) and then use sox to slow down the audio (with pitch shifting, downward, to counteract the original pitch shifting done by the PAL studios). Then I remux and everything's fine.

But I don't see why you'd need to do this for a 3:2 pulldown conversion. Am I thinking about this the wrong way?
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Tue May 31, 2005 11:40 pm    Post subject: Reply with quote

danorris wrote:
Shiznix, I don't understand why you would need to stretch the audio track. Suppose I have a demuxed 60-second video clip, so I have a 60-second audio track and a 60-second video track at 23.976 fps. Then I convert the video up to 29.97 fps. It hasn't gotten any longer... it's still 60 seconds long... it just has more frames and is in a bigger file. If I now mux the new video back in with the original audio stream, won't everything be fine? The player should still keep everything in sync since the timestamps on the video frames have been updated to reflect the new frame rate, right?

Using pulldown conversion, the converted file does not have more (or less) frames.
It still contains the same number of frames, it just has a flag set within the output file that tells the player to play those same number of frames at 29.97 instead of 23.976.
This means the video plays quicker & so is no longer 60-seconds (23.976 fps) long, it is approx. 48-seconds (29.97 fps).
Therefore the audio needs to be sped up so that it plays at the same new rate as the video.
I previously made the mistake of saying 'stretching' where I should have said shrinking.
For clarity:
Shrinking audio = speeding up
Stretching audio = slowing down

As far as PTS timestamps go, a new set are created when the audio/video streams are muxed back together.

Quote:
The only time I have ever needed to stretch an audio track is when converting PAL DVDs of NTSC source material back to NTSC. When the studios convert NTSC source material to PAL, they just speed up the audio, pitch shifting and all, to go from 23.976 to 29.97.

Assume you mean 23.976 to 25 fps :wink:
Naughty studios, this is bad & I'd be shocked if this is common practice.
Still, those studios maybe able get away with a less noticeable pitchshift of 23.976 to 25, but certainly not one from 23.976 to 29.97 - the speed up factor is too great.
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Thu Jun 02, 2005 10:26 pm    Post subject: Reply with quote

jflintz wrote:
All works great thanks to the HOWTO. Only issue that I have is with converting the ac3 file to wav to create the 5.1

here is the error that I get when trying as root or regular user

ffmpeg -i thx.ac3 -f wav thx.wav
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard
built on May 5 2005 22:07:08, gcc: 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)
thx.ac3: could not find codec parameters

I have read the whole post and search the forums and have not found an answer.

Thanks

jflintz

Try without '-f wav', ffmpeg should be able to detect what format to encode from/to based on the input & output filename extensions.
Have changed the 5.1 guide to reflect this.
Back to top
View user's profile Send private message
darcon
n00b
n00b


Joined: 26 Jun 2004
Posts: 46

PostPosted: Fri Jun 03, 2005 8:33 pm    Post subject: Reply with quote

Thanks for the great howto shiznix! My dvd plays great on my standalone dvd player, now I've just gotta figure out why my ps2 refuses to play it. Also I had 2 suggestions.

Quote:
transcode -i outtakes.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o outtakes -s2 -m outtakes.ac3 -J modfps=clonetype=1 --export_fps 29.97
is missing the -D0 flag on ntsc

Quote:
Combine the new audio & video files into one DVD mpg
Could you make this blue? First time going through the guide I thought the mplex commands were part of
Quote:
Convert 2-channel stereo audio track to 5.1 surround sound (optional)
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Sat Jun 04, 2005 3:07 am    Post subject: Reply with quote

darcon wrote:
Thanks for the great howto shiznix! My dvd plays great on my standalone dvd player, now I've just gotta figure out why my ps2 refuses to play it. Also I had 2 suggestions.

Quote:
transcode -i outtakes.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o outtakes -s2 -m outtakes.ac3 -J modfps=clonetype=1 --export_fps 29.97
is missing the -D0 flag on ntsc

Quote:
Combine the new audio & video files into one DVD mpg
Could you make this blue? First time going through the guide I thought the mplex commands were part of
Quote:
Convert 2-channel stereo audio track to 5.1 surround sound (optional)

Done, and thanks :D

I've had no problems playing dvdauthored movies on a PS2.
However this was a while ago so I'll re-test, something may have changed in either the guide or in some of the software used that might be causing it to fail.
Back to top
View user's profile Send private message
qwijibow
n00b
n00b


Joined: 27 Dec 2004
Posts: 58

PostPosted: Mon Jun 06, 2005 4:06 pm    Post subject: Reply with quote

Just wondering if anyone has managed to get transcode working on AMD64 ???

Code:

bash-2.05b$ transcode -i /home/chris/media/vids/holiday1.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o HOL1 -D0 -s2 -m HOL1.ac3 -J modfps=clonetype=3 --export_fps 25
transcode v1.0.0beta3 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
(dvd_reader.c) no support for DVD reading configured - exit.
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
[transcode] auto-probing source /home/chris/media/vids/holiday1.avi (ok)
[transcode] V: import format    | DivX;-) RIFF data, AVI (V=ffmpeg|A=mp3)
[transcode] V: import frame     | 640x272  2.35:1
XXX: zoom=yes pre_clip=yes
[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)
[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)
[transcode] V: bits/pixel       | 0.181
[transcode] V: decoding fps,frc | 23.976,1
[transcode] V: Y'CbCr           | YV12/I420
[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  145 kbps
[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame  | 7680 (7680.000000)
[transcode] A: adjustment       | 0@1000
[transcode] A: rescale stream   | 2.000
[transcode] V: IA32/AMD64 accel | sse3 (sse3 sse2 sse 3dnowext 3dnow mmxext mmx asm C)
tc_memcpy: using amd64 for memcpy
[transcode] V: video buffer     | 10 @ 720x576
[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG
[import_ffmpeg.so] v0.1.11 (2004-02-29) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG
[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate
[filter_modfps.so] converting from 23.9760fps to 25.0000fps
[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM
[import_mp3.so] MP3->PCM
[import_mp3.so] tcextract -a 0 -i "/home/chris/media/vids/holiday1.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 48000
tc_memcpy: using amd64 for memcpy
Killed


I cant seem to find any clues as to why tanscode keeps ketting killed.
i have tried an strace, but there is nothing there either.

Code:
rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0
write(4, "\340*V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0NA\0"..., 168) = 168
rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0
rt_sigsuspend([INT TERM] <unfinished ...>
--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---
<... rt_sigsuspend resumed> )           = -1 EINTR (Interrupted system call)
rt_sigreturn(0x20)                      = -1 EINTR (Interrupted system call)
rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0
write(4, "\340*V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240RA"..., 168) = 168
rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0


i have been trying to get transcode on gentoo to work on and off for several months now, (every time i notice this guide getting updated)

i am using all the software versions for each package as given on the first post.

any ideas anyone ?

EDIT:
i tried transcode -i /home/chris/media/vids/holiday1.avi -y ffmpeg -F mpeg2video --export_asr 3 -o matrix -D0 -s2 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 25

(using -F mpeg2video instea of --export_prof dvd-pal) and its encoding

file types are....

Code:

bash-2.05b$ file matrix.ac3
matrix.ac3: MPEG ADTS, layer III, v1, 128 kBits, 48 kHz, JntStereo
bash-2.05b$ file matrix.m2v
matrix.m2v: MPEG sequence, v2, MP@ML progressive Y'CbCr 4:2:0 video, 25 fps


Will my stand alone DVD player be able to play this ???

EDIT2: AHAAAA getting somwhere...
-F mpeg4 works too... its the --export_prof dvd-pal option that is causing the porblem.


any ideas on how to fix this ?

EDIT3:
Nope, didnt work. plays fine on my PC, but fails to play on the standalone DVD player. the dvd accepts the disk, but plays strange hirzontal lies of colour.

still looking for a solution.
Back to top
View user's profile Send private message
shiznix
Guru
Guru


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

PostPosted: Tue Jun 07, 2005 12:18 pm    Post subject: Reply with quote

qwijibow wrote:
Just wondering if anyone has managed to get transcode working on AMD64 ???

Code:

bash-2.05b$ transcode -i /home/chris/media/vids/holiday1.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o HOL1 -D0 -s2 -m HOL1.ac3 -J modfps=clonetype=3 --export_fps 25
transcode v1.0.0beta3 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
(dvd_reader.c) no support for DVD reading configured - exit.
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
[transcode] auto-probing source /home/chris/media/vids/holiday1.avi (ok)
[transcode] V: import format    | DivX;-) RIFF data, AVI (V=ffmpeg|A=mp3)
[transcode] V: import frame     | 640x272  2.35:1
XXX: zoom=yes pre_clip=yes
[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)
[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)
[transcode] V: bits/pixel       | 0.181
[transcode] V: decoding fps,frc | 23.976,1
[transcode] V: Y'CbCr           | YV12/I420
[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  145 kbps
[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame  | 7680 (7680.000000)
[transcode] A: adjustment       | 0@1000
[transcode] A: rescale stream   | 2.000
[transcode] V: IA32/AMD64 accel | sse3 (sse3 sse2 sse 3dnowext 3dnow mmxext mmx asm C)
tc_memcpy: using amd64 for memcpy
[transcode] V: video buffer     | 10 @ 720x576
[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG
[import_ffmpeg.so] v0.1.11 (2004-02-29) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG
[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate
[filter_modfps.so] converting from 23.9760fps to 25.0000fps
[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM
[import_mp3.so] MP3->PCM
[import_mp3.so] tcextract -a 0 -i "/home/chris/media/vids/holiday1.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 48000
tc_memcpy: using amd64 for memcpy
Killed


I cant seem to find any clues as to why transcode keeps ketting killed.

i have been trying to get transcode on gentoo to work on and off for several months now, (every time i notice this guide getting updated)

i am using all the software versions for each package as given on the first post.

any ideas anyone ?


Greets qwijibow,
Try using '-y ffmpeg,null' instead of '-y ffmpeg', sometimes if transcode has problems decoding/encoding the audio, it outright refuses to encode anything.
If this doesn't work, have a look at transcode's output when you include '-q2' in your transcode line (sets info output level to DEBUG) & see if it sheds any light.


Quote:
EDIT:
i tried transcode -i /home/chris/media/vids/holiday1.avi -y ffmpeg -F mpeg2video --export_asr 3 -o matrix -D0 -s2 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 25

(using -F mpeg2video instea of --export_prof dvd-pal) and its encoding

file types are....

Code:

bash-2.05b$ file matrix.ac3
matrix.ac3: MPEG ADTS, layer III, v1, 128 kBits, 48 kHz, JntStereo
bash-2.05b$ file matrix.m2v
matrix.m2v: MPEG sequence, v2, MP@ML progressive Y'CbCr 4:2:0 video, 25 fps
Will my stand alone DVD player be able to play this ???


No, video seems ok but the audio has been encoded to MP3.
DVD audio track must be in the format of either AC3, MP2, DTS or PCM.

If you decide not to use '--export_prof', then you will need a transcode line similar to those discussed in the 'Tweakage' section.
Amongst other things, you will need to specify '-E 48000,16,2 -b 224 -N 0x2000' to encode to AC3 with 48000Hz sample rate, 16-bit, 2-channel, bitrate (224) can be higher (and maybe lower), but usually 224-448 kbit range is recommended.
You'll also need to specify framesize ('-Z 720x576' for PAL), & setup an ffmpeg.cfg file as discussed so that video bitrate will be high enough to be of good quality, but max video bitrate low enough to make room for audio bandwith (10.08Mbit max).

Quote:
EDIT2: AHAAAA getting somwhere...
-F mpeg4 works too... its the --export_prof dvd-pal option that is causing the problem.

any ideas on how to fix this ?


Unfortunately I don't own a 64-bit machine to test :(
But I thought that most or all 64-bit problems had been ironed out in transcode-1.0.0beta3.

Quote:
EDIT3:
Nope, didnt work. plays fine on my PC, but fails to play on the standalone DVD player. the dvd accepts the disk, but plays strange hirzontal lies of colour.


Some DVD players do support playback of MPEG4/Divx/Xvid, but it's not yet common place.

Quote:
still looking for a solution.


If none of the above help in any way, someone else on this forum may answer the call.
Otherwise there is the transcode-user mailing list, usually a helpful bunch of people :)
Back to top
View user's profile Send private message
qwijibow
n00b
n00b


Joined: 27 Dec 2004
Posts: 58

PostPosted: Tue Jun 07, 2005 12:50 pm    Post subject: Reply with quote

Thanks for the quick reply, unfortunatly im still in the same place.
same error, and no error message.

running with -q2 -y ffmpeg,null i get.

Code:
bash-2.05b$ transcode -q2 -i /home/chris/media/vids/JnSBSB.avi -y ffmpeg,null --export_prof dvd-pal --export_asr 3 -o JnSBSB -D0 -s2 -m JnSBSB.ac3 -J modfps=clonetype=3 --export_fps 25
transcode v1.0.0beta3 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
(dvd_reader.c) no support for DVD reading configured - exit.
[tcprobe] RIFF data, AVI video
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
(probe.c) V magic=0x17, A magic=0x17, V codec=0x31b3, A codec=0x55
(probe.c) V magic=RIFF data, AVI, A magic=RIFF data, AVI, V codec=DivX;-), A codec=MPEG layer-3
[transcode] auto-probing source /home/chris/media/vids/JnSBSB.avi (ok)
[transcode] V: import format    | DivX;-) RIFF data, AVI (V=ffmpeg|A=mp3)
[transcode] V: import frame     | 640x272  2.35:1
XXX: zoom=yes pre_clip=yes
[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)
[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)
[transcode] V: bits/pixel       | 0.181
[transcode] V: decoding fps,frc | 23.976,1
[transcode] V: Y'CbCr           | YV12/I420
[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  145 kbps
[transcode] A: export           | disabled
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame  | 7680 (7680.000000)
[transcode] A: adjustment       | 0@1000
[transcode] A: rescale stream   | 2.000
[transcode] V: IA32/AMD64 accel | sse3 (sse3 sse2 sse 3dnowext 3dnow mmxext mmx asm C)
tc_memcpy: using amd64 for memcpy
[transcode] encoder delay = decode=40000 encode=40000 usec
[transcode] V: video buffer     | 10 @ 720x576
[transcode] allocating 10 framebuffer (static)
loading audio import module /usr/lib64/transcode/import_mp3.so
loading video import module /usr/lib64/transcode/import_ffmpeg.so
[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG
Audio capability flag 0x1 | 0x1
[import_ffmpeg.so] v0.1.11 (2004-02-29) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG
Video capability flag 0x2a | 0x2
(filter.c) modfps=clonetype=3
[transcode] loading filter module (0) /usr/lib64/transcode/filter_modfps.so
Filter[0].name (modfps) instance # (0)
Filter[1].name (-) instance # (0)
Filter[2].name (-) instance # (0)
Filter[3].name (-) instance # (0)
Filter[4].name (-) instance # (0)
Filter[5].name (-) instance # (0)
Filter[6].name (-) instance # (0)
Filter[7].name (-) instance # (0)
Filter[8].name (-) instance # (0)
Filter[9].name (-) instance # (0)
Filter[10].name (-) instance # (0)
Filter[11].name (-) instance # (0)
Filter[12].name (-) instance # (0)
Filter[13].name (-) instance # (0)
Filter[14].name (-) instance # (0)
Filter[15].name (-) instance # (0)
(filter.c) successfully loaded 1 filter plugin(s)
[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate
[filter_modfps.so] converting from 23.9760fps to 25.0000fps
loading audio export module /usr/lib64/transcode/export_null.so
loading video export module /usr/lib64/transcode/export_ffmpeg.so
[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null
(encoder.c) audio capability flag 0xffffffff | 0x1
[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM
(encoder.c) video capability flag 0x21f | 0x2
[transcode] starting 1 frame processing thread(s)
[transcode] starting 1 frame processing thread(s)
[import_mp3.so] MP3->PCM
[import_mp3.so] tcextract -a 0 -i "/home/chris/media/vids/JnSBSB.avi" -x mp3 -d 3 | tcdecode -x mp3 -d 3 -z 48000
tc_memcpy: using amd64 for memcpy
[tcextract] (pid=6411) RIFF data, AVI video
[tcextract] (pid=6411) starting, doing mp3
(decoder.c) audio thread id=65541
(decoder.c) video thread id=81926
Killed
bash-2.05b$ (decode_mp3.c) channels=2, samplerate=48000 Hz, bitrate=112 kbps, (1152)

bash-2.05b$   


i know almost nothing about the inner workings of transcode. but i would hope to see some kind of error, or warning message.
a simple "Killed" could be coming from anywhere.

From what i understand, the --export_prof is just shorthand for all those other little settings tha need to be set for pal dvd's.
so i dont expect entering them manually as in the tweakage section to help much. but ill give it a go anyways.

again, thanks for the reply.

EDIT:

would you believe it.... i just coppied and pasted the transcode line from the tweakage section, and the whole things encodes fine.

before i tried this, i used diferent profiles, like --export_prof vcd-pal but this suffered the same problem.
so it seems that the killing is caused by some kind of audo detection done by --export_prof.

im going to try and tweak the tweakage transcode line to get similar quality as --export_prof dvd-pal

the problem severity just got downgraded from critical, to minor inconvinience.

My DVD writer came with a great DVD authoring suit (for windows only) but didnt provide an mpeg2 codec.
Linux has an mpeg2 codec, but the tools to use it go way over my head.

After 20 pages and you are still answering questions on this guide, thanks, i truely apreciate it.
Back to top
View user's profile Send private message
dontremember
Apprentice
Apprentice


Joined: 21 Sep 2002
Posts: 151
Location: Oklahoma

PostPosted: Tue Jun 07, 2005 1:26 pm    Post subject: Reply with quote

qwijibow wrote:
Code:

(decoder.c) audio thread id=65541
(decoder.c) video thread id=81926
Killed
bash-2.05b$ (decode_mp3.c) channels=2, samplerate=48000 Hz, bitrate=112 kbps, (1152)

bash-2.05b$   


i know almost nothing about the inner workings of transcode. but i would hope to see some kind of error, or warning message.
a simple "Killed" could be coming from anywhere.
.


Just a shot in the dark, but I've seen "Killed", with no other message, when running out of swap. You might retry whatever you were doing while keeping an eye on swap/memory usage.
Back to top
View user's profile Send private message
qwijibow
n00b
n00b


Joined: 27 Dec 2004
Posts: 58

PostPosted: Tue Jun 07, 2005 4:05 pm    Post subject: Reply with quote

Thanks for the input, but i dont think memory is the problem.
i have 1Gb of ram, and 1.5Gb of swap. swappynss is set to 60, and the swap free never below 100%. (im on a bit of a monster of a machine)

the killed error message pops up instantly, before any encoding is done.
Back to top
View user's profile Send private message
dontremember
Apprentice
Apprentice


Joined: 21 Sep 2002
Posts: 151
Location: Oklahoma

PostPosted: Tue Jun 07, 2005 4:16 pm    Post subject: Reply with quote

qwijibow wrote:
Thanks for the input, but i dont think memory is the problem.
i have 1Gb of ram, and 1.5Gb of swap. swappynss is set to 60, and the swap free never below 100%. (im on a bit of a monster of a machine)

the killed error message pops up instantly, before any encoding is done.


Hmmm.... Running out of slots in the process table?? I think it's a fixed size. Could it be forking a lot of processes and wiping out the process table??

Dunno, just feeding in ideas in case it helps someone out. The main point being that sometime the kernel just runs out of some critical resource and kills something in the hopes that it can preserve enough order to recover from the shortfall. This gives users and admins a chance to save-and-quit before heat-death sets in.

I've seen this kind of thing happen on*BSD boxes in the past - at kernel build time you would specify how many users the kernel would be expected to support, and the build process would allocate some number N*no-of-users in the process table.
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 ... 19, 20, 21 ... 29, 30, 31  Next
Page 20 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