Re: [vdr] TV Standards option for vdr-1.5.x
You may want to try the attached patch. It determines FramesPerSec by having a look at the first picture of the recording and falls back to the FRAMESPERSEC macro otherwise. The current implementation requires that the recording was taken with cVideoRepacker enabled. Furthermore it must be MPEG2. The file marks.vdr still uses FRAMEPERSEC for compatibility. Plugins like dvd, burn, mp3, mplayer, etc. still use FRAMESPERSEC. Although this patch is against VDR-1.4.6, it applies with some offset also against VDR-1.5.1. Thanks! Im using this patch with vdr-1.5.1 and it has fixed my problems with the incorrect time of recordings for NTSC. Before I had hardcoded it to 30, but this is much more accurate. Good job. I think this should be integrated into vdr along with a switch to set the default tv standard to 25/30. Best Regards. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
Stone wrote: Hi, In all the prevous versions of VDR, I have had to patch the FRAMESPERSECOND and change the rest of the hardcoded PAL values in VDR for my NTSC television. Is making this an option in VDR on the TODO list? I never had to patch my VDR to make it play NTSC properly. Have you ever tried the videosystem plugin? I have been using it for quite some time and it always worked flawlessly. It can be found here: http://www.vdr-portal.de/board/thread.php?threadid=43516 For VDR 1.4.4 You need a patch to make it compile without errors. This one can be found here: http://www.linuxtv.org/pipermail/vdr/2006-December/011336.html Simply save the: vdr-videosystem-0.0.1-uint64-0001.bin. Let us know how if it worked and how well. André ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
On 3/13/07, André Weidemann [EMAIL PROTECTED] wrote: I never had to patch my VDR to make it play NTSC properly. Have you ever tried the videosystem plugin? I have been using it for quite some time and it always worked flawlessly. NTSC users shouldn't have to use a plugin to provide NTSC compatibility. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
I never had to patch my VDR to make it play NTSC properly. Have you ever tried the videosystem plugin? I have been using it for quite some time and it always worked flawlessly. It can be found here: http://www.vdr-portal.de/board/thread.php?threadid=43516 VDR will play video fine w/o patching the code. But, the improper framerate will calculate incorrect times on the video. Also, the OSD will be sized differently when 720x480 is used instead of the hardcoded value of 720x576. Regards. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
For VDR 1.4.4 You need a patch to make it compile without errors. This one can be found here: http://www.linuxtv.org/pipermail/vdr/2006-December/011336.html Simply save the: vdr-videosystem-0.0.1-uint64-0001.bin. Let us know how if it worked and how well. It seems this plugin assumes I am currently using PAL. The plugin takes the OSD-Settings from VDR as PAL-settings and calculates the corresponding NTSC-settings. But, my television does not do both PAL and NTSC, so if this plugin assumes that I currently have PAL setup properly, wouldnt it calculate improper values for NTSC? I dont understand how it can generate proper NTSC values from PAL settings that I am not using. Best Regards. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
Stone wrote: I never had to patch my VDR to make it play NTSC properly. Have you ever tried the videosystem plugin? I have been using it for quite some time and it always worked flawlessly. It can be found here: http://www.vdr-portal.de/board/thread.php?threadid=43516 VDR will play video fine w/o patching the code. But, the improper framerate will calculate incorrect times on the video. Also, the OSD will be sized differently when 720x480 is used instead of the hardcoded value of 720x576. The plugin will take care of the OSD resizing for sure. That was the main reason I installed it. Regarding the time display... I'm not quite sure if the plugin also takes care of the correct calculation of time for the progress bar and such things, but you can give a try and see how it turns out. André ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
On 3/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Stone wrote: It seems this plugin assumes I am currently using PAL. The plugin takes the OSD-Settings from VDR as PAL-settings and calculates the corresponding NTSC-settings. But, my television does not do both PAL and NTSC, so if this plugin assumes that I currently have PAL setup properly, wouldnt it calculate improper values for NTSC? I dont understand how it can generate proper NTSC values from PAL settings that I am not using. My TV can handle both PAL and NTSC. Nevertheless, the OSD is resized and everything is displayed correctly when playing NTSC content. I might be way off here..., but I assume that since all TV-standard values in VDR are hardcoded to PAL, it is safe to use those values to calculate the correct OSD size for NTSC material. It just seems like I would have to translate my NTSC values into PAL, and then put those PAL values into VDR so that the plugin will read them as PAL and translate them back again to NTSC. Right now they are PAL settings with NTSC values. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
Stone wrote: It just seems like I would have to translate my NTSC values into PAL, and then put those PAL values into VDR so that the plugin will read them as PAL and translate them back again to NTSC. Right now they are PAL settings with NTSC values. This makes absolutely no sense to me. Why don't you simply grab a plain VDR 1.4.6 without any patches and try the plugin out? It only takes 3-4 minutes to set it up and you'll see whether or not it will work correctly. Using the plugin was only a suggestion for the time being. I thought you might want to use it until things might be changed in some future version of VDR. I thought of it as an easy to use option instead of patching the VDR every time a new version comes out. That's it... André ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
This makes absolutely no sense to me. Why don't you simply grab a plain VDR 1.4.6 without any patches and try the plugin out? It only takes 3-4 minutes to set it up and you'll see whether or not it will work correctly. Using the plugin was only a suggestion for the time being. I thought you might want to use it until things might be changed in some future version of VDR. I thought of it as an easy to use option instead of patching the VDR every time a new version comes out. That's it... I do appreciate the suggestion and I will take a better look at it. I was just trying to conceptually understand whats going on. All I was trying to say is that I dont think the plugin can generate valid NTSC values from invalid PAL settings. I'll post my results. Best Regards. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
I think I'll stick to what I said earlier in that support for NTSC should really be a core feature of VDR. I have no interest in running a plugin like this and would rather just stick to patching VDR if Klaus doesn't intend to address this issue. :\ ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
On 3/13/07, VDR User [EMAIL PROTECTED] wrote: I think I'll stick to what I said earlier in that support for NTSC should really be a core feature of VDR. I have no interest in running a plugin like this and would rather just stick to patching VDR if Klaus doesn't intend to address this issue. :\ That plugin is only beneficial if you have a dual PAL/NTSC environment. It does not help with the frames per second calculatons at all. Regards. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] TV Standards option for vdr-1.5.x
Hi, Stone wrote: That plugin is only beneficial if you have a dual PAL/NTSC environment. It does not help with the frames per second calculatons at all. You may want to try the attached patch. It determines FramesPerSec by having a look at the first picture of the recording and falls back to the FRAMESPERSEC macro otherwise. The current implementation requires that the recording was taken with cVideoRepacker enabled. Furthermore it must be MPEG2. The file marks.vdr still uses FRAMEPERSEC for compatibility. Plugins like dvd, burn, mp3, mplayer, etc. still use FRAMESPERSEC. Although this patch is against VDR-1.4.6, it applies with some offset also against VDR-1.5.1. Bye. -- Dipl.-Inform. (FH) Reinhard Nissl mailto:[EMAIL PROTECTED] diff -Nurp ../vdr-1.4.6-orig/dvbplayer.c ./dvbplayer.c --- ../vdr-1.4.6-orig/dvbplayer.c 2006-04-17 14:45:48.0 +0200 +++ ./dvbplayer.c 2007-03-13 23:19:51.0 +0100 @@ -182,8 +182,8 @@ bool cNonBlockingFileReader::WaitForData #define PLAYERBUFSIZE MEGABYTE(1) -// The number of frames to back up when resuming an interrupted replay session: -#define RESUMEBACKUP (10 * FRAMESPERSEC) +// The number of seconds to back up when resuming an interrupted replay session: +#define RESUMEBACKUP 10 class cDvbPlayer : public cPlayer, cThread { private: @@ -196,6 +196,7 @@ private: cFileName *fileName; cIndexFile *index; cUnbufferedFile *replayFile; + int framesPerSec; bool eof; bool firstPacket; ePlayModes playMode; @@ -225,6 +226,7 @@ public: void Goto(int Position, bool Still = false); virtual bool GetIndex(int Current, int Total, bool SnapToIFrame = false); virtual bool GetReplayMode(bool Play, bool Forward, int Speed); + int GetFramesPerSec(void) { return framesPerSec; } }; #define MAX_VIDEO_SLOWMOTION 63 // max. arg to pass to VIDEO_SLOWMOTION // TODO is this value correct? @@ -253,6 +255,7 @@ cDvbPlayer::cDvbPlayer(const char *FileN replayFile = fileName-Open(); if (!replayFile) return; + framesPerSec = replayFile-GetFramesPerSec(); ringBuffer = new cRingBufferFrame(PLAYERBUFSIZE); // Create the index file: index = new cIndexFile(FileName, false); @@ -341,7 +344,7 @@ bool cDvbPlayer::Save(void) if (index) { int Index = writeIndex; if (Index = 0) { -Index -= RESUMEBACKUP; +Index -= RESUMEBACKUP * GetFramesPerSec(); if (Index 0) Index = index-GetNextIFrame(Index, false); else @@ -371,7 +374,7 @@ void cDvbPlayer::Action(void) readIndex = Resume(); if (readIndex = 0) - isyslog(resuming replay at index %d (%s), readIndex, *IndexToHMSF(readIndex, true)); + isyslog(resuming replay at index %d (%s), readIndex, *IndexToHMSF(readIndex, true, GetFramesPerSec())); nonBlockingFileReader = new cNonBlockingFileReader; int Length = 0; @@ -665,7 +668,7 @@ void cDvbPlayer::SkipSeconds(int Seconds Empty(); int Index = writeIndex; if (Index = 0) { -Index = max(Index + Seconds * FRAMESPERSEC, 0); +Index = max(Index + Seconds * GetFramesPerSec(), 0); if (Index 0) Index = index-GetNextIFrame(Index, false, NULL, NULL, NULL, true); if (Index = 0) @@ -832,3 +835,10 @@ void cDvbPlayerControl::Goto(int Positio if (player) player-Goto(Position, Still); } + +int cDvbPlayerControl::GetFramesPerSec() +{ + if (player) + return player-GetFramesPerSec(); + return FRAMESPERSEC; +} diff -Nurp ../vdr-1.4.6-orig/dvbplayer.h ./dvbplayer.h --- ../vdr-1.4.6-orig/dvbplayer.h 2002-06-23 12:13:51.0 +0200 +++ ./dvbplayer.h 2007-03-13 23:19:51.0 +0100 @@ -54,6 +54,8 @@ public: void Goto(int Index, bool Still = false); // Positions to the given index and displays that frame as a still picture // if Still is true. + int GetFramesPerSec(); + // Returns the number of frames per second for the current recording. }; #endif //__DVBPLAYER_H diff -Nurp ../vdr-1.4.6-orig/menu.c ./menu.c --- ../vdr-1.4.6-orig/menu.c 2006-12-02 12:12:02.0 +0100 +++ ./menu.c 2007-03-13 23:19:51.0 +0100 @@ -3931,7 +3931,7 @@ bool cReplayControl::ShowProgress(bool I lastCurrent = lastTotal = -1; } if (Total != lastTotal) { -displayReplay-SetTotal(IndexToHMSF(Total)); +displayReplay-SetTotal(IndexToHMSF(Total, false, GetFramesPerSec())); if (!Initial) displayReplay-Flush(); } @@ -3939,7 +3939,7 @@ bool cReplayControl::ShowProgress(bool I displayReplay-SetProgress(Current, Total); if (!Initial) displayReplay-Flush(); -displayReplay-SetCurrent(IndexToHMSF(Current, displayFrames)); +displayReplay-SetCurrent(IndexToHMSF(Current, displayFrames, GetFramesPerSec())); displayReplay-Flush(); lastCurrent = Current; } @@ -3971,8 +3971,8 @@ void cReplayControl::TimeSearchProcess(e { #define STAY_SECONDS_OFF_END 10