Giter Club home page Giter Club logo

gpxoverlay's Issues

ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

On my mac, after installation I have the following error.

python3 overlay_speed.py

ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[image2 @ 0x7fbf18008a00] Could find no file with path 'temp/speed%d.png' and index in the range 0-4
temp/speed%d.png: No such file or directory
Traceback (most recent call last):
  File "/Users/bonaime/git/GPXOverlay/examples/overlay_speed.py", line 77, in <module>
    convert_overlay_to_video(frame_name_format, output_overlay_path, fps)
  File "/Users/bonaime/git/GPXOverlay/GPXOverlay/overlay.py", line 23, in convert_overlay_to_video
    ffmpeg
  File "/usr/local/lib/python3.9/site-packages/ffmpeg/_run.py", line 325, in run
    raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

Overlay_elevation example is broken

(video) C:\Users\antip\Documents\GPXOverlay\examples>python overlay_elevation.py
Traceback (most recent call last):
File "overlay_elevation.py", line 14, in
main()
File "overlay_elevation.py", line 9, in main
elevation_overlay = overlay.Overlay('sample-data-short.gpx', 'video.mp4')
AttributeError: module 'GPXOverlay.overlay' has no attribute 'Overlay'

Win10, python 3.8. Other examples work.

Random noise pixels in transparent pngs when using imgkit (wkhtmltopdf)

System info

  • Windows 10 Pro (1903)
  • Python 3.6.1-amd64 (64-bit)
  • ffmpeg 4.3.1
  • wkhtmltopdf 0.12.6
  • Python packages:
beautifulsoup4==4.9.1
ffmpeg-python==0.2.0
imgkit==1.0.2
Jinja2==2.11.2
matplotlib==3.3.1
numpy==1.19.1
Pillow==7.2.0

Issue

When each overlay frame is created, the top of the png image has some random noise. It seems to be an existing unresolved upstream issue with wkhtmltopdf (see issue wkhtmltopdf/wkhtmltopdf#2629). The affected lines in GPXOverlay/frame.py should be

# Use imgkit to generate png from temporary HTML file
options = {'quiet': '', 'transparent': '', 'width': 500, "crop-w":500, 'disable-smart-width': ''} 
imgkit.from_file('temp/updated_speed.html', f'temp/speed{id}.png', options=options, css=SPEED_CSS_PATH) 

speed0

Missing audio on output video after FFmpeg overlay

Issue

As mentioned in #5 (review), when the GPS data video is overlayed on the original input video, the audio stream is dropped. According to ffmpeg-python documentation,

Some ffmpeg filters drop audio streams, and care must be taken to preserve the audio in the final output. The .audio and .video operators can be used to reference the audio/video portions of a stream so that they can be processed separately and then re-combined later in the pipeline. This dilemma is intrinsic to ffmpeg, and ffmpeg-python tries to stay out of the way while users may refer to the official ffmpeg documentation as to why certain filters drop audio.

TODO

  • Find proper way to keep audio stream without distortion or any modification
  • Test on Windows and macOS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.