APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Error: Could not encode Video - Timebase not supported by mpeg 4 Standard

Return to the Tracker forum
Login to post to this thread

Error while exporting video
Thomas Rufer
3 Posts


First time poster here...

I made an analysis (Tracker-Zip @ https://www.dropbox.com/sh/jt814gp6mp4hc2h/AACuGhFOWyOGhgYW3ydtCmkMa?dl=0)
but when i try to export the Video with the lines and angles, in the end it throws an error:
"Could not encode video"
and a second error-Window
"Timebase not supported by mpeg 4 Standard thread"
See attachment

PC was Windows 8.1

I tested it on my Laptop as well (Win10) with the same problem.
The FPS is 29.6fps and straight from my phone... Should be a valid MPEG4 i think...

So... What can i do to export the video? What even is the problem, as 29.6fps is a valid fps for MPEG4, no?

also tried to save it to an USB-Stick in case of write-problems. Same.


Oh... The console throws this:

CONSOLE: 16:43:00.443 [AWT-EventQueue-0] ERROR org.ffmpeg - [mpeg4 @ 0x288fedb0] timebase not supported by mpeg 4 standard

CONSOLE: 16:43:00.443 [AWT-EventQueue-0] WARN  com.xuggle.xuggler - Error: could not open codec (../../../../../../../csrc/com/xuggle/xuggler/StreamCoder.cpp:686)

CONSOLE: 16:43:00.513 [AWT-EventQueue-0] WARN  com.xuggle.xuggler - Attempting to encode when not ready (../../../../../../../csrc/com/xuggle/xuggler/StreamCoder.cpp:1194)

CONSOLE: 16:46:20.201 [AWT-EventQueue-0] WARN  com.xuggle.xuggler - writeTrailer() with no matching call to writeHeader() (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:734)

CONSOLE: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: could not write trailer to output file

    at org.opensourcephysics.media.xuggle.XuggleVideoRecorder.closeStream(Unknown Source)

    at org.opensourcephysics.media.xuggle.XuggleVideoRecorder.reset(Unknown Source)

    at org.opensourcephysics.cabrillo.tracker.ExportVideoDialog$5$1.run(Unknown Source)

    at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)

    at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)

    at java.desktop/java.awt.EventQueue.access$500(Unknown Source)

    at java.desktop/java.awt.EventQueue$3.run(Unknown Source)

    at java.desktop/java.awt.EventQueue$3.run(Unknown Source)

    at java.base/java.security.AccessController.doPrivileged(Native Method)

    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)

    at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)

    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

weird... If i export only up to frame 35, all is OK... Only if i export up to 182, the error occurs...
up to frame 99: error
[unknown region]
up to frame 76: Success
up to frame 50: Success.

Edit: Hu? If i export to WMV, all works (except the quality of the video is shit after export... Blocky as hell...)
I added the WMV to the Dropbox link from above... Some idea on how to improve the video-quality?

Post edited November 14, 2018 at 11:19 AM EST.

Attached File: errortracker.jpg

Current Replies - View all
Re: Error while exporting...   (Douglas Brown - )
Re: Error while exporting...   (Thomas Rufer - )
Re: Error while exporting...   (Douglas Brown - )
Re: Error while exporting...   (Thomas Rufer - )
OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book