Author Topic: ffmpeg problem..  (Read 2206 times)

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
ffmpeg problem..
« on: January 26, 2010, 11:15:53 AM »
I started a thread on how to convert a ogv to flv, because I was having problems with ffmpeg doing it.

I got that solved, so I decided to start a new thread.  I can simply use mencoder to do what I need, so this is not really a problem, but it is just bugging me.

Here is the output when I run ffmpeg:
Quote
$ ffmpeg -i out-8.ogv -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 35 -threads 0 outtest-8.flv
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: –prefix=/usr –enable-shared –libdir=/usr/lib –shlibdir=/usr/lib –incdir=/usr/include –enable-postproc –enable-gpl –enable-pthreads –enable-libtheora –enable-libvorbis –enable-x11grab –disable-debug –enable-swscale –enable-libmp3lame –enable-libfaad –enable-libfaac –enable-libx264 –enable-libxvid –enable-nonfree –enable-libamr_nb –enable-libamr_wb
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jun 2 2009 20:09:15, gcc: 4.1.1 20060724 (prerelease) (4.1.1-4pclos2007)
Input #0, ogg, from ‘out-8.ogv’:
Duration: 00:03:08.06, start: 0.000000, bitrate: 1148 kb/s
Stream #0.0: Invalid Codec type -1
Stream #0.1: Video: theora, yuv420p, 1680×1040, PAR 1:1 DAR 21:13, 15 tbr, 15 tbn, 15 tbc
Stream #0.2: Audio: vorbis, 48000 Hz, mono, s16, 239 kb/s
Output #0, flv, to ‘outtest-8.flv’:
Stream #0.0: Video: libx264, yuv420p, 1680×1040 [PAR 1:1 DAR 21:13], q=10-51, 200 kb/s, 90k tbn, 15 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, mono, s16, 96 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.2 -> #0.1
[libx264 @ 0x817c0c0]using SAR=1/1
[libx264 @ 0x817c0c0]using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
Press [q] to stop encoding
Segmentation fault7 q=23.0 size= 1266kB time=23.33 bitrate= 444.3kbits/s

After running that the video is all messed up.  I have tried it using winff, and it does the same thing converting it to an avi.

I think it must be due to that error in there where it says invalid codec....

Thanks

David

Offline Roc4fun

  • Hero Member
  • *****
  • Posts: 619
  • The life so short, the craft so long to learn
Re: ffmpeg problem..
« Reply #1 on: January 27, 2010, 07:52:38 AM »
Hi davidwillis,  I'm not real smart about ffmpeg, but I can tell you that all of the presets that come packaged with winff are broken.  The names of the codecs in the presets don't match the names of the codecs you have.

There is probably a more elegant way to accomplish this but, if you look in for the codecs you will be using, then look at the winff preset and insert the correct name where it is called for.

I suspect the same thing would apply to your ffmpeg command.

Just an idea,

Dave

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: ffmpeg problem..
« Reply #2 on: January 27, 2010, 08:53:50 AM »
Hi davidwillis,  I'm not real smart about ffmpeg, but I can tell you that all of the presets that come packaged with winff are broken. 

Would you care to explain how you came to that conclusion?
What specific presets do not work?

All of them I have used are working here, as are the presets I have added.

If they are not working for you then I suggest it may be the fault of your installation.

regards.

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: ffmpeg problem..
« Reply #3 on: January 27, 2010, 04:46:05 PM »
I am not sure how to tell if they are messed up, or how to fix them if the are....

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: ffmpeg problem..
« Reply #4 on: January 27, 2010, 05:00:52 PM »
For any problems with WinFF I would be looking to ffmpeg and codecs etc etc

If ffmpeg does not work properly then it is impossible for WinFF to do so

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: ffmpeg problem..
« Reply #5 on: January 27, 2010, 09:56:00 PM »
well that makes sense.  So what do I look at to try and fix ffmpeg?

I am thinking it may be the cause of other problems.  Like when I try to rip a DVD with K9copy it crashes, or when I try and rip one with DVD::Rip it freezes up.... basically the only way I seem to get consistant results ripping a dvd to an avi is by using k9copy to make an iso image, then extract the vob files, and convert them with mencoder.

