LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-10-2008, 10:36 AM   #1
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Rep: Reputation: 30
Converting video from PAL to NTSC


I'm running Ubuntu 8.04 on my laptop. I have an .avi file that is in PAL format. I want to convert it to NTSC. What is the best way to do this that won't degrade the video quality or size?
 
Old 09-10-2008, 12:09 PM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Well, as you can see here:
http://en.wikipedia.org/wiki/Image:C...olutions_2.svg

There's only 3 ways that I can think of:
1) Compress it vertically, this will lead to distortions on that axis.
2) Crop it, this will lead to a missing chuck at the top and/or bottom.
3) Scale it down and add borders / pad it on the left and right.

I would personally go with #3.
 
Old 09-10-2008, 01:43 PM   #3
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Original Poster
Rep: Reputation: 30
Basically what I want to do is convert the .avi file to NTSC so it will play on my stand-alone DVD player. My DVD player can play DiVX files in NTSC, but not PAL.

I thought about using ffmpeg with the following command:

Code:
ffmpeg -i input.avi -target ntsc-dvd -o output.avi
Would that work?
 
Old 09-10-2008, 04:04 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Yes, that will definitely work, but take a look at the output before you burn it. I'm betting it will use strategy #1. If you think it looks fine, burn it. Also, I don't believe that you need a '-o' for the output file so just:

Code:
ffmpeg -i input.avi -target ntsc-dvd output.avi

Last edited by H_TeXMeX_H; 09-10-2008 at 04:06 PM.
 
Old 09-11-2008, 12:52 PM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Also, you may want to check the specs of your DVD player, it will tell you stuff like what's the maximum video bitrate, audio bitrate, FPS, resolutions, etc. for a divx file. But, I'm betting if you have an divx avi to start with on a PAL DVD and it works, then when you convert it, it will work too. To see more info on the movie you can run:

Code:
ffmpeg -i input.avi
If you want to preserve as much quality as possible you should know about '-pass' option, set it to 1, then 2 and it will improve quality in the final video. If you want to pad the video with borders use '-padleft', '-padright' option. Take a look at the ffmpeg documentation it will tell you more. If you want a GUI try avidemux. Dunno if this will help, but if you find the ffmpeg documentation a bit think, here are some notes I made on how to use it:

Code:
FFMPEG

Global: <option, list>, (units), [default], =description, #see description

Command:
ffmpeg <infile options> -i infile <outfile options> outfile

NOTE: Try to use as few options as possible, only those that are needed, usually
just bitrate, size, codecs.

General:
	-formats
	-y 			=overwrite output files
	-t <hh:mm:ss.xxx>	=duration of transcoded video sequence
	-fs #			=file size
	-ss <hh:mm:ss.xxx>	=seek
	-target <vcd, svcd, dvd, dv, pal-vcd, ntsc-svcd>
	-dframes # 		=number of frames to record
	-scodec <codec> 	=subtitle force

Video:
	1)	-b <bitrate> (bps) [200k]
	2)	-sameq 		=variable bitrate
		-bt # (bps)	=bitrate tolerance
		-maxrate <bitrate> (bps)
		-minrate <bitrate> (bps)
	-vcodec <codec>
	-r <fps> [25]
	-s <wxh> [same as source]
	-aspect <4:3, 16:9>
	-pass <1, 2> =two pass encoding, for more accurate bitrates, high quality
	-passlogfile <file>
	-crop<top, bottom, left, right> <size> (pixel)
	-pad<top, bottom, left, right> <size> (pixel)
	-padcolor (hex) [000000]
	-vframes # =number of video frames to record
	-vn =video null, disable video
	
Audio:
	-ab <bitrate> (bps) [64k]
	-ar <freq> (Hz) [44100]
	-acodec <codec>
	-aframes # =number of audio frames to record
	-an =audio null, disable audio
 
Old 09-11-2008, 05:13 PM   #6
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Original Poster
Rep: Reputation: 30
I tried to convert an avi file to NTSC, but when I burned it to DVD and tried to play it on my stand-alone DVD player it wouldn't play. I'm not sure what I'm doing wrong.

According to my DVD player's manual I must use either the .avi or .divx file extension, which I did.

I used the following command to run the conversion:

Quote:
ffmpeg -i TestVideo.avi -target ntsc-dvd -sameq TestVideoNTSC.avi
FFmpeg begins the conversion and produces the following info about the input avi file:

Quote:
Input #0, avi, from 'TestVideo.avi':
Duration: 01:50:29.8, start: 0.000000, bitrate: 885 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 576x320, 25.00 fps(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
Output #0, dvd, to 'TestVideoNTSC.avi':
Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 0 kb/s, 29.97 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, stereo, 448 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
Is there something I should be doing to get a file that will play on my stand-alone player? Adjusting the bitrate?
 
Old 09-12-2008, 03:20 AM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Ok, try this command:
Code:
ffmpeg -i TestVideo.avi -b 885k -vcodec copy -r 29.97 -pass 1 -passlogfile out.log -ab 128k -ar 48000 -acodec copy TestVideoNTSC.avi
Then run it with '-pass 2' instead of '-pass 1'

Try to find the formats that your xvid player will support. It usually supports xvid, divx, and mpeg4.

Last edited by H_TeXMeX_H; 09-12-2008 at 03:24 AM.
 
  


Reply

Tags
convert, ntsc, video



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Will NTSC/PAL go away because of HD content? Jeebizz General 2 02-19-2008 12:45 PM
how to tell if DVD is NTSC or PAL? hedpe Linux - Software 5 01-09-2006 02:48 AM
xawtv now only has pal and ntsc but kdetv has pal-i etc. qwerty Linux - Software 0 10-24-2005 12:39 AM
Convert TV-out from NTSC to PAL johntramp Linux - Hardware 2 04-13-2004 06:25 PM
PAL vs NTSC jalal General 3 09-29-2003 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration