sidjy / mapillary-dashcam

Some scripts to be used with mapillary-tools to help uploading from Thinkware F770 dashcam
GNU General Public License v3.0
5 stars 1 forks source link

Extraction of GPS data seems not to work - script gives no result at all #2

Closed mettmaniac closed 7 years ago

mettmaniac commented 7 years ago

Hi,

I have been playing around with this for some time now, as I want to upload my F770 dashcam pictures to mapillary. However, the script seems not to work at all - a tmp.srt file is generated, but it is empty.

When running avconv with all parameters in the script, there is absolutely no result. Removing -loglevel 0 gives following output: avconv -nostats -i /home/veit/Downloads/dashcam/REC_2017_06_15_10_36_47_F.MP4 -an -vn -scodec copy tmp.srt ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xc6d400] unsupported color_parameter_type aclc Guessed Channel Layout for Input Stream #0.1 : mono Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/veit/Downloads/dashcam/REC_2017_06_15_10_36_47_F.MP4': Metadata: major_brand : avc1 minor_version : 0 compatible_brands: avc1isom creation_time : 2017-06-15 10:36:47 Duration: 00:01:00.80, start: 0.000000, bitrate: 11046 kb/s Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], 9986 kb/s, 30 fps, 30 tbr, 240k tbn, 60 tbc (default) Metadata: creation_time : 2017-06-15 10:36:47 handler_name : Ambarella AVC encoder : Ambarella AVC encoder Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 1 channels, s16, 768 kb/s (default) Metadata: creation_time : 2017-06-15 10:36:47 handler_name : Ambarella AAC Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574), 2 kb/s (default) Metadata: creation_time : 2017-06-15 10:36:47 handler_name : Ambarella EXT File 'tmp.srt' already exists. Overwrite ? [y/N] y [srt @ 0xc8a2c0] Unsupported subtitles codec: mov_text Output #0, srt, to 'tmp.srt': Metadata: major_brand : avc1 minor_version : 0 compatible_brands: avc1isom encoder : Lavf56.40.101 Stream #0:0(eng): Subtitle: mov_text (text / 0x74786574), 2 kb/s (default) Metadata: creation_time : 2017-06-15 10:36:47 handler_name : Ambarella EXT Stream mapping: Stream #0:2 -> #0:0 (copy) Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

An empty tmp.srt file is created.

sidjy commented 7 years ago

Hi,

I tryed the same command line on my MP4 files : it works and generates the tmp.srt file...perhaps Thinkware changed its encoding between different firmware versions? I will check which version of the firmware I use.

mettmaniac commented 7 years ago

Certainly - I am on v1.00.06. If you want, I can provide you with a .mp4 file.

sidjy commented 7 years ago

It seems I use the same firmware version! However, not the same avconv version (I use libav-tools packages on Debian Jessie, not ffmpeg). Here's what I get :

avconv -nostats -i REC_2017_06_10_16_20_56_F.MP4 -an -vn -scodec copy tmp.srt avconv version 11.9-6:11.9-1~deb8u1, Copyright (c) 2000-2017 the Libav developers built on Apr 23 2017 21:47:31 with gcc 4.9.2 (Debian 4.9.2-10) Guessed Channel Layout for Input Stream #0.1 : mono Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'REC_2017_06_10_16_20_56_F.MP4': Metadata: major_brand : avc1 minor_version : 0 compatible_brands: avc1isom creation_time : 2017-06-10 16:20:57 Duration: 00:01:00.80, start: 0.000000, bitrate: 11046 kb/s Stream #0.0(eng): Video: h264 (Main), yuvj420p, 1920x1080 [PAR 1:1 DAR 16:9], 9968 kb/s, 30 fps, 240k tbn, 60 tbc (default) Metadata: creation_time : 2017-06-10 16:20:57 encoder : Ambarella AVC encoder Stream #0.1(eng): Audio: pcm_s16be, 48000 Hz, 1 channels, s16, 768 kb/s (default) Metadata: creation_time : 2017-06-10 16:20:57 Stream #0.2(eng): Subtitle: text / 0x74786574, 2 kb/s (default) Metadata: creation_time : 2017-06-10 16:20:57 Output #0, srt, to 'tmp.srt': Metadata: major_brand : avc1 minor_version : 0 compatible_brands: avc1isom creation_time : 2017-06-10 16:20:57 encoder : Lavf56.1.0 Stream #0.0(eng): Subtitle: text / 0x74786574, 2 kb/s (default) Metadata: creation_time : 2017-06-10 16:20:57 Stream mapping: Stream #0:2 -> #0:0 (copy) Press ctrl-c to stop encoding size= 19kB time=60.60 bitrate= 2.6kbits/s
video:0kB audio:0kB other streams:19kB global headers:0kB muxing overhead: 0.000000%

mettmaniac commented 7 years ago

Would you be able to share that .mp4 with me? I am still suspecting some issue with the files, as apparently all functionality in Libav is supposed to be merged into ffmpeg...

mettmaniac commented 7 years ago

In fact, there is no need - this seems to be a problem with ffmpeg. I can replicate the problem on several machines with ffmpeg vs. Libav. Let me see if I can get the Libav avconv running on my machine...

sidjy commented 7 years ago

I now changed the command line for avconv (as I installed a new version on my machine and it did'nt work).

Now it works with following version : ffmpeg version 3.2.5-1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18) 20170516 configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...