Issues with commas preventing export in x264

Bug #927126 reported by Juan Francisco Contreras García
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenShot Video Editor
Fix Released
Critical
Unassigned

Bug Description

I have Ubuntu 11.10 and I installed Openshot through the ppa. I have the latest version, that is, 1.4.1.

I'd like to report a couple of bugs that I found, the first of them driving me crazy. I simply couldn't export using codec x264 (I had sound but no video) and I looked at all the possible solutions, updating MLT, checking python libraries, etc. Well, it was all much simpler than that. The file "video.py" (/usr/lib/pymodules/python2.7/openshot/classes/video.py) has this problem, at least for me, since everytime I tried to render files using libx264, I had the following output:

[NULL @ 0x22e0900] [Eval @ 0x7fa2259f34c0] Invalid chars '.6' at the end of expression '0.6'
[NULL @ 0x22e0900] Unable to parse option value "0.6"
[libx264 @ 0x22e0900] broken ffmpeg default settings detected
[libx264 @ 0x22e0900] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x22e0900] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x22e0900] speed presets are listed in x264 --help
[libx264 @ 0x22e0900] profile is optional; x264 defaults to high

All I needed to do was the following:

if self.render_options["vcodec"] == "libx264":
     self.c.set("minrate", "0")
     self.c.set("b_strategy", "1")
     self.c.set("subcmp", "2")
     self.c.set("cmp", "2")
     self.c.set("coder", "1")
     self.c.set("flags", "+loop")
     self.c.set("flags2", "dct8x8")
     self.c.set("qmax", "51")
     self.c.set("subq", "7")
     self.c.set("qmin", "10")
     self.c.set("qcomp", "0.6") ---> changed the value for "0,6", using a comma
     self.c.set("qdiff", "4")
     self.c.set("trellis", "1")

The second one is much less important, but it also has to do with commas. Every time I click of preferences and I close the menu, on my "config.xml" file the value of the image size changes from "7" to "7,00", again giving me the following mistake:

self.valImageLength.set_value(float(self.form.settings.general["imported_image_length"]))
ValueError: invalid literal for float(): 7,00

I haven't been able to fix it yet except by accessing the "config.xml" file and changing it manually to the default value, that is, "7".

I think these issues can be easily fixed, so I hope that our developers include them for the future.

Related branches

summary: - Problems in numerical expressions with commas
+ Issues with commas preventing export in x264
Revision history for this message
Olivier Girard (eolinwen) wrote :

Thanks a lot for reporting this nasty bugs.

I 'd know What is your version of FFmpeg/x264 ?

I 'm checkcing the code to find the second error.

I 'm tagging them like critical.

Again thanks to improve Openshot.

Changed in openshot:
importance: Undecided → Critical
milestone: none → 1.4.2
Revision history for this message
Andy Finch (fincha) wrote : Re: [Openshot.bugs] [Bug 927126] Re: Issues with commas preventing export in x264
Download full text (4.0 KiB)

