You are not logged in.
- Topics: Active | Unanswered
#1 05-02-2015 00:36:48
- alexg
- Nouveau membre
- Registered: 04-30-2015
- Posts: 2
Adaptation of 2.1 to 14.10 with a .deb)
Hello,
I tried to compile ffDiaporama 2.1 to debian 14.10.
Since libav has changed since then, I had to change the code a bit (failing and retrying).
I don't know all those lib, I just tried to resolve compilations problems with a logical solution.
Here is a .deb that works for a simple project on my PC : http://ilfrancese.free.fr/ffdiaporama/f … -alexg.deb
I detail here what I've done, I can also push my bzr branch, but I don't really now anything about launchpad, so I need help from the normal release managers.
The story :
The first thing that made ffDiaporama 2.1 impossible to install on 10.14 was a dependency to libavresample1 which is no more available.
Looking around in launchpad, I see the recipe stuff.
So I just tried to change the dependency in the debian package specification, starting from the 1404 in a new branch 1410
I Cloned the repository and made my changes :
$bzr branch lp:~ffdiaporamateam/ffdiaporama/debian_stable_1404 debian_stable_1410
$ bzr diff
=== modified file 'debian/control'
--- debian/control 2014-04-21 05:34:12 +0000
+++ debian/control 2015-04-29 22:37:26 +0000
@@ -9,7 +9,7 @@
Package: ffdiaporama
Architecture: any
Depends:
- libqt5help5, libqt5svg5, libqt5sql5-sqlite, qt5-image-formats-plugins, libav-tools, libavcodec-extra, libavresample1,
+ libqt5help5, libqt5svg5, libqt5sql5-sqlite, qt5-image-formats-plugins, libav-tools, libavcodec-extra, libavresample2,
${misc:Depends},
${shlibs:Depends}
Description:Movie creator
$bzr commit
I also cloned ffDiaporama 2.1 branch :
$bzr bzr branch lp:ffdiaporama/2.1 ffdiaporama-2.1
In launchpad I found useful info on how to test my recipe :
https://help.launchpad.net/Packaging/So … ds/Recipes
So I adapt t the 10.04 recipe in a new one, with my local branches:
$ cat debian-stable-14.10.recipe
# bzr-builder format 0.3 deb-version 2.1.20140209~{revno}~{time}
debian_stable_1410
nest ffDiaporama ffdiaporama-2.1 ffDiaporama
nest ffDiaporama-rsc lp:~ffdiaporamateam/ffdiaporama-rsc/2.1 ffDiaporama_rsc
I then found more usefull doc to be able to build the dep https://help.launchpad.net/Packaging/So … BzrBuilder and https://www.netfort.gr.jp/~dancer/softw … r-doc.html
As my build fails, I need to enter in with a hook. That said, --hookdir didn't work but defining HOOKDIR in .pbuilderrc did…
So here is the pb I found, they were with two thing
* A rename of AVCodecID enum. see https://git.libav.org/?p=libav.git;a=co … 2d0e4c3d72
+2012-08-xx - xxxxxxx - lavc 54.25 - avcodec.h
+ Rename CodecID to AVCodecID and all CODEC_ID_* to AV_CODEC_ID_*.
* r_frame_rate was replaced by avg_frame_rate and duration_error disapeared (so no more need to free it in the code)
https://git.libav.org/?p=libav.git;a=co … e2fbcc3530
At the end :
$ bzr diff
=== modified file 'src/ffDiaporama/engine/_EncodeVideo.cpp'
--- src/ffDiaporama/engine/_EncodeVideo.cpp 2014-01-14 11:12:48 +0000
+++ src/ffDiaporama/engine/_EncodeVideo.cpp 2015-05-01 15:50:48 +0000
@@ -136,7 +136,6 @@
av_freep(&Container->streams[i]->codec->extradata);
av_freep(&Container->streams[i]->codec->subtitle_header);
av_freep(&Container->streams[i]->priv_data);
- if (Container->streams[i]->info) av_freep(&Container->streams[i]->info->duration_error);
}
//=== End of patch
avformat_free_context(Container);
@@ -185,11 +184,11 @@
int cEncodeVideo::getThreadFlags(AVCodecID ID) {
int Ret=0;
switch (ID) {
- case CODEC_ID_PRORES:
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_DVVIDEO:
- case CODEC_ID_MPEG2VIDEO: Ret=FF_THREAD_SLICE; break;
- case CODEC_ID_H264 : Ret=FF_THREAD_FRAME|FF_THREAD_SLICE; break;
+ case AV_CODEC_ID_PRORES:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_DVVIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO: Ret=FF_THREAD_SLICE; break;
+ case AV_CODEC_ID_H264 : Ret=FF_THREAD_FRAME|FF_THREAD_SLICE; break;
default: Ret=FF_THREAD_FRAME; break;
}
return Ret;
=== modified file 'src/ffDiaporama/engine/cBaseMediaFile.cpp'
--- src/ffDiaporama/engine/cBaseMediaFile.cpp 2014-02-09 09:43:37 +0000
+++ src/ffDiaporama/engine/cBaseMediaFile.cpp 2015-05-01 14:48:31 +0000
@@ -3024,7 +3024,7 @@
if (!FPSDuration) {
if (PreviewMode) FPSDuration=double(AV_TIME_BASE)/((cApplicationConfig *)ApplicationConfig)->PreviewFPS;
- else if (VideoStream) FPSDuration=double(VideoStream->r_frame_rate.den*AV_TIME_BASE)/double(VideoStream->r_frame_rate.num);
+ else if (VideoStream) FPSDuration=double(VideoStream->avg_frame_rate.den*AV_TIME_BASE)/double(VideoStream->avg_frame_rate.num);
else FPSDuration=double(AV_TIME_BASE)/double(SoundTrackBloc->SamplingRate);
}
// If position >= end of file : disable audio
@@ -3565,11 +3565,11 @@
int cVideoFile::getThreadFlags(AVCodecID ID) {
int Ret=0;
switch (ID) {
- case CODEC_ID_PRORES:
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_DVVIDEO:
- case CODEC_ID_MPEG2VIDEO: Ret=FF_THREAD_SLICE; break;
- case CODEC_ID_H264 : Ret=FF_THREAD_FRAME|FF_THREAD_SLICE; break;
+ case AV_CODEC_ID_PRORES:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_DVVIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO: Ret=FF_THREAD_SLICE; break;
+ case AV_CODEC_ID_H264 : Ret=FF_THREAD_FRAME|FF_THREAD_SLICE; break;
default: Ret=FF_THREAD_FRAME; break;
}
return Ret;
=== modified file 'src/ffDiaporama/engine/cDeviceModelDef.h'
--- src/ffDiaporama/engine/cDeviceModelDef.h 2014-01-17 15:22:16 +0000
+++ src/ffDiaporama/engine/cDeviceModelDef.h 2015-05-01 14:34:24 +0000
@@ -110,7 +110,7 @@
#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
#endif
-#if !defined(FF_API_CODEC_ID)
+#if !defined(FF_API_CODEC_ID) && (LIBAVCODEC_VERSION_MAJOR<54 || (LIBAVCODEC_VERSION_MAJOR==54 && LIBAVCODEC_VERSION_MINOR<25))
#define AV_CODEC_ID_NONE CODEC_ID_NONE
#define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
So I
$ bzr commit
And then pbuild worked !
Offline
#2 05-09-2015 01:08:31
- alexg
- Nouveau membre
- Registered: 04-30-2015
- Posts: 2
Re: Adaptation of 2.1 to 14.10 with a .deb)
[WARNING] with the above version I can't include video in ffDiaporama, it core dump ! However it is able to render photos to video.
Offline