Open JesseYang-CQ opened 7 years ago
Hi JesseYang,
You are probably using a too old version of ffmpeg. Did you try to install the ffmpeg version from the testing repository of ubuntu or debian ? There are two API to use the LivAv and I have written code only for the newest API. On my side I am working on Archlinux. My gcc version is the 6.3.1, libavcodec is 57.64.101, libavformat is 57.56.10, and libavutil is 55.34.100.
Hi Xavier, Thank you for help, i am working on ubuntu14.04, here is detail configuration, i really confused what‘s wrong with it? ffmpeg version 3.2.3 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.2.0 (GCC) configuration: --enable-shared --prefix=/usr/local/ffmpeg 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 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100
Jesse
Hi xmar,
it‘s me again, i've already compliled the software successful, but when i'm trying to run it, problem happened,
./trans -c Config.ini
Path to the ini file: Config.ini
Uncatched exception: No such node (Global.startFrame)
another question i want to know from you, is it possible to transform Equirectangular video to EquirectangularTiled layout? and can you give me some suggestion about the configure.ini? thanks a lot.
Hi Jesse,
The error message you get ("No such node (Global.startFrame)") means that in the section [Global] of your configuration file, you miss the field startFrame. You should add for instance "startFrame=0"
Regarding the transformation from Equirectangular to EquirectangularTiled, it is indeed possible to do it. Here an example configuration: = = = = = = ======== [Global] fps=24 layoutFlow= [["PathToYourInputPng.png", "Equirectangular", "EquirectangularTiled"]] displayFinalPict=false videoOutputName=TtTest.png videoOutputCodec=png videoOutputBitRate=0 qualityOutputName = qualityToComputeList = [] nbFrames= 1 startFrame= 0
[Equirectangular] type=equirectangular upscale=false refWidth=3840 refHeight=2040 rotation= {"type":"euler", "yaw":0.0, "pitch":0.0, "roll":0.0} relativeResolution=true width=1 height=1 bitrate=1 offsetRatio=0
[EquirectangularTiled] type=equirectangularTiled refWidth=3840 refHeight=2040 relativeResolution=true rotation= {"type":"euler", "yaw":0.0, "pitch":0.0, "roll":0.0} nbHTiles=8 nbVTiles=8 hTileRation_0=0.1 hTileRation_1=0.2 hTileRation_2=0.25 hTileRation_3=0.25 hTileRation_4=0.25 hTileRation_5=0.25 hTileRation_6=0.2 hTileRation_7=0.1 vTileRation_0=0.1 vTileRation_1=0.2 vTileRation_2=0.25 vTileRation_3=0.25 vTileRation_4=0.25 vTileRation_5=0.25 vTileRation_6=0.2 vTileRation_7=0.1 upscale=false useTile=false equirectangularTile_0_0=0.25 equirectangularTileBitrate_0_0=0.25 equirectangularTile_0_1=0.25 equirectangularTileBitrate_0_1=0.25 equirectangularTile_0_2=0.25 equirectangularTileBitrate_0_2=0.25 equirectangularTile_0_3=0.25 equirectangularTileBitrate_0_3=0.25 equirectangularTile_0_4=0.25 equirectangularTileBitrate_0_4=0.25 equirectangularTile_0_5=0.25 equirectangularTileBitrate_0_5=0.25 equirectangularTile_0_6=0.25 equirectangularTileBitrate_0_6=0.25 equirectangularTile_0_7=0.25 equirectangularTileBitrate_0_7=0.25 equirectangularTile_1_0=0.25 equirectangularTileBitrate_1_0=0.25 equirectangularTile_1_1=0.5 equirectangularTileBitrate_1_1=0.25 equirectangularTile_1_2=0.5 equirectangularTileBitrate_1_2=0.25 equirectangularTile_1_3=0.5 equirectangularTileBitrate_1_3=0.25 equirectangularTile_1_4=0.5 equirectangularTileBitrate_1_4=0.25 equirectangularTile_1_5=0.5 equirectangularTileBitrate_1_5=0.25 equirectangularTile_1_6=0.5 equirectangularTileBitrate_1_6=0.25 equirectangularTile_1_7=0.25 equirectangularTileBitrate_1_7=0.25 equirectangularTile_2_0=0.25 equirectangularTileBitrate_2_0=0.25 equirectangularTile_2_1=0.5 equirectangularTileBitrate_2_1=1 equirectangularTile_2_2=0.75 equirectangularTileBitrate_2_2=1 equirectangularTile_2_3=0.75 equirectangularTileBitrate_2_3=1 equirectangularTile_2_4=0.75 equirectangularTileBitrate_2_4=1 equirectangularTile_2_5=0.75 equirectangularTileBitrate_2_5=1 equirectangularTile_2_6=0.5 equirectangularTileBitrate_2_6=0.25 equirectangularTile_2_7=0.25 equirectangularTileBitrate_2_7=0.25 equirectangularTile_3_0=0.25 equirectangularTileBitrate_3_0=0.25 equirectangularTile_3_1=0.5 equirectangularTileBitrate_3_1=1 equirectangularTile_3_2=0.75 equirectangularTileBitrate_3_2=1 equirectangularTile_3_3=1 equirectangularTileBitrate_3_3=1 equirectangularTile_3_4=1 equirectangularTileBitrate_3_4=1 equirectangularTile_3_5=0.75 equirectangularTileBitrate_3_5=1 equirectangularTile_3_6=0.5 equirectangularTileBitrate_3_6=0.25 equirectangularTile_3_7=0.25 equirectangularTileBitrate_3_7=0.25 equirectangularTile_4_0=0.25 equirectangularTileBitrate_4_0=0.25 equirectangularTile_4_1=0.5 equirectangularTileBitrate_4_1=1 equirectangularTile_4_2=0.75 equirectangularTileBitrate_4_2=1 equirectangularTile_4_3=1 equirectangularTileBitrate_4_3=1 equirectangularTile_4_4=1 equirectangularTileBitrate_4_4=1 equirectangularTile_4_5=0.75 equirectangularTileBitrate_4_5=1 equirectangularTile_4_6=0.5 equirectangularTileBitrate_4_6=0.25 equirectangularTile_4_7=0.25 equirectangularTileBitrate_4_7=0.25 equirectangularTile_5_0=0.25 equirectangularTileBitrate_5_0=0.25 equirectangularTile_5_1=0.5 equirectangularTileBitrate_5_1=1 equirectangularTile_5_2=0.75 equirectangularTileBitrate_5_2=1 equirectangularTile_5_3=0.75 equirectangularTileBitrate_5_3=1 equirectangularTile_5_4=0.75 equirectangularTileBitrate_5_4=1 equirectangularTile_5_5=0.75 equirectangularTileBitrate_5_5=1 equirectangularTile_5_6=0.5 equirectangularTileBitrate_5_6=0.25 equirectangularTile_5_7=0.25 equirectangularTileBitrate_5_7=0.25 equirectangularTile_6_0=0.25 equirectangularTileBitrate_6_0=0.25 equirectangularTile_6_1=0.5 equirectangularTileBitrate_6_1=1 equirectangularTile_6_2=0.5 equirectangularTileBitrate_6_2=1 equirectangularTile_6_3=0.5 equirectangularTileBitrate_6_3=1 equirectangularTile_6_4=0.5 equirectangularTileBitrate_6_4=1 equirectangularTile_6_5=0.5 equirectangularTileBitrate_6_5=1 equirectangularTile_6_6=0.5 equirectangularTileBitrate_6_6=0.25 equirectangularTile_6_7=0.25 equirectangularTileBitrate_6_7=0.25 equirectangularTile_7_0=0.25 equirectangularTileBitrate_7_0=0.25 equirectangularTile_7_1=0.25 equirectangularTileBitrate_7_1=0.25 equirectangularTile_7_2=0.25 equirectangularTileBitrate_7_2=0.25 equirectangularTile_7_3=0.25 equirectangularTileBitrate_7_3=0.25 equirectangularTile_7_4=0.25 equirectangularTileBitrate_7_4=0.25 equirectangularTile_7_5=0.25 equirectangularTileBitrate_7_5=0.25 equirectangularTile_7_6=0.25 equirectangularTileBitrate_7_6=0.25 equirectangularTile_7_7=0.25 equirectangularTileBitrate_7_7=0.25 bitrate=1 offsetRatio=0 = = = = = = ========
This configuration file take a png equirectangular image with resolution 3840x2048, and transform it into an equirectangularTiled png image. There is 8x8 tiles and each tile may have a different resolution. If you want to encode each tile in independent videos you should set the option "useTile" to true and use for instance a libx265 codec and a mp4 contains (in the global section).
I hope this will help you.
Hi Xavier, when i update my gcc version, and run the "make" the problem happens, i tried to add the extern “C” in the writer and reader.cpp, but still does work? would you help me to have a look at what's wrong?
../LibAvWrapper/libLibAvWrapper.a(VideoWriter.cpp.o): In function
IMT::LibAv::VideoWriter::EncodeAndWrite(AVFrame*, int)': VideoWriter.cpp:(.text+0x116): undefined reference to
avcodec_send_frame' VideoWriter.cpp:(.text+0x1b8): undefined reference toav_packet_unref' VideoWriter.cpp:(.text+0x1e5): undefined reference to
avcodec_receive_packet' VideoWriter.cpp:(.text+0x1f7): undefined reference toav_packet_unref' VideoWriter.cpp:(.text+0x206): undefined reference to
av_frame_unref' VideoWriter.cpp:(.text+0x21a): undefined reference toav_frame_free' ../LibAvWrapper/libLibAvWrapper.a(VideoWriter.cpp.o): In function
IMT::LibAv::VideoWriter::EncodeAndWrite(cv::Mat const&, int)': VideoWriter.cpp:(.text+0x2b9): undefined reference toav_frame_alloc' ../LibAvWrapper/libLibAvWrapper.a(VideoReader.cpp.o): In function
ToMat(AVCodecContext, AVFrame)': VideoReader.cpp:(.text+0x8de): undefined reference toav_frame_alloc' VideoReader.cpp:(.text+0xc8d): undefined reference to
av_frame_unref' VideoReader.cpp:(.text+0xc97): undefined reference toav_frame_free' ../LibAvWrapper/libLibAvWrapper.a(VideoReader.cpp.o): In function
IMT::LibAv::VideoReader::DecodeNextStep()': VideoReader.cpp:(.text+0x109b): undefined reference toav_frame_alloc' VideoReader.cpp:(.text+0x10c4): undefined reference to
avcodec_send_packet' VideoReader.cpp:(.text+0x10e1): undefined reference toavcodec_receive_frame' VideoReader.cpp:(.text+0x126d): undefined reference to
av_frame_unref' VideoReader.cpp:(.text+0x12d9): undefined reference toav_frame_free' VideoReader.cpp:(.text+0x12e3): undefined reference to
av_packet_unref' VideoReader.cpp:(.text+0x133f): undefined reference toavcodec_send_packet' VideoReader.cpp:(.text+0x135c): undefined reference to
av_frame_alloc' VideoReader.cpp:(.text+0x1418): undefined reference toavcodec_receive_frame' VideoReader.cpp:(.text+0x1479): undefined reference to
av_frame_free' VideoReader.cpp:(.text+0x153d): undefined reference to `av_frame_unref' collect2: error: ld returned 1 exit status make[2]: [MainProject/trans] Error 1 make[1]: [MainProject/CMakeFiles/trans.dir/all] Error 2 make: *** [all] Error 2jesse