Are you able to try our daily PPA (
https://launchpad.net/~openshot.developers/+archive/daily), or grab the
latest source code. There are a number of locale fixes in the latest code
updates, including a fix for the preferences window.

2012/2/5 Cenwen <email address hidden>

> Thanks a lot for reporting this nasty bugs.
>
> I 'd know What is your version of FFmpeg/x264 ?
>
> I 'm checkcing the code to find the second error.
>
> I 'm tagging them like critical.
>
> Again thanks to improve Openshot.
>
> ** Changed in: openshot
> Importance: Undecided => Critical
>
> ** Changed in: openshot
> Milestone: None => 1.4.2
>
> --
> You received this bug notification because you are a member of OpenShot
> Bugs, which is subscribed to OpenShot Video Editor.
> https://bugs.launchpad.net/bugs/927126
>
> Title:
> Issues with commas preventing export in x264
>
> Status in OpenShot Video Editor:
> New
>
> Bug description:
> I have Ubuntu 11.10 and I installed Openshot through the ppa. I have
> the latest version, that is, 1.4.1.
>
> I'd like to report a couple of bugs that I found, the first of them
> driving me crazy. I simply couldn't export using codec x264 (I had
> sound but no video) and I looked at all the possible solutions,
> updating MLT, checking python libraries, etc. Well, it was all much
> simpler than that. The file "video.py"
> (/usr/lib/pymodules/python2.7/openshot/classes/video.py) has this
> problem, at least for me, since everytime I tried to render files
> using libx264, I had the following output:
>
> [NULL @ 0x22e0900] [Eval @ 0x7fa2259f34c0] Invalid chars '.6' at the end
> of expression '0.6'
> [NULL @ 0x22e0900] Unable to parse option value "0.6"
> [libx264 @ 0x22e0900] broken ffmpeg default settings detected
> [libx264 @ 0x22e0900] use an encoding preset (e.g. -vpre medium)
> [libx264 @ 0x22e0900] preset usage: -vpre <speed> -vpre <profile>
> [libx264 @ 0x22e0900] speed presets are listed in x264 --help
> [libx264 @ 0x22e0900] profile is optional; x264 defaults to high
>
> All I needed to do was the following:
>
> if self.render_options["vcodec"] == "libx264":
> self.c.set("minrate", "0")
> self.c.set("b_strategy", "1")
> self.c.set("subcmp", "2")
> self.c.set("cmp", "2")
> self.c.set("coder", "1")
> self.c.set("flags", "+loop")
> self.c.set("flags2", "dct8x8")
> self.c.set("qmax", "51")
> self.c.set("subq", "7")
> self.c.set("qmin", "10")
> self.c.set("qcomp", "0.6") --->
> changed the value for "0,6", using a comma
> self.c.set("qdiff", "4")
> self.c.set("trellis", "1")
>
> The second one is much less important, but it also has to do with
> commas. Every time I click of preferences and I close the menu, on m...

Read more...

Revision history for this message
Olivier Girard (eolinwen) wrote :

I've tried the workaround. It was successful the first and a chess the tree other times.
an in more, I get another error with it.
NEW SDL CONSUMER
on_tlbMakeMovie_clicked called with self.GtkToolButton
on_cboExportType_changed
on_cboUploadServices_changed
on_cboProjectType_changed
on_cboExportTo_changed
on_btnExportVideo_clicked
NEW SDL CONSUMER
[ac3_fixed @ 0x1fce300] channel_layout not specified
[ac3_fixed @ 0x1fce300] No channel layout specified. The encoder will guess the layout, but it might be incorrect.
Autosaving...
project saved! - error x264
on_frmExportVideo_destroy

Revision history for this message
Juan Francisco Contreras García (juanfcocontreras) wrote :

Wow, thanks a lot for such a quick reply. My ffmpeg version is 4:0.7.3 and the x264 is 2:0.116.2042

Thanks for the advice, I'll try with the daily ppa and see how it goes.

Revision history for this message
Olivier Girard (eolinwen) wrote :

I've tried with the last daily version of the PPA.

Changed in openshot:
status: New → Confirmed
Revision history for this message
Juan Francisco Contreras García (juanfcocontreras) wrote :

I just checked both mistakes. Just as you said, the preferences window issue is fixed in the latest version (1.4.2~beta1), but I'm afraid I can't still render x264 videos. Just by changing the value to "0,6" in the video.py file solves the issue, the same as the 1.4.1 version.

Revision history for this message
Jonathan Thomas (jonoomph) wrote :

This has been fixed in the trunk, and will be included in 1.4.2. Please retest with the daily PPA or pulling the lastest version from bzr. Thanks!

Changed in openshot:
status: Confirmed → Fix Committed
Andy Finch (fincha)
Changed in openshot:
status: Fix Committed → Fix Released
Revision history for this message
Juan Francisco Contreras García (juanfcocontreras) wrote :

After updating to the latest version this morning, I confirm the bug has been fixed in the 1.4.2 release. Thanks a lot for your work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.