View Issue Details

IDCategoryLast Update
0007544bugs2018-01-25 13:31
Reporterjohne53Assigned Tojohne53 
Status resolvedResolutionfixed 
PlatformWindowsOSprobably allOS Versionprobably all
Product Version5.X git (version in description) 
Fixed in Version 
Summary0007544: Video timeline does not work in Windows
DescriptionApologies for the length of this report and sorry if there's already an outstanding issue...

Over on the Ardour forum a user called Drazen Gara has reported being unable to see videos when running Ardour under Windows 8:-

I decided to take a look and realised that on my system, I can't see videos on either Windows 7 or Windows 8 (if I try to load a video I end up with a blank preview window and a blank video timeline).
Steps To ReproduceSimply attempt to load a video from 'Session->Open Video...'
Additional InformationThe video preview seems to get handled via curl somehow. I'm assuming that some 3rd party app (harvid maybe?) is listening on a port and responding to curl requests. Here's the relevant code from function 'HttpGet::get()' (it's at line 214 in gtk2_ardour/ Note that it gets passed a URL:-

    cc = curl_easy_setopt (_curl, CURLOPT_URL, url);
    _result = curl_easy_perform (_curl);
    cc = curl_easy_getinfo (_curl, CURLINFO_RESPONSE_CODE, &_status);

When trying to open a video, the first curl message seems to be a general status request - with the URL being:-

this completes successfully and the http status returned from curl is 200 (status OK). The next stage seems to be a request to get some general info about the selected video file (duration / frame rate / aspect ratio etc.) - with the relevant URL being:-

This also completes successfully and returns status 200. But after that, things start to go wrong...

The final stage is an attempt to load a sample for the preview window. In this case the URL is:-

However... this request fails (on Windows) with the returned status being 400 (Bad Request status). So I'm assuming that the above request is malformed somehow. Here's the code which forms it at line 695 in 'gtk2_ardour/' (function 'AddVideoDialog::request_preview()'):-

    char url[2048];
    snprintf(url, sizeof(url), "%s%s?sample=%lli&w=%d&h=%di&file=%s&format=rgb"
        , video_server_url.c_str()
        , (video_server_url.length()>0 && == '/')?"":"/"
        , (long long) (video_duration * seek_slider.get_value() / 1000.0)
        , clip_width, clip_height, u.c_str());

    char* data = ArdourCurl::http_get (url, NULL);

Maybe someone can take a look and see if there's anything wrong...
TagsNo tags attached.



2018-01-20 18:26

reporter   ~0020122

The video track still isn't working but I managed to fix the preview issue... Here's the code that's causing the preview problem (at line 696 in 'gtk2_ardour/' - function 'AddVideoDialog::request_preview()'):-

    snprintf(url, sizeof(url), "%s%s?sample=%lli&w=%d&h=%di&file=%s&format=rgb"

Changing it to this at least partially fixes the problem:-

    snprintf(url, sizeof(url), "%s%s?frame=%lli&w=%d&h=%di&file=%s&format=rgb"

See the git commit from 18th Sep 2017 (commit #30b087ab3d)

I now see a preview image if I select a video file but when I press OK (to launch the Transcode dialog) it still shows no path for the output file and the Import Settings still say "Do Not Import Video".

Any hints at where to look next?


2018-01-20 18:45

administrator   ~0020123

Works for me on Windows 7 (en_us) with drive C:\

...file=N%3A%2Fvideosample.avi... Is this drive N:\ ? does it work on C:\ ?


2018-01-20 18:48

administrator   ~0020124

PS. the videotimeline sample->frame is already fixed in 2e9fcceb1e3


2018-01-21 08:29

reporter   ~0020125

I moved both the session and the video file to my C:\ drive and tried again on Windows 7 but it didn't make any difference. A few things might be significant here...

1) This DID work briefly when I first installed harvid and xjadeo (a couple of days ago) but since re-booting I've never been able to make it work in either Windows 7 or Windows 8.1

2) A couple of days ago there was one session which I saved with a working video timeline. That session still works if I open it. What doesn't work is trying to import video to any other session

3) This section (in the TranscodeVideoDialog c'tor) might be contributing to the problem:-

        if (w > 0 && h > 0 && transcoder->get_fps() > 0 && transcoder->get_duration() > 0) {
            ffok = true;

'w' and 'h' both have valid values when this line gets reached - but 'transcoder->get_fps()' and 'transcoder->get_duration()' both return zero


2018-01-21 08:36

reporter   ~0020126

From x42:-
" PS. the videotimeline sample->frame is already fixed in 2e9fcceb1e3 "

Sorry, I meant to add - #2e9fcceb1e3 only fixes it in (the problem I found was in

I've a horrible feeling there might be more of these sample->frame issues lurking around... :-(


2018-01-21 10:11

reporter   ~0020127

Last edited: 2018-01-21 10:12

View 2 revisions

From johne53:-
" 'transcoder->get_fps()' and 'transcoder->get_duration()' both return zero "

In fact if I change that section to look like this, it works again:-

        if (w > 0 && h > 0) {
             ffok = true;

AFAICT those various fields (duration / width / height / fps etc.) all seem to get calculated by an external helper app (ffprobe.exe?) So my guess is that there's some problem with the helper app (in some situations it isn't calculating the duration and fps correctly).


2018-01-21 10:36

administrator   ~0020128

I've started to roll back various Frame->Sample changes.

The issue with the "ok" flag is not the external tool, but rather ardour parsing its output (another frame/sample) issue.


2018-01-23 18:20

reporter   ~0020133

Yes Robin, you're right. I made a few sample->frame reversions in 'gtk2_ardour/' and I now have visible pictures again on my video timeline. There could easily be more needed elsewhere though...


2018-01-25 13:31

reporter   ~0020135

Working in git master now (25th Jan 2018)

Issue History

Date Modified Username Field Change
2018-01-20 13:01 johne53 New Issue
2018-01-20 18:26 johne53 Note Added: 0020122
2018-01-20 18:45 x42 Note Added: 0020123
2018-01-20 18:48 x42 Note Added: 0020124
2018-01-21 08:29 johne53 Note Added: 0020125
2018-01-21 08:36 johne53 Note Added: 0020126
2018-01-21 10:11 johne53 Note Added: 0020127
2018-01-21 10:12 johne53 Note Edited: 0020127 View Revisions
2018-01-21 10:36 x42 Note Added: 0020128
2018-01-23 18:20 johne53 Note Added: 0020133
2018-01-25 13:31 johne53 Note Added: 0020135
2018-01-25 13:31 johne53 Status new => resolved
2018-01-25 13:31 johne53 Resolution open => fixed
2018-01-25 13:31 johne53 Assigned To => johne53