Hi everybody,
I'm pleased to announce version 0.0.3 of my cut-a-lot-plugin.
From the history: 2007-05-17: Version 0.0.3
- Added the ability to adjust PTS while cutting
- Changed the menu label named "Commands" to "Cut-a-Lot" in order to avoid confusions with the original recording menu. (Suggested by FireFly@vdr-portal)
From the readme: Adjust PTS: -----------
The adjustment of PTS (see http://www.vdr-wiki.de/wiki/index.php/PTS) can be switched on and off in the setup. Having selected "no" does not end in any differences to the original Multi-cut-process. Is "to first I-frame" or "to zero" selected, all PTS values are going to be adjusted. The PTS of the first I-frame is then either set to its old value or to zero. All following PTS' will be adjusted relativly.
What was the motivation? I joined two recordings and generated a new index-file with the genindex-utility. Watching the new recording worked very good, but burning it with ProjectX as the demuxer ends in an incomplete recording. The log-file has a message containing "big PTS difference". I did not find any setup-options in order to solve that problem, so I did it on my own adapting the cut-a-lot-plugin.
So how to proceed if "big PTS difference" occurs in a recording during the burn process? At first, one has to remove all cutting marks but the first one, which has to be on the position 0:00:00.01. Then one has to run cut-a-lot in the Mulit-cut mode, having "Adjust PTS" in the setup point to "to first I-frame" or "to zero". Afterwards the cut recording should work with ProjectX without any error.
I use it with vdr-version 1.4.4 with big patch applied. I cannot say anything about compiling and running on other environments.
You can download it from the vdr-forum: http://vdr-portal.de/board/thread.php?threadid=64354
I am open for any tips, bugs or optimizations.
DMH
On 5/17/07, Marius Heidenstecker marius@heidenstecker.de wrote:
Hi everybody,
I'm pleased to announce version 0.0.3 of my cut-a-lot-plugin.
I really like the idea behind this. Can you tell me what the recommended PTS threshhold should be for NTSC recordings? It seems like this will only work with PAL.
Best Regards.
Am Donnerstag, 17. Mai 2007 22:01 schrieb Stone:
On 5/17/07, Marius Heidenstecker marius@heidenstecker.de wrote:
Hi everybody,
I'm pleased to announce version 0.0.3 of my cut-a-lot-plugin.
I really like the idea behind this. Can you tell me what the recommended PTS threshhold should be for NTSC recordings? It seems like this will only work with PAL.
Best Regards.
From the readme: The PTS-threshold as a parameter defines how large a gap has to be at least in order to be marked. One PTS-tick is 1 / 90000 second. If you take 25 frames per second as the frame-rate, one frame is 1 / 25 * 90000 = 3600 PTS-ticks long. Usually there is an I-frame every 12 frames so the difference between two I-frame PTSs should be always 12 * 3600 = 43200 ticks. But never the less the difference were sometimes 43199 or 43201 in a few analyzed recordings. So I introduced the PTS-threshold. The default of 3605 ticks means the PTS-timestamp might jump one frame without being recognized.
If you take 30 frames per sec for NTSC-recordings, you will have 1 / 30 * 90000 = 3000 PTS-ticks. So you should try 3005 for the PTS-threshold. Am I right, that you talk about the gap finder? Please let me know, if that threshold worked.
Cheers,
DMH
If you take 30 frames per sec for NTSC-recordings, you will have 1 / 30 * 90000 = 3000 PTS-ticks. So you should try 3005 for the PTS-threshold. Am I right, that you talk about the gap finder? Please let me know, if that threshold worked.
Thank you. Yes, the gap finder is what I am interested in. Previously, if i had several cuts in some recordings, the PTS would become desynced in the final cut and Vdrsync would no longer be able to demux the recordings without having to drop many frames.
Best Regards.
On 5/18/07, Stone syphyr@gmail.com wrote:
If you take 30 frames per sec for NTSC-recordings, you will have 1 / 30
90000 = 3000 PTS-ticks. So you should try 3005 for the PTS-threshold. Am I right, that you talk about the gap finder? Please let me know, if that threshold worked.
Thank you. Yes, the gap finder is what I am interested in. Previously, if i had several cuts in some recordings, the PTS would become desynced in the final cut and Vdrsync would no longer be able to demux the recordings without having to drop many frames.
Sorry, I forgot to ask one more thing. Do you have a patch for vdr-1.5.x?
ccache g++-3.4 -g -O2 -Wall -Woverloaded-virtual -fPIC -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"cutalot"' -I/usr/src/DVB/linux/include -I../../../include cutalot.c ccache g++-3.4 -g -O2 -Wall -Woverloaded-virtual -fPIC -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"cutalot"' -I/usr/src/DVB/linux/include -I../../../include cal-cutter.c In file included from cal-cutter.c:11: cal-mpeg.h:11: error: `uint64' does not name a type cal-mpeg.h:35: error: `pts_t' does not name a type cal-mpeg.h:36: error: `pts_t' does not name a type cal-mpeg.h:38: error: `pts_t' has not been declared cal-mpeg.h:38: error: ISO C++ forbids declaration of `Pts' with no type cal-mpeg.h:44: error: `pts_t' was not declared in this scope cal-mpeg.h:44: error: expected primary-expression before "bool" cal-mpeg.h:45: error: `pts_t' was not declared in this scope cal-mpeg.h:45: error: expected primary-expression before "bool" cal-cutter.c: In member function `virtual void cCalCuttingThread::Action()': cal-cutter.c:184: error: `pts_t' was not declared in this scope cal-cutter.c:184: error: expected `;' before "iFramePts" cal-cutter.c:221: error: `iFramePts' was not declared in this scope cal-cutter.c:221: error: 'class cCalPES' has no member named 'GetPTS' cal-cutter.c:222: error: `newIFramePts' was not declared in this scope cal-cutter.c:222: warning: unused variable 'newIFramePts' cal-cutter.c:223: error: `newIFramePts' was not declared in this scope cal-cutter.c:231: error: 'class cCalPES' has no member named 'GetPTS' cal-cutter.c:231: error: `iFramePts' was not declared in this scope cal-cutter.c:234: error: `newIFramePts' was not declared in this scope cal-cutter.c:237: error: `newPts' was not declared in this scope cal-cutter.c:237: warning: unused variable 'newPts' cal-cutter.c:239: error: `newPts' was not declared in this scope cal-cutter.c:239: warning: unused variable 'newPts' cal-cutter.c:241: error: `newPts' was not declared in this scope cal-cutter.c:241: warning: unused variable 'newPts' cal-cutter.c:244: error: `newPts' was not declared in this scope cal-cutter.c:231: warning: unused variable 'iFramePts' cal-cutter.c:244: warning: unused variable 'newPts' cal-cutter.c:184: warning: unused variable 'pts_t' make[1]: *** [cal-cutter.o] Error 1
Best Regards.
Am Freitag, 18. Mai 2007 00:32 schrieb Stone:
On 5/18/07, Stone syphyr@gmail.com wrote:
If you take 30 frames per sec for NTSC-recordings, you will have 1 / 30
90000 = 3000 PTS-ticks. So you should try 3005 for the PTS-threshold. Am I right, that you talk about the gap finder? Please let me know, if that threshold worked.
Thank you. Yes, the gap finder is what I am interested in. Previously, if i had several cuts in some recordings, the PTS would become desynced in the final cut and Vdrsync would no longer be able to demux the recordings without having to drop many frames.
Sorry, I forgot to ask one more thing. Do you have a patch for vdr-1.5.x?
ccache g++-3.4 -g -O2 -Wall -Woverloaded-virtual -fPIC -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"cutalot"' -I/usr/src/DVB/linux/include -I../../../include cutalot.c ccache g++-3.4 -g -O2 -Wall -Woverloaded-virtual -fPIC -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"cutalot"' -I/usr/src/DVB/linux/include -I../../../include cal-cutter.c In file included from cal-cutter.c:11: cal-mpeg.h:11: error: `uint64' does not name a type cal-mpeg.h:35: error: `pts_t' does not name a type cal-mpeg.h:36: error: `pts_t' does not name a type cal-mpeg.h:38: error: `pts_t' has not been declared cal-mpeg.h:38: error: ISO C++ forbids declaration of `Pts' with no type cal-mpeg.h:44: error: `pts_t' was not declared in this scope cal-mpeg.h:44: error: expected primary-expression before "bool" cal-mpeg.h:45: error: `pts_t' was not declared in this scope cal-mpeg.h:45: error: expected primary-expression before "bool" cal-cutter.c: In member function `virtual void cCalCuttingThread::Action()': cal-cutter.c:184: error: `pts_t' was not declared in this scope cal-cutter.c:184: error: expected `;' before "iFramePts" cal-cutter.c:221: error: `iFramePts' was not declared in this scope cal-cutter.c:221: error: 'class cCalPES' has no member named 'GetPTS' cal-cutter.c:222: error: `newIFramePts' was not declared in this scope cal-cutter.c:222: warning: unused variable 'newIFramePts' cal-cutter.c:223: error: `newIFramePts' was not declared in this scope cal-cutter.c:231: error: 'class cCalPES' has no member named 'GetPTS' cal-cutter.c:231: error: `iFramePts' was not declared in this scope cal-cutter.c:234: error: `newIFramePts' was not declared in this scope cal-cutter.c:237: error: `newPts' was not declared in this scope cal-cutter.c:237: warning: unused variable 'newPts' cal-cutter.c:239: error: `newPts' was not declared in this scope cal-cutter.c:239: warning: unused variable 'newPts' cal-cutter.c:241: error: `newPts' was not declared in this scope cal-cutter.c:241: warning: unused variable 'newPts' cal-cutter.c:244: error: `newPts' was not declared in this scope cal-cutter.c:231: warning: unused variable 'iFramePts' cal-cutter.c:244: warning: unused variable 'newPts' cal-cutter.c:184: warning: unused variable 'pts_t' make[1]: *** [cal-cutter.o] Error 1
Best Regards.
Didn't check it out, but it seems that VDR-1.5 doesn't use uint64 as a type any more. You could try changing line 11 of cal-mpeg.h from
typedef uint64 pts_t;
to
typedef unsigned long long int pts_t;
Please let me know, if that helped out. :o)
DMH
On 05/18/07 10:01, Marius Heidenstecker wrote:
Am Freitag, 18. Mai 2007 00:32 schrieb Stone:
On 5/18/07, Stone syphyr@gmail.com wrote:
If you take 30 frames per sec for NTSC-recordings, you will have 1 / 30
90000 = 3000 PTS-ticks. So you should try 3005 for the PTS-threshold. Am I right, that you talk about the gap finder? Please let me know, if that threshold worked.
Thank you. Yes, the gap finder is what I am interested in. Previously, if i had several cuts in some recordings, the PTS would become desynced in the final cut and Vdrsync would no longer be able to demux the recordings without having to drop many frames.
Sorry, I forgot to ask one more thing. Do you have a patch for vdr-1.5.x?
ccache g++-3.4 -g -O2 -Wall -Woverloaded-virtual -fPIC -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"cutalot"' -I/usr/src/DVB/linux/include -I../../../include cutalot.c ccache g++-3.4 -g -O2 -Wall -Woverloaded-virtual -fPIC -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"cutalot"' -I/usr/src/DVB/linux/include -I../../../include cal-cutter.c In file included from cal-cutter.c:11: cal-mpeg.h:11: error: `uint64' does not name a type cal-mpeg.h:35: error: `pts_t' does not name a type cal-mpeg.h:36: error: `pts_t' does not name a type cal-mpeg.h:38: error: `pts_t' has not been declared cal-mpeg.h:38: error: ISO C++ forbids declaration of `Pts' with no type cal-mpeg.h:44: error: `pts_t' was not declared in this scope cal-mpeg.h:44: error: expected primary-expression before "bool" cal-mpeg.h:45: error: `pts_t' was not declared in this scope cal-mpeg.h:45: error: expected primary-expression before "bool" cal-cutter.c: In member function `virtual void cCalCuttingThread::Action()': cal-cutter.c:184: error: `pts_t' was not declared in this scope cal-cutter.c:184: error: expected `;' before "iFramePts" cal-cutter.c:221: error: `iFramePts' was not declared in this scope cal-cutter.c:221: error: 'class cCalPES' has no member named 'GetPTS' cal-cutter.c:222: error: `newIFramePts' was not declared in this scope cal-cutter.c:222: warning: unused variable 'newIFramePts' cal-cutter.c:223: error: `newIFramePts' was not declared in this scope cal-cutter.c:231: error: 'class cCalPES' has no member named 'GetPTS' cal-cutter.c:231: error: `iFramePts' was not declared in this scope cal-cutter.c:234: error: `newIFramePts' was not declared in this scope cal-cutter.c:237: error: `newPts' was not declared in this scope cal-cutter.c:237: warning: unused variable 'newPts' cal-cutter.c:239: error: `newPts' was not declared in this scope cal-cutter.c:239: warning: unused variable 'newPts' cal-cutter.c:241: error: `newPts' was not declared in this scope cal-cutter.c:241: warning: unused variable 'newPts' cal-cutter.c:244: error: `newPts' was not declared in this scope cal-cutter.c:231: warning: unused variable 'iFramePts' cal-cutter.c:244: warning: unused variable 'newPts' cal-cutter.c:184: warning: unused variable 'pts_t' make[1]: *** [cal-cutter.o] Error 1
Best Regards.
Didn't check it out, but it seems that VDR-1.5 doesn't use uint64 as a type any more. You could try changing line 11 of cal-mpeg.h from
typedef uint64 pts_t;
to
typedef unsigned long long int pts_t;
From VDR/HISTORY:
2006-12-03: Version 1.4.4-1
- Replaced 'unsigned long' with 'uint32_t' and 'uint64' with 'uint64_t' to avoid problems on 64-bit machines.
2006-12-03: Version 1.4.4-2
- Added a compatibility define for 'uint64' to tools.h, so that existing plugins don't need to be modified immediately (reported by Suur Karu). This will be removed in version 1.5.
So you may want to use uint64_t.
Klaus
So you may want to use uint64_t.
Thanks again. This works:
--- cutalot-0.0.3/cal-mpeg.h.orig 2007-05-18 06:20:53.000000000 -0700 +++ cutalot-0.0.3/cal-mpeg.h 2007-05-18 06:22:08.000000000 -0700 @@ -8,7 +8,7 @@
#include <vdr/tools.h>
-typedef uint64 pts_t; +typedef uint64_t pts_t;
#define MAX_PTS 8589934591LL #define NO_PTS 8589934592LL