[Ardour-Users] "Extract LTC from audio and align video" menu option missing from "Transcode/Import Video file" popup

Chris Caudle chris at chriscaudle.org
Thu Apr 5 19:12:15 PDT 2018


On Thu, April 5, 2018 2:30 pm, robertlazarski . wrote:
> I was not selecting "file timestamp", which explains why I was not seeing
> the timecode I was expecting in Xjadeo. This option fixed that problem.

OK, I think you are getting close.  I imported the file you created,
180404-T004.WAV, and when I selected import at file timestamp it was moved
to 6:05:27 as expected.

I noticed in your screen capture that there was a message which flashed up
about sample rate conversion.  Just for future reference you will probably
want to set your session sample rate to 48k when working with audio for
video, that is the standard sample rate for essentially all video formats.

> However when choosing that option, I no longer see video in Xjadeo but I
> do hear audio.

I also do not see video, so I think something is not correct with my
harvid and xjadeo setup, or there are transcoding problems with the video.
 I am selecting to resize the video to 820x480 so it won't be full screen
on my monitor, but I do see individual frame thumbnails in the video
timeline, so at least some of the video import is happening correctly.
I see these messages in Ardour log, perhaps indicating a firewall problem,
or maybe harvid just is not running correctly:
HTTP request failed: (7) Failed to connect to 127.0.0.1 port 1554:
Connection refused

Other than that, I still do not have the video import lining up correctly
on the timeline.
This is what I have done so far to try to debug, maybe one of the ardour
devs or someone else using timecode will recognize what is going on:

In the session/openvideo dialog, after selecting the file and the second
dialog opens, I select extract audio, click the checkbox for extract LTC
and align video, and also the checkbox for debug mode.  That should log
the output from ffmpeg so you can see if there are any errors transcoding
the video, or extracting the audio, but I do not see as many messages from
ffmpeg as I expected showing up in the ardour log.

After importing the video, it is lined up about a minute later than the
audio in the timeline.
Checking the Ardour log window, I see these messages:
[WARNING]: Failed to set session-framerate: '29.917' does not have a
corresponding option setting in Ardour.
[WARNING]: Video file's framerate is not equal to Ardour session
timecode's framerate: '29.917' vs '30'
[INFO]: Align video-start to 1055787966 [samples]

I have my session set to 48k, so 10557887966/48000 is around 367 minutes, or
about 6 hours and 6 minutes, so that matches where it is place in the
timeline.
What I don't see is any message about timecode count or any indication of
how that sample count was derived.

I'm also not sure where that 29.917 frame rate came from.

Looking at the video file info with ffmpeg -i I see  this information
about the video stream:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20180405_060536.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2018-04-05T12:06:20.000000Z
    com.android.version: 7.0
  Duration: 00:00:42.29, start: 0.000000, bitrate: 17200 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1920x1080, 16984 kb/s, SAR 1:1 DAR 16:9, 29.89 fps, 29.92 tbr,
90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2018-04-05T12:06:20.000000Z
      handler_name    : VideoHandle

Note the frame rate of 29.89 frames per second.  That does not match a
common video frame rate ( I would expect either 30 frames per second, or
29.979 frames per second, but not 29.89).
Perhaps that is just a round off error because the video is short, but it
also doesn't match the 29.917 value that Ardour printed.

So I went to Session/RemoveVideo, then Session/Properties, and in the
Timecode frames-per-second setting change to 29.97 so that the session is
manually set to 29.97 (you cannot enter arbitrary values, so there is no
way to see what happens if I set the session frame rate to the 29.917 that
the video is detected as having).

I went back to Session/OpenVideo, find your file again, and uncheck the
"Adjust session framerate to match video framerate" selection box.

After that in the Ardour log I still see this:
[WARNING]: Video file's framerate is not equal to Ardour session
timecode's framerate: '29.917' vs '29.97'
[INFO]: Align video-start to 1055787966 [samples]

The sample value used for alignment is still the same, changing the
session frame rate from 30fps to 29.97fps did not change that.

Possibly the discontinuity message displayed by ltcdump from the beginning
of the video file audio track is confusing the Ardour import.  Try cutting
the input gain on your audio interface until the timecode is coming in at
around -12dB or -15dB.

Other than that I don't have any ideas yet of what could be throwing off
the timeline calculation.
Maybe Robin knows how to get more verbose logs from Ardour as it imports.


-- 
Chris Caudle




More information about the Ardour-Users mailing list