Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issues related to ffmpeg being deprecated. #14

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sudo apt install libopencv-dev
- Install FFmpeg

```bash
sudo apt install ffmpeg
sudo apt install ffmpeg libpostproc-dev libavdevice-dev libavfilter-dev
```

- Install Eigen3
Expand Down
4 changes: 2 additions & 2 deletions cmake_modules/Findffmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ set(libdir "/usr/lib/x86_64-linux-gnu")
set(FFMPEG_LIBDIR "/usr/lib/x86_64-linux-gnu")
set(FFMPEG_INCLUDE_DIRS "/usr/include/x86_64-linux-gnu")
set(FFMPEG_FOUND 1)
set(FFMPEG_LIBRARIES "-L${FFMPEG_LIBDIR} -lavcodec -lavformat -lpostproc -lavdevice -lavresample -lswresample -lavfilter -lswscale -lavutil")
string(STRIP "${FFMPEG_LIBRARIES}" FFMPEG_LIBRARIES)
set(FFMPEG_LIBRARIES "-L${FFMPEG_LIBDIR} -lavcodec -lavformat -lpostproc -lavdevice -lswresample -lavfilter -lswscale -lavutil")
string(STRIP "${FFMPEG_LIBRARIES}" FFMPEG_LIBRARIES)
6 changes: 4 additions & 2 deletions gopro_to_asl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "VideoExtractor.h"
#include "color_codes.h"

#include <fstream>

using namespace std;
namespace fs = std::experimental::filesystem;

Expand Down Expand Up @@ -159,7 +161,7 @@ int main(int argc, char* argv[]) {
ROS_INFO_STREAM("[ACCL] Payloads: " << accl_queue.size());
ROS_INFO_STREAM("[GYRO] Payloads: " << gyro_queue.size());

ofstream imu_stream;
std::ofstream imu_stream;
imu_stream.open(imu_file);
imu_stream << std::fixed << std::setprecision(19);
imu_stream << "#timestamp [ns],w_RS_S_x [rad s^-1],w_RS_S_y [rad s^-1],w_RS_S_z [rad s^-1],"
Expand Down Expand Up @@ -196,4 +198,4 @@ int main(int argc, char* argv[]) {
imu_stream.close();

return 0;
}
}
2 changes: 1 addition & 1 deletion include/VideoExtractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class GoProVideoExtractor {
AVFormatContext* pFormatContext = NULL;
uint32_t videoStreamIndex;
AVCodecContext* pCodecContext = NULL;
AVCodec* pCodec = NULL;
// AVCodec* pCodec = NULL;
AVFrame* pFrame = NULL;
AVFrame* pFrameRGB = NULL;
AVPacket packet;
Expand Down
2 changes: 1 addition & 1 deletion launch/gopro_to_rosbag.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<arg name="multiple_files" default="false"/>
<arg name="rosbag" default="/home/bjoshi/gopro_cave/GX010013.bag"/>
<arg name="scale" default="0.5"/>
<arg name="compressed_image_format" default="true"/>
<arg name="compressed_image_format" default="false"/>
<arg name="grayscale" default="true"/>
<arg name="display_images" default="false"/>

Expand Down
Loading