Maybe the other programs use ffmpeg, and it causes problems... or I  have other issues?  I don't know.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: ffmpeg problem..
« Reply #6 on: January 28, 2010, 02:32:22 AM »
Try to deal with ffmpeg first, and then see if other things fall into place. Yes several apps use ffmpeg as their backend.
There are two variables the file you are trying to convert and ffmpeg itself.
I would first try a few different .ogv files -- from different sources; maybe small sample files to confirm the problem is with ffmpeg and not any one file or how it was encoded.

I have only one .ogv here and ffmpeg converted it to .flv without hassle -- using the command you posted above.

After that I would look to uninstall ffmpeg, then reboot and reinstall ffmpeg, in the hope that this would fix it. I would also reinstall related packages also ....... like codecs etc.

regards.

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: ffmpeg problem..
« Reply #7 on: January 28, 2010, 08:34:04 AM »
Thanks..  The only ogv files I have are ones I made using recordmydesktop.  I have several, and ffmpeg messes them all up.  but mencoder works fine with them.  So I am guessing it is my ffmpeg.

I have stuff running I can't shut down until tomorrow.  So I will try and see if I can find some other sources of ogv files in the mean time.  Then friday I will uninstall ffmpeg, codecs, maybe even all my video ripping encoding software, reboot, and then install it all back.

Thanks again...

David

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: ffmpeg problem..
« Reply #8 on: January 28, 2010, 08:47:49 AM »
If you wish to put one of the problem files up somewhere I can d/load it and see if it converts OK here.


regards.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: ffmpeg problem..
« Reply #9 on: January 28, 2010, 01:19:35 PM »
Ok, I just made this one because my other ones were too big. And even this one was too big to attach.

right click on the link and save link as....

here

Thanks


First try I got a refusal from WinFF to convert .... for gotten the error ......  but I then tried manually and got a distorted picture.

I will play a little with this to find the cause if I can ........ 

regards.

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: ffmpeg problem..
« Reply #10 on: January 28, 2010, 01:41:11 PM »
thanks.... it looks like recordmydesktop may be the problem...

But it is strange how mencoder works fine with it.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: ffmpeg problem..
« Reply #11 on: January 28, 2010, 02:10:36 PM »
There must be something about the .ogv  file that is not as expected.
There is mention of header info at times .......  implying some info is not present or not as expected.

I guess Mencoder does not look for that info or is capable of ignoring it ....

I cannot even get the output in .ogv  properly here.
The FPS seem to be ignored .......  I even tried without sound as I though the problem might be in the muxing of the sound & video.

I remember having this problem previously .... cannot remember what happened about it .......

EDIT
          OK, having applied the 'fix' here I can now record but I still get the same problem as with your file when converting.
http://www.pclinuxos.com/forum/index.php/topic,63634.msg525900.html#msg525900

Further investigation is needed .......   ;D ;D ;D
« Last Edit: January 28, 2010, 02:30:26 PM by JohnBoy »

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: ffmpeg problem..
« Reply #12 on: January 28, 2010, 04:44:28 PM »
Yes, I had to do that, as well as change the sound frequency to 48000 in order to get the sound and video in sync.

That seems to be in sync for my playing it in vlc, but this converting has me wondering what is going on...

Thanks for the help

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: ffmpeg problem..
« Reply #13 on: February 02, 2010, 11:20:27 AM »
Just wondering if you figured anything out.  I am assuming we are sure it is recordmydesktop, and not ffmpeg causing the problem...

Thanks

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: ffmpeg problem..
« Reply #14 on: February 02, 2010, 11:42:54 AM »
Just wondering if you figured anything out.  I am assuming we are sure it is recordmydesktop, and not ffmpeg causing the problem...

Thanks


In truth I did nothing further on this.

I will have another look ....  I have a suspicion it may have something to do with the frame rate .....

EDIT
           It seems to me that for whatever reason my recording is not getting every frame ... or even only dropping an odd frame. I seem to be getting only a frame every few seconds! On playbac one frame maybe every 7 secs! With setting of 9fps.
I have tried adjusting frame rate and colour depth to no avail ---- even turned off compositing to see if that would help. There was a time that this app had a problem with some colour depths, but that would appear to be fixed.

The app is in binary form and is inaccessible for all practical purposes.

Not sure where to go from there.

regards.
« Last Edit: February 02, 2010, 01:23:18 PM by JohnBoy »