LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-22-2010, 09:46 PM   #1
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Rep: Reputation: 47
converting DVD video with mencoder


I recorded a TV show on my pc using mythbuntu software (ubuntu version of mythtv). It cut out all the commercials and then transcoded it to a nice 40 min nuv file that I put onto a usb thumb drive. Now it's portable and vlc can play the file...on a pc. I want to burn it onto a DVD so I can put it in any NTSC DVD player. Also, the file was recorded at 480x480 and I want to change the size to widescreen (16:9). Additionally, the top of the screen recorded a thin horizontal line of junk that needs to be deleted.

Now, I've googled around and found this line in ffmpeg that should work:

ffmpeg -i V-RedSky.nuv -croptop 4 -y -target ntsc-dvd -sameq -aspect 16:9 RedSky.mpg

The new 16:9 video size is great, the annoying horizontal line got cropped, and I got a nice mpg file...but the audio is now out of sync. I tried ffmpeg with fewer options and the audio still got out of sync.

So, I'm thinking I should try different software. Maybe mencoder. How could I put the above ffmpeg options into mencoder?
 
Old 05-22-2010, 10:45 PM   #2
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
Well, the best (with both ffmpeg and mencoder) is to read the manual ("man mplayer" and "man ffmpeg"). About the audio, adding more options will probably solve your problem. You NUV file probably have a strange framerate at some point. You should try both 29.97 fps and 30.00 fps in ffmpeg and see if both are out of sync. If the audio is always 2 second late and the gap never grow, then shifting the audio will work. The solution really depend on the problem.
 
Old 05-23-2010, 05:47 AM   #3
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
Try the '-async' option with the sample frequency of the audio, usually 48000. So '-async 48000'.
 
Old 05-23-2010, 07:40 AM   #4
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
got it to work with mencoder to create a nice mpg file that I can now burn to a DVD using -async 1. Here's the full command:

ffmpeg -i V-RedSky.nuv -croptop 4 -y -target ntsc-dvd -sameq -aspect 16:9 -async 1 RedSky.mpg
 
Old 05-23-2010, 09:22 AM   #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
Good, but note that 'async 1' only does a simple a/v sync, i.e.

Quote:
`-async samples_per_second'
Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction.
It'll work most of the time, but there may be a/v desync later.
 
  


Reply



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
need help with converting HiDef (sony) .mts video using mencoder - audio losing time MikeP Linux - Desktop 4 06-21-2010 03:12 AM
MPlayer and MEncoder (The DVD/Movie/Video/MP3 Player and Encoder for Linux) ComputerGreek Linux - General 6 02-03-2008 09:39 AM
problem on converting photos of different aspect ratio into a video with mencoder jackandking Linux - Software 1 04-27-2007 12:10 AM
Converting DVD to x264 w/ Mencoder out of sync? carl0ski Linux - Desktop 1 01-12-2007 07:04 AM
mencoder mpegopts "not an option" format=dvd (converting avi to dvdauthor compliant) Emmanuel_uk Linux - Newbie 1 09-16-2005 01:52 PM

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

All times are GMT -5. The time now is 07:00 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