Open GoogleCodeExporter opened 9 years ago
A mystery has been solved. I had been wondering how the "validation" of presets
in Sinthgunt could ever have worked properly for anyone ... until yesterday
when I discovered that there has been a change to the way ffmpeg reports
capabilities.
I don't know when the change first appeared but I do know that a release
version of ffmpeg (v0.5.0) is provided for Mandriva 2010.0 whereas the version
for Mandriva 2010.1 has a Subversion release number (SVN-r22960). This dates
from 15 June this year. The 2010.0 version was built sometime near the end of
2009.
When I discovered that Sinthgunt on 2010.0 validates many many more presets
than reported above, I looked more closely at the output from ffmpeg -formats
and ffmpeg -codecs on that platform; at any rate, I tried to examine the ffmpeg
-codecs output, but there isn't any. The option does not exist! Then I found
the codecs listed at the end of the -formats output and that led me to another
conclusion; the ffmpeg_getcodecs() code must be able to parse both the table
style used for formats and the slightly different style used for codecs.
To prove the point I altered the function code to use the -codecs option and it
works, sort of. It isn't a complete answer as there are still some presets
missing from the OK list which probably shouldn't be greyed out, but maybe they
were being validated by entries in the -formats list. If that proves to be the
case then I can probably get by with hacking presets.xml to suit the use of the
-codecs output for recent versions of ffmpeg.
Original comment by richardj...@utvinternet.com
on 20 Jul 2010 at 7:00
This is a duplicate of Issue 3.
sinthgunt needs to look at both "ffmpeg -formats" and "ffmpeg -codecs" to get a
full list of capabilities. Look at Issue 3 for the patch
Original comment by timkb...@tampabay.rr.com
on 12 Sep 2010 at 3:32
On Sunday 12 September 2010 16:34:31 sinthgunt@googlecode.com wrote:
> Comment #2 on issue 10 by timkb...@tampabay.rr.com: v2.0.2 Only 21
> presets "enabled" (Mandriva 2010.1)
> http://code.google.com/p/sinthgunt/issues/detail?id=10
>
> This is a duplicate of Issue 3.
> sinthgunt needs to look at both "ffmpeg -formats" and "ffmpeg
-codecs" to
> get a full list of capabilities. Look at Issue 3 for the patch
Thanks for the clarification. I had studied that thread closely as I thought
it might be similar to my problem, but in the end I decided that my issues
were different.
I have applied your patch to v2.0.2 from the Mandriva 2010.1 distribution and
I can confirm that it produces the same results as revision 183 (2010-09-12)
from svn.
This is a very big improvement over my last attempts to use v2.0.2 from
several months ago. Thank you. There are still some inexplicable anomalies
which I will investigate in detail soon. For example - OGG is greyed out!
My best guess at the moment is that this may be due to the incompatible
layouts used by ffmpeg for the output tables for the -codecs and -formats
tables. I suspect that sinthgunt may not be parsing the -codecs table any
differently from the -formats table but my knowledge of Python is still very
limited and it will take me some time to work through it all and find out how
we manage not to detect the OGG encode/decode ability (same problem with Xvid
too).
Let us hope that the ffmpeg people don't decide to change the capabilities
reporting functions again:-)
Richard
Original comment by richardj...@utvinternet.com
on 15 Sep 2010 at 12:25
I spent quite a bit of time this evening with a freshly generated
.sinthgunt.log file to see if I could determine why, for example, the OGG
preset is still disabled.
This is with the latest(?) subversion fetch; revision 183 2010-09-12 18:35:46Z
kare1234.
It brought back memories of what I had discovered when I first reported this
issue and I have again re-discovered the cause of the problem. The difference
now is that I am encouraged by your patch, referred to in the issue 3 thread,
to believe that I have actually understood what the code is doing!
Your patch has done, albeit more elegantly, what I had done in my hack of the
code referred to in my comment 1 above. As it doesn't directly address the
issue I raised here it is still only a partial solution.
To take just one example as an illustration, the OGG case:
The output from ffmpeg -formats shows that the OGG container format is
supported for both multiplexing and demultiplexing (ffmpeg represents this with
the flags "D" and "E" which probably stand for Decode and Encode, but the mux
and demux terms are used presumably because they are more accurate when applied
to AV container/file formats) and this is recorded in ffmpeg_getcodecs
self.codecs[] as ['ogg', True, True].
The output from ffmpeg -codecs shows that the audio codec for the OGG container
is also supported and this is recorded in the ffmpeg_getcodecs self.codecs[]
array as;
['vorbis', False, True].
At first I thought the 'False' entry was due to my ffmpeg being compiled with
the flags '--enable-libvorbis --disable-encoder=vorbis'. Then I noticed that I
have another entry in self.codecs[] like this;
['libvorbis', True, False]
So between these two I clearly have support for both encoding and decoding with
the vorbis codec.
Next I looked again at the presets.xml file and the code in
load_conf_file(self) to see why neither of these entries in self.codecs[] is
being found. The answer seems to be that the preset-enabling code for the menu
entries is trying to match to the codec's actual name, 'vorbis'. This matches
the ['vorbis', False, True] entry and thus the code concludes that encoding is
not possible and the preset is greyed out in the menu.
The problem with the OGG entry, therefore, is that ffmpeg reports vorbis
encoding and decoding ability in a very strange way indeed. Why on earth should
it be split into one report for libvorbis (encoding) and one for vorbis
(decoding)?
My solution is to change my presets.xml file so it is looking for a codec
called 'libvorbis' which will correctly match to the encoder entry in
self.codecs[]. I'll have to leave that for tomorrow as it is now well past my
bedtime.
Original comment by richardj...@utvinternet.com
on 15 Sep 2010 at 1:49
Thank you, Richard. The way ffmpeg names the different codecs sure makes life a
bit harder for us!
Original comment by kare1234
on 29 Sep 2010 at 9:57
Original issue reported on code.google.com by
richardj...@utvinternet.com
on 17 Jul 2010 at 12:50