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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-10-2008, 10:36 AM
|
#1
|
|
Member
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178
Rep:
|
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?
|
|
|
|
09-10-2008, 12:09 PM
|
#2
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,615
|
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.
|
|
|
|
09-10-2008, 01:43 PM
|
#3
|
|
Member
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178
Original Poster
Rep:
|
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?
|
|
|
|
09-10-2008, 04:04 PM
|
#4
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,615
|
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.
|
|
|
|
09-11-2008, 12:52 PM
|
#5
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,615
|
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
|
|
|
|
09-11-2008, 05:13 PM
|
#6
|
|
Member
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178
Original Poster
Rep:
|
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?
|
|
|
|
09-12-2008, 03:20 AM
|
#7
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,615
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:18 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|