Using ffmpeg and DVDstyler...Audio plays but video stuck on menu
Linux - SoftwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using ffmpeg and DVDstyler...Audio plays but video stuck on menu
Hi all, I have wasted probably 10 dvds trying to convert .avi's to DVD format and burn them so they would be playable on a tv DVD player. I got a single video to work by using ffmpeg and dvdauthor. However, I messed it up slightly because I forgot about overscan. Anyways, here's what I did to try and get a DVD with 4 videos on it.
I converted each video to .mpg using ffmpeg, just as before, except this time I used padding on each side. Then I went to DVD styler, created a menu with buttons to each title, and then created an .iso. When it previewed the .iso on my computer, I could click the buttons and it would go to the correct video. I then burned the .iso using "Burn DVD iso" in k3b, and when I put the DVD in my tv, the menu came up and i could scroll through the buttons. However, when I would click a button, the audio would clearly go to that section of the DVD, and would play through the audio of that title, but the video would just remain still as the menu image. Any ideas?
Sounds like your ffmpeg conversion recipe is flawed. Many DVD previewers (I am guessing you are using xine) are very forgiving in the video format. Stand-alone DVD players are much more finicky.
Personally I use mencoder to generate DVD mpegs. The other option is to let DVDStyler do the conversion. Although I have not tried it, version 1.7 will automatically convert the movie files to the right format. If you right click on the title object in the bottom list, and select properties, make sure the "do not convert" box is not checked.
Here is my mencoder recipe. It produces perfect mpeg2 file 99% of the time.
Code:
# uncomment for standard definition
#aspect="4/3"
# uncomment for high definition
#aspect="16/9"
#change video bitrate here
vbrate=5000
infile='source file here'
outfile='destination file here'
mencoder -oac lavc -af lavcresample=48000 \
-ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,expand=:::::${aspect},harddup -srate 48000 -lavcopts \
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=6000:vbitrate=${vbrate}:keyint=18:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:vqmin=1:lmin=1:dc=10:acodec=ac3:abitrate=192:aspect=${aspect} \
-ofps 30000/1001 -o ${outfile} ${infile}
Thanks for the answer, a couple questions for you though. Firstly, does that mencoder recipe put a pad around the video? The problem I've had is that it gets cut off when I use DVDStyler. Also, how do I use that recipe? I assume I don't simply put it in the konsole, but do I use kwrite or something and then just run it? Thanks much.
*edit* Also, in your recipe, what is the file extension of your outfile? .dvd? or .mpg?
Last edited by Lorienthin; 05-28-2009 at 12:00 AM.
The mencoder expand function is quite powerful. I use it just to fit a movie of any aspect ration into either a 4/3 or 16/9 format. Bars are added automatically to fit
Code:
expand[=w:h:x:y:o:a:r]
Expands (not scales) movie resolution to the given value and places
the unscaled original at coordinates x, y. Can be used for placing
subtitles/OSD in the resulting black bands.
Read the man page on mencoder and fiddle with it a bit, but I think the following will add a 50 pixel band around the original movie
Hi again, was wondering if you could take a look at the script I used and let me know if you see any problems. I used this:
Code:
# uncomment for standard definition
aspect="4/3"
# uncomment for high definition
#aspect="16/9"
#change video bitrate here
vbrate=5000
infile='OPep5.avi'
outfile='OP5Test.mpg'
mencoder -oac lavc -af lavcresample=48000 \
-ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,expand=-26:-26:26:26::${aspect},harddup -srate 48000 -lavcopts \
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=6000:vbitrate=${vbrate}:keyint=18:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:vqmin=1:lmin=1:dc=10:acodec=ac3:abitrate=192:aspect=${aspect} \
-ofps 30000/1001 -o ${outfile} ${infile}
To convert them, then I went into DVDstyler, created the menu, then put the .mpg's in and made an ISO. Again, it previewed fine, but for some reason once I used k3b to "Burn DVD ISO image" I put it in my player and only the menu screen showed, even when I clicked on the movie, it would play the sound from the movie but not show the video...Would you happen to know what went wrong?
Last edited by Lorienthin; 05-31-2009 at 02:39 AM.
My guess is that the video generated is still not 720x480. If you preview the mpeg with mplayer, it should list the size. Here is an excerpt from one of mine:
Code:
Playing test.mpg.
MPEG-PS file format detected.
VIDEO: MPEG2 720x480 (aspect 2) 29.970 fps 6000.0 kbps (750.0 kbyte/s)
Re-reading the man page on the scale and expand functions, I think it is scaling to 720x480, then adding borders, such that the final result is greater than 720x480. Try putting the scale after the expand, that will ensure the result is 720x480. However, you will have to play with the border sizes to suit. Here is a guess on my part.
expand=-52:-52:26:26::,scale=720x480
Also, maybe DVDStyler is still doing yet another conversion? If you right click on the title object(s) and select Properties, make sure the "do not remultiplex/transcode" box is checked.
Read the mencoder man page on the -vf scale and expand functions.
I'll give that a shot and then let you know how it goes. Also, I was thinking that maybe I'll take a video editor and put the border on the avi, and then just let DVDStyler to the encoding. That might just be the easier way to go. Thanks again.
Hey, that was indeed the problem, the resolution was not 720x480. However, when I tried to put the expand function before the scale, no matter which numbers i used, it have a padding on the right side of the screen which would show the image from the very left edge of the screen. in other words, the padding was not on both sides, but seemed to get part of what would be another screen when scaled..not sure what step to take next..
*edit* YAY!!! So I played around a bit and got it working and I thought I'd let everyone know what worked for me. This is really only for people having trouble with overscanning cutting off part of your image. It was a real problem for me because subtitles were involved and those were getting cut off. I ended up having to use the scale function first, because otherwise it would duplicate part of the video when scaling up from an expanded image. I therefore had to scale to a lower value (mine was 668x428) and then expand that using expand=-52:-52:26:26:: As you might see, I had to remove the ${Aspect} from above, because it was adding unnecessary padding to the right side of my image, and messing up the scale function as well, because as the resolution of the expand pushed up, it triggered the aspect default caused by having that there. The mencoder man describes how that aspect default works pretty clearly.
So in the end my expand would bring it up to 720x480. I was a bit worried at first that because my aspect would be slightly different than 4:3 (1.5 rather than 1.333) that I would have trouble watching it, but it turned out that my 26 pixels of padding was perfect and the video does not cut out anything, even when compared to playing the original video on the computer.
I hope that this can help anyone else having problems with .mpg encoding for DVD burning and dealing with the overscanning problems I did.
Last edited by Lorienthin; 06-07-2009 at 06:35 PM.
Reason: Figured it out!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.