<div dir="ltr">Thanks for the help Chris, see my answers inline. <div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 5, 2018 at 8:12 PM, Chris Caudle <span dir="ltr"><<a href="mailto:chris@chriscaudle.org" target="_blank">chris@chriscaudle.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Thu, April 5, 2018 2:30 pm, robertlazarski . wrote:<br>
> I was not selecting "file timestamp", which explains why I was not seeing<br>
> the timecode I was expecting in Xjadeo. This option fixed that problem.<br>
<br>
</span>OK, I think you are getting close.  I imported the file you created,<br>
180404-T004.WAV, and when I selected import at file timestamp it was moved<br>
to 6:05:27 as expected.<br>
<br>
I noticed in your screen capture that there was a message which flashed up<br>
about sample rate conversion.  Just for future reference you will probably<br>
want to set your session sample rate to 48k when working with audio for<br>
video, that is the standard sample rate for essentially all video formats.<br></blockquote><div><br></div><div>I was wondering where to fix that, now I know I need to choose 48KHZ when creating the session - thanks!  <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-"><br>
> However when choosing that option, I no longer see video in Xjadeo but I<br>
> do hear audio.<br>
<br>
</span>I also do not see video, so I think something is not correct with my<br>
harvid and xjadeo setup, or there are transcoding problems with the video.<br>
 I am selecting to resize the video to 820x480 so it won't be full screen<br>
on my monitor, but I do see individual frame thumbnails in the video<br>
timeline, so at least some of the video import is happening correctly.<br>
I see these messages in Ardour log, perhaps indicating a firewall problem,<br>
or maybe harvid just is not running correctly:<br>
HTTP request failed: (7) Failed to connect to 127.0.0.1 port 1554:<br>
Connection refused<br>
<br>
Other than that, I still do not have the video import lining up correctly<br>
on the timeline.<br>
This is what I have done so far to try to debug, maybe one of the ardour<br>
devs or someone else using timecode will recognize what is going on:<br>
<br>
In the session/openvideo dialog, after selecting the file and the second<br>
dialog opens, I select extract audio, click the checkbox for extract LTC<br>
and align video, and also the checkbox for debug mode.  That should log<br>
the output from ffmpeg so you can see if there are any errors transcoding<br>
the video, or extracting the audio, but I do not see as many messages from<br>
ffmpeg as I expected showing up in the ardour log.<br>
<br>
After importing the video, it is lined up about a minute later than the<br>
audio in the timeline.<br>
Checking the Ardour log window, I see these messages:<br>
[WARNING]: Failed to set session-framerate: '29.917' does not have a<br>
corresponding option setting in Ardour.<br>
[WARNING]: Video file's framerate is not equal to Ardour session<br>
timecode's framerate: '29.917' vs '30'<br>
[INFO]: Align video-start to 1055787966 [samples]<br>
<br>
I have my session set to 48k, so 10557887966/48000 is around 367 minutes, or<br>
about 6 hours and 6 minutes, so that matches where it is place in the<br>
timeline.<br>
What I don't see is any message about timecode count or any indication of<br>
how that sample count was derived.<br>
<br>
I'm also not sure where that 29.917 frame rate came from.<br>
<br>
Looking at the video file info with ffmpeg -i I see  this information<br>
about the video stream:<br>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20180405_060536.mp4':<br>
  Metadata:<br>
    major_brand     : mp42<br>
    minor_version   : 0<br>
    compatible_brands: isommp42<br>
    creation_time   : 2018-04-05T12:06:20.000000Z<br>
    com.android.version: 7.0<br>
  Duration: 00:00:42.29, start: 0.000000, bitrate: 17200 kb/s<br>
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,<br>
bt709), 1920x1080, 16984 kb/s, SAR 1:1 DAR 16:9, 29.89 fps, 29.92 tbr,<br>
90k tbn, 180k tbc (default)<br>
    Metadata:<br>
      creation_time   : 2018-04-05T12:06:20.000000Z<br>
      handler_name    : VideoHandle<br>
<br>
Note the frame rate of 29.89 frames per second.  That does not match a<br>
common video frame rate ( I would expect either 30 frames per second, or<br>
29.979 frames per second, but not 29.89).<br>
Perhaps that is just a round off error because the video is short, but it<br>
also doesn't match the 29.917 value that Ardour printed.<br>
<br>
So I went to Session/RemoveVideo, then Session/Properties, and in the<br>
Timecode frames-per-second setting change to 29.97 so that the session is<br>
manually set to 29.97 (you cannot enter arbitrary values, so there is no<br>
way to see what happens if I set the session frame rate to the 29.917 that<br>
the video is detected as having).<br>
<br>
I went back to Session/OpenVideo, find your file again, and uncheck the<br>
"Adjust session framerate to match video framerate" selection box.<br>
<br>
After that in the Ardour log I still see this:<br>
[WARNING]: Video file's framerate is not equal to Ardour session<br>
timecode's framerate: '29.917' vs '29.97'<br>
[INFO]: Align video-start to 1055787966 [samples]<br>
<br>
The sample value used for alignment is still the same, changing the<br>
session frame rate from 30fps to 29.97fps did not change that.<br>
<br>
Possibly the discontinuity message displayed by ltcdump from the beginning<br>
of the video file audio track is confusing the Ardour import.  Try cutting<br>
the input gain on your audio interface until the timecode is coming in at<br>
around -12dB or -15dB.<br>
<br>
Other than that I don't have any ideas yet of what could be throwing off<br>
the timeline calculation.<br>
Maybe Robin knows how to get more verbose logs from Ardour as it imports.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
--<br>
Chris Caudle<br>
<br>
<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">I seen these errors too but I was not sure what they meant. My harvid server is seemingly working. <br><br></div><div class="gmail_extra">I tried a few things but I am still stuck with no video, as both us are experiencing: <br><br></div><div class="gmail_extra">1) I put a preamp (Sound Devices usbpre2) with nice meters in between the F8 and the Irig DUO interface that goes to the phone. I tweaked the levels until the LTC and scratch track peaked at -20DB on its outputs. Unfortunately I still see the DISCONTINUITY message from ltcdump. And it didn't help in Ardour. <br><br></div><div class="gmail_extra">I'd be willing to post more files if that would be helpful. <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">2) These frame rate issues are strange, but I tried several Android phones and none of them show exactly 30 fps according to ffmpeg. So I re-encoded a phone video with ffmpeg to 30 fps. See below for the command. That seemed to fix the log errors, but I still see no video. I can only see video, when I don't set the import on the F8 wav to use the file timestamp. When the F8 file is imported using session start at 00:00:00 I can see video but the audio comes in about as late as the delay from pressing start on the F8 to pressing start on the camera. <br></div><div class="gmail_extra"><br>ffmpeg -i VID_20180407_131539.mp4  -r 30 output.mp4<br><br></div><div class="gmail_extra">3) See below for the logs. I couldn't figure out how to increase logging. I'd be willing to try to debug the source, since I compiled the source - that took several hours though so any tips how I could only compile a relevant module or something would be helpful. <br><br>[linux-7cab(iksrazal)] <br> /home/iksrazal> ardour5 <br>bind txt domain [gtk2_ardour5] to /usr/local/share/ardour5/locale<br>Ardour5.12.0 (built using 5.12 and GCC version 4.8.5)<br>ardour: [INFO]: Your system is configured to limit Ardour to only 4096 open files<br>ardour: [INFO]: Loading system configuration file /usr/local/etc/ardour5/system_config<br>ardour: [INFO]: Loading user configuration file /home/iksrazal/.config/ardour5/config<br>ardour: [INFO]: CPU vendor: GenuineIntel<br>ardour: [INFO]: AVX-capable processor<br>ardour: [INFO]: CPU brand: Intel(R) Core(TM) i3-7100U CPU @ 2.40GHz<br>ardour: [INFO]: Using SSE optimized routines<br>ardour: [INFO]: Loading default ui configuration file /usr/local/etc/ardour5/default_ui_config<br>ardour: [INFO]: Loading user ui configuration file /home/iksrazal/.config/ardour5/ui_config<br>Color shuttle bg not found<br>ardour: [INFO]: Loading color file /usr/local/share/ardour5/themes/dark-ardour.colors<br>ardour: [INFO]: Loading ui configuration file /usr/local/etc/ardour5/clearlooks.rc<br>ardour: [INFO]: Loading ui configuration file /usr/local/etc/ardour5/clearlooks.rc<br><br>(ardour-5.12.0:4531): Gtk-WARNING **: Theme directory base/ of theme oxygen has no size field<br><br>Found nothing along /home/iksrazal/.config/ardour5/templates:/usr/local/share/ardour5/templates<br>run dialog<br>pingback: No Error<br>protocol Generic MIDI active ? 0<br>protocol PreSonus FaderPort8 active ? 0<br>protocol Mackie active ? 0<br>protocol PreSonus FaderPort active ? 0<br>protocol Steinberg CC121 active ? 0<br>protocol Open Sound Control (OSC) active ? 0<br>Scanning folders for bundled LV2s: /usr/local/lib/ardour5/LV2<br>Set cursor set to default<br>Set buffering params to 262144|131072|10|10<br>Set buffering params to 262144|131072|10|10<br>Skip explicit buffer seconds, preset in use<br>Skip explicit buffer seconds, preset in use<br>JackGraphManager::Connect already connected port_src = 7 port_dst = 3<br>JackGraphManager::Connect already connected port_src = 8 port_dst = 4<br>JackGraphManager::Connect already connected port_src = 1 port_dst = 5<br>JackGraphManager::Connect already connected port_src = 23 port_dst = 3<br>JackGraphManager::Connect already connected port_src = 24 port_dst = 4<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 3.8 ms<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 4.5 ms<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 5.5 ms<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 3.5 ms<br>Pool: 'import events' max: 0 / 64<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 8.6 ms<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 7.6 ms<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 8.2 ms<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 8.0 ms<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.ardour<br>saved state in 9.6 ms<br>TRANSCODE VIDEO:<br>/usr/local/bin/ffmpeg_harvid -i /home/iksrazal/output.mp4 -b:v 10000k -s 1920x1080 -y -vcodec mjpeg -an -intra -g 1 /home/iksrazal/Desktop/ml27/interchange/ml27/videofiles/output.avi <br>ffmpeg: 'ffmpeg version 2.8.2'<br>ffmpeg: ' Copyright (c) 2000-2015 the FFmpeg developers<br>  built with gcc 4.7 (Debian 4.7.2-5)<br>  configuration: --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libopenjpeg --enable-libopus --enable-libschroedinger --enable-libspeex --enable-libbluray --enable-libgsm --disable-vaapi --disable-x11grab --disable-devices --extra-cflags='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' --enable-shared --enable-static --prefix=/home/rgareus/local<br>  libavutil      54. 31.100 / 54. 31.100<br>  libavcodec     56. 60.100 / 56. 60.100<br>  libavformat    56. 40.101 / 56. 40.101<br>  libavdevice    56.  4.100 / 56.  4.100<br>  libavfilter     5. 40.101 /  5. 40.101<br>  libswscale      3.  1.101 /  3.  1.101<br>  libswresample   1.  2.101 /  1.  2.101<br>  libpostproc    53.  3.100 / 53.  3.100'<br>ffmpeg: 'Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/iksrazal/output.mp4':<br>  Metadata:<br>    major_brand     : isom<br>    minor_version   : 512<br>    compatible_brands: isomiso2avc1mp41<br>    encoder         : Lavf57.71.100<br>  Duration: 00:00:49.63, start: 0.021333, bitrate: 5643 kb/s<br>    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5505 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)<br>    Metadata:<br>      handler_name    : VideoHandler<br>    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 129 kb/s (default)<br>    Metadata:<br>      handler_name    : SoundHandler'<br>ffmpeg: '[swscaler @ 0x4414e60] deprecated pixel format used, make sure you did set range correctly<br>Output #0, avi, to '/home/iksrazal/Desktop/ml27/interchange/ml27/videofiles/output.avi':<br>  Metadata:<br>    major_brand     : isom<br>    minor_version   : 512<br>    compatible_brands: isomiso2avc1mp41<br>    ISFT            : Lavf56.40.101<br>    Stream #0:0(eng): Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 10000 kb/s, 30 fps, 30 tbn, 30 tbc (default)<br>    Metadata:<br>      handler_name    : VideoHandler<br>      encoder         : Lavc56.60.100 mjpeg<br>Stream mapping:<br>  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))<br>Press [q] to stop, [?] for help'<br>EXTRACT AUDIO:<br>/usr/local/bin/ffmpeg_harvid -i /home/iksrazal/output.mp4 -ac 2 -map 0:1 -vn -acodec pcm_f32le -y /home/iksrazal/Desktop/ml27/interchange/ml27/videofiles/output.avi.wav (null) (null) <br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.pending<br>saved state in 76.0 ms<br>actually writing state to /home/iksrazal/Desktop/ml27/ml27.tmp<br>renaming state to /home/iksrazal/Desktop/ml27/ml27.pending<br>saved state in 70.9 ms<br></div><div class="gmail_extra"><br></div></div>