I had some shows on tivo that I figured I wanted to keep on a CD in case I might ever want to watch them again. (Not that you care, butthis really is for my own personal use. I wouldn't have the bandwidth to "share" this stuff even if I wanted to.) So I downloaded a 1 hour show with TiVo ToGo, and I jumped through a few hoops to "free the mpeg", and I got a nice 2 GB mpeg file that looked and sounded great in mplayer. But it doesn't fit on a CD. So I ran: ffmpeg2theora free.mpeg -x 320 -y 240 -o free.ogg (320x240 seems like about the right tradeoff between image quality and file size.) Then I tried to play free.ogg in both HelixPlayer and mplayer. And I got the same exact results from each: The video looked great. And the audio sounded great. But they didn't look and sound great together. The video was slightly faster than the audio, so that 10 minutes into the show, the people's mouths were moving a full second before the line was played, which makes the show entirely unwatchable. I don't know if the problem is in the encoder, or in the player(s), or in the input file, or in my head. I'd appreciate any suggestions (different software, different options, etc.) Thanks. Sal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora/attachments/20050416/fb8b943e/attachment.htm
On Sat, Apr 16, 2005 at 08:53:27AM -0400, Sal Valente wrote:> ffmpeg2theora free.mpeg -x 320 -y 240 -o free.ogg > > The video looked great. And the audio sounded great. But they didn't > look and sound great together. The video was slightly faster than the > audio, so that 10 minutes into the show, the people's mouths were moving > a full second before the line was played, which makes the show entirely > unwatchable.Hi Sal, I suppose it is the same problem as discussed in the following thread: http://lists.xiph.org/pipermail/theora-dev/2005-March/002692.html> I don't know if the problem is in the encoder, or in the player(s), or > in the input file, or in my head. I'd appreciate any suggestions > (different software, different options, etc.)I wonder if the following chain would help: mpeg -> mencoder -> (something else than mpeg) -> theora-encoder -> theora That is, I might expect mencoder to account for badly synchronized streams, which apparently neither ffmpeg2theora nor mplayer dumping raw video (in theora-encoder) do. Regards, -- Ivan
On Sat, 2005-04-16 at 15:19 +0200, Ivan Popov wrote:> (something else than mpeg)try this : http://www.annodex.net/anx_theora.html but change MOV with mpeg. -- Get a fully managed dedicated server for ?200/month ($257/month) No time limit for taking care of your server. You keep the "root" acces if you want. Billing periods are 3 months. See the conditions at http://aspo.rktmb.org/activities/managed_servers
I wrote:> ffmpeg2theora free.mpeg -x 320 -y 240 -o free.ogg > The video looked great. And the audio sounded great. But they didn't > look and sound great together. The video was slightly faster than the > audio, so that 10 minutes into the show, the people's mouths were > moving a full second before the line was played, which makes the show > entirely unwatchable.The problem is that the mpeg does not use a consistant frame rate. When I play the mpeg in mplayer, it logs: Starting playback... VO: [xv] 480x480 => 640x480 Planar YV12 A: 160.5 V: 160.5 A-V: -0.011 ct: 0.152 4812/4802 5% 0% 0.7% 0 0 demux_mpg: 24fps progressive NTSC content detected, switching framerate. A: 161.1 V: 161.0 A-V: 0.047 ct: 0.190 4827/4816 5% 0% 0.7% 0 0 demux_mpg: 30fps NTSC content detected, switching framerate. Warning! FPS changed 23.976 -> 29.970 (-5.994000) [4] 0% 0.7% 0 0 A: 203.0 V: 202.9 A-V: 0.001 ct: 0.250 6084/6053 5% 0% 0.7% 0 0 demux_mpg: 30fps NTSC content detected, switching framerate. ... etc Of course, the ogg loses sync at 160 seconds, and it gets worse at 203 seconds, and so on. So the trick, I assume, is to encode the mpeg using an encoder that doesn't always write one output frame per one input frame, but instead always generates 24 output frames per one minute of input frames, calculated on-the-fly. The following programs do not do that: ffmpeg ffmpeg2theora mplayer -vo yuv4mpeg It appears that mencoder does what I need, but unfortunately, mencoder doesn't encode to any interesting codecs. I suspect that "mencoder -ovc lavc -lavcopts vcodec=threora" would work, but first someone needs to make libavcodec support encoding to theora. Volunteers? :-) I'd still appreciate any other advice. Thanks. Sal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora/attachments/20050430/9debaba3/attachment.htm
did you try gstreamer? you can try the attached script ./gst2ogg input.mpeg output.ogg j -------------- next part -------------- A non-text attachment was scrubbed... Name: gst2ogg Type: application/x-shellscript Size: 335 bytes Desc: not available Url : http://lists.xiph.org/pipermail/theora/attachments/20050501/5c534cec/gst2ogg.bin
On Sun, May 01, 2005 at 03:46:00AM -0400, Sal Valente wrote:> > Is that a problem? Output to some lossless codec (or very high bitrate > > MPEG-2, etc.), then encode from that file into theora. > > Ah ha. That works sometimes. "mencoder $file -ovc lavc -lavcopts > vcodec=ljpeg -oac copy -o mencoder.avi" generates a giant correct > fixed-fps avi file. Oddly, "ffmpeg2theora mencoder.avi" doesn't quite > work. It generates a .ogg file where the video starts a second afterHi Sal, did you try to run theora-encoder on the mencoder result? It is a lot more robust on files which mencoder produces, compared to ffmpeg2theora. I used it successfuly several times with similarly "problematic" files, though I used the default lavc codec (divx?) as the intermediate one. Regards, -- Ivan
On Sun, May 01, 2005 at 05:53:10PM +0200, Ivan Popov wrote:> did you try to run theora-encoder on the mencoder result?Oops, my apologies. Forget it. Missed the very point, Sal wrote of course about theora-encoder. -- Ivan