x264enc encoding type : VBR - aways crash
Closed, ResolvedPublic

Description

Hello,

When trying to render video -with VBR - pitivi aways crash. There is no problem when using CBR

pitivi 0.97.1-1

ERROR 18:25:07 pipeline          pitivi+utils+pipeline+pipeline0 _handleErrorMessage: error from <__gi__.GstX264Enc object at 0x7fbfc40993a8 (GstX264Enc at 0x5dcd290)>: gst-stream-error-quark: Can not initialize x264 encoder. (8) (gstx264enc.c(1587): gst_x264_enc_init_encoder (): /pitivi+utils+pipeline+Pipeline:pitivi+utils+pipeline+pipeline0/GstEncodeBin:internal-encodebin/GstX264Enc:x264enc0) (../../usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/utils/pipeline.py:475)


ERROR 18:25:09 pipeline          pitivi+utils+pipeline+pipeline0 _handleErrorMessage: error from <__gi__.GstMatroskaDemux object at 0x7fbfc407b318 (GstMatroskaDemux at 0x7fbfe8038a00)>: gst-stream-error-quark: GStreamer encountered a general stream error. (1) (matroska-demux.c(4761): gst_matroska_demux_loop (): /pitivi+utils+pipeline+Pipeline:pitivi+utils+pipeline+pipeline0/GESTimeline:gestimeline0/GESAudioTrack:gesaudiotrack0/NleComposition:audio_nlecomposition1/GstBin:current-bin/NleSource:GESAudioUriSource:nlesource24/GstBin:audiosrcbin/GstURIDecodeBin:uridecodebin8/GstDecodeBin:decodebin23/GstMatroskaDemux:matroskademux12:
stream stopped, reason not-linked) (../../usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/utils/pipeline.py:475)

ERROR 18:25:09 pipeline          pitivi+utils+pipeline+pipeline0 _recover: Pipeline error detected during playback, resetting -- num tries: 0 (../../usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/utils/pipeline.py:459)

ERROR 18:25:10 pipeline          pitivi+utils+pipeline+pipeline0 _handleErrorMessage: error from <__gi__.GstMatroskaDemux object at 0x7fbfc407b318 (GstMatroskaDemux at 0x7fbfb8004180)>: gst-stream-error-quark: GStreamer encountered a general stream error. (1) (matroska-demux.c(4761): gst_matroska_demux_loop (): /pitivi+utils+pipeline+Pipeline:pitivi+utils+pipeline+pipeline0/GESTimeline:gestimeline0/GESAudioTrack:gesaudiotrack0/NleComposition:audio_nlecomposition1/GstBin:current-bin/NleSource:GESAudioUriSource:nlesource24/GstBin:audiosrcbin/GstURIDecodeBin:uridecodebin8/GstDecodeBin:decodebin25/GstMatroskaDemux:matroskademux13:

Details

Commits
D1804 / rPTV803d35f99b51: widgets: Custom validation checks for GstElementSettingsWidget fields
git URI
https://github.com/stefanzzz22/pitivi.git#wip/phab/T7580-x264enc-VBR-crash
bager4e created this task.Oct 8 2016, 3:47 PM
aleb added a subscriber: aleb.Oct 8 2016, 6:16 PM

I do not notice any crash here when rendering with VBR. Please describe the steps you make that lead to the crash.

Please also provide a stack trace when the crash occurs, see http://wiki.pitivi.org/wiki/Bug_reporting

Thanks!

aleb updated the task description. (Show Details)Oct 8 2016, 6:17 PM

Hello ,

ERROR 20:59:12 pipeline pitivi+utils+pipeline+pipeline0 _handleErrorMessage: error from <__gi__.GstQTDemux object at 0x7fffd0055678 (GstQTDemux at 0x7fffbc051f10)>: gst-stream-error-quark: GStreamer encountered a general stream error. (1) (qtdemux.c(5520): gst_qtdemux_loop (): /pitivi+utils+pipeline+Pipeline:pitivi+utils+pipeline+pipeline0/GESTimeline:gestimeline0/GESAudioTrack:gesaudiotrack0/NleComposition:audio_nlecomposition1/GstBin:current-bin/NleSource:GESAudioUriSource:nlesource4/GstBin:audiosrcbin/GstURIDecodeBin:uridecodebin1/GstDecodeBin:decodebin18/GstQTDemux:qtdemux17:
streaming stopped, reason not-linked) (../../usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/utils/pipeline.py:475)
ERROR 20:59:12 pipeline pitivi+utils+pipeline+pipeline0 _recover: Pipeline error detected during playback, resetting -- num tries: 3 (../../usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/utils/pipeline.py:459)
[Thread 0x7fffa5cfe700 (LWP 31169) exited]
[Thread 0x7fff8ffff700 (LWP 31168) exited]
[Thread 0x7fffa64ff700 (LWP 31170) exited]
[Thread 0x7fffd0898700 (LWP 31173) exited]
[Thread 0x7fffd2164700 (LWP 31172) exited]
[Thread 0x7fffcb525700 (LWP 31174) exited]
[Thread 0x7fffa6d00700 (LWP 31175) exited]
[Thread 0x7fffa7501700 (LWP 31176) exited]
[New Thread 0x7fffa7501700 (LWP 31177)]
[New Thread 0x7fffa6d00700 (LWP 31178)]
[New Thread 0x7fffcb525700 (LWP 31179)]
[New Thread 0x7fffd0898700 (LWP 31180)]
[Thread 0x7fffa7501700 (LWP 31177) exited]
[New Thread 0x7fffa7501700 (LWP 31181)]
[New Thread 0x7fffd2164700 (LWP 31182)]
[New Thread 0x7fffa64ff700 (LWP 31183)]
[New Thread 0x7fffa5cfe700 (LWP 31184)]
[New Thread 0x7fff8ffff700 (LWP 31185)]

ERROR 20:59:12 pipeline pitivi+utils+pipeline+pipeline0 _handleErrorMessage: error from <__gi__.GstQTDemux object at 0x7fffd0055678 (GstQTDemux at 0x7fff20342370)>: gst-stream-error-quark: GStreamer encountered a general stream error. (1) (qtdemux.c(5520): gst_qtdemux_loop (): /pitivi+utils+pipeline+Pipeline:pitivi+utils+pipeline+pipeline0/GESTimeline:gestimeline0/GESAudioTrack:gesaudiotrack0/NleComposition:audio_nlecomposition1/GstBin:current-bin/NleSource:GESAudioUriSource:nlesource4/GstBin:audiosrcbin/GstURIDecodeBin:uridecodebin1/GstDecodeBin:decodebin20/GstQTDemux:qtdemux19:

streaming stopped, reason not-linked) (../../usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/utils/pipeline.py:475)

[New Thread 0x7fff77fff700 (LWP 31186)]
[Thread 0x7fff77fff700 (LWP 31186) exited]
[New Thread 0x7fff77fff700 (LWP 31187)]
[Thread 0x7fff77fff700 (LWP 31187) exited]

ERROR 20:59:17 pipeline pitivi+utils+pipeline+pipeline0 _asyncDoneNotReceivedCb: we didn't get async done, this is a bug (../../usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/utils/pipeline.py:296)

ERROR 20:59:19 pipeline pitivi+utils+pipeline+pipeline0 _recover: Pipeline error detected multiple times in a row, not resetting anymore (../../usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/utils/pipeline.py:455)
[Thread 0x7fff1f7fe700 (LWP 31007) exited]
[Thread 0x7fff49ffb700 (LWP 31005) exited]
[Thread 0x7fff4a7fc700 (LWP 31014) exited]
[Thread 0x7fff8da68700 (LWP 31059) exited]

aleb added a comment.Oct 12 2016, 7:29 PM

When you run the app in gdb, when the app crashes you have to type in the gdb console set pagination off and then t a a bt to get the backtrace.

This comment was removed by thiblahute.
thiblahute edited projects, added Pitivi (1.0); removed Pitivi.Nov 10 2016, 12:41 PM
thiblahute claimed this task.
thiblahute changed the task status from Open to Need Information.Nov 10 2016, 12:44 PM

Thanks for the report.

What do you mean by crashes? It just does not work, it is not closing spontaneously right?

Could you please install our official flatpak version and let us know if it happens there?

thiblahute edited projects, added Pitivi; removed Pitivi (1.0).Nov 10 2016, 12:44 PM

There is an error message : "gst-stream-error-quark: Can not initialize x264 encoder". And after that only option is to close the pitivi.
Sometimes closing didn't respond and need to kill the program manually(rare).

Will test with flatpak

Wait, what is the size of the video you are trying to render? Could be related to T3182.

The size is 1920x1080

Please run:

GST_DEBUG=5 pitivi > log 2>&1

And paste the content of the log file here.

The log is 281MB and contains 1252378 lines. I can't upload this file. The program was working <1 min before the error message
I can grep in the file something ...

Just compress it, it should get *way* smaller and it should be uploadable

Just compress it, it should get *way* smaller and it should be uploadable

OK, sorry to annoy you again but simplest would be if you can provide the file called XXXX-pitivi.error that is generated when running pitivi with:

GST_DEBUG_DUMP_DOT_DIR=. pitivi0

Thanks a lot for your help! :)

welcome! :)

OK that pipeline does not make sense, could you explain exactly what you are doing? Is it happening with any timeline?

I'm trying to render clip from my YI camera.

  1. Removing original sound from "raw" clip.
  2. Adding some audio track
  3. Trying to render with VBR ( 8 Mbit/s or larger ) , video 1920:1080 , mp4 and pitivi aways crash

When using CBR - no problem at all.

This is happening with any timeline.

OK, please share the exact project as I can't reproduce and the log/pipeline dump look really suspicious

You can follow wiki.pitivi.org/wiki/Bug_reporting to share the project

OK, reproduced, it seem to happen when the Multipass cache file property is not properly set:

1018203 0:00:53.211881215 13354 0x3251ad0 ERROR x264enc :0::<x264enc0> ratecontrol_init: can't open stats file

Then there is another bug when going back from rendering to playback when rendering failed.

We should fix the two things here:

  • In pitivi make sure that the Multipass cache file' property is always set properly, (not mandatory for 1.0 but would be much nicer).
  • Make sure that we properly recover when going back to payback
thiblahute moved this task from Backlog to 0.99 on the Pitivi board.Nov 14 2016, 12:09 PM
thiblahute edited projects, added Pitivi (0.99); removed Pitivi.
thiblahute changed the task status from Need Information to Open.Jan 10 2017, 1:11 AM
stefanzzz set git URI to https://github.com/stefanzzz22/pitivi.git#wip/phab/T7580-x264enc-VBR-crash.

I wonder if a better approach wouldn't be to suppress this property, and automatically create a temp file for it.

If we are going to allow one to set this file, then it should be a GtkFileChooserButton, no?

I wonder if a better approach wouldn't be to suppress this property, and automatically create a temp file for it.
If we are going to allow one to set this file, then it should be a GtkFileChooserButton, no?

Ideally it should be a GtkFileChooserButton I guess indeed, but this will have to wait for T3263 to be completed, so after 1.0.

aleb reassigned this task from thiblahute to stefanzzz.Aug 12 2017, 1:17 AM
aleb added a subscriber: thiblahute.
aleb moved this task from 0.99 to 2.0 on the Pitivi board.Aug 18 2017, 7:31 PM
aleb edited projects, added Pitivi (2.0); removed Pitivi (0.99).
aleb moved this task from 2.0 to Backlog on the Pitivi board.
aleb edited projects, added Pitivi; removed Pitivi (2.0).
aleb moved this task from Backlog to 0.99 on the Pitivi board.Sep 1 2017, 3:33 PM
aleb edited projects, added Pitivi (0.99); removed Pitivi.
aleb moved this task from Needs review to Done on the Pitivi (0.99) board.Sep 1 2017, 4:01 PM

GitLab Migration Automatic Message

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pitivi/issues/1918.