public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Pyle <kpyle@austin.rr.com>
To: Ryley Angus <ryleyjangus@gmail.com>,
	'Hans Verkuil' <hverkuil@xs4all.nl>,
	linux-media@vger.kernel.org
Subject: Re: [RFC] Fix interrupted recording with Hauppauge HD-PVR
Date: Tue, 08 Apr 2014 15:11:09 -0500	[thread overview]
Message-ID: <534457DD.4000406@austin.rr.com> (raw)
In-Reply-To: <00e901cf534d$15fd4220$41f7c660$@gmail.com>

On 04/08/14 12:07, Ryley Angus wrote:
> Hi Kyle.
>
> It may be possible that the delay in acceptable grace periods is due to a
> difference in our input AV sources more so than the Hauppauge units
> themselves. I'm wondering if it would be useful to control the timeout
> period via a module parameter that defaults to 3 seconds perhaps?
>
> As far as the issues with concatenated output, I've just looked at the files
> containing a channel change and realized that VLC does show the duration as
> 0:00. Seeking with a keyboard isn't functional. Seeking with the timeline
> and a mouse is fine. Avidemux seems to have trouble editing the file. If I
> cut a section from a file that is from a single recording "session" it's
> duration is correct, sync is correct and audio properties are correct. I
> cannot cut across segments. MPC-HC also has duration issues with the
> recording.
>
> If I run the recordings through "ffmpeg -fflags +genpts -I <INPUT> -c:v copy
> -c:a copy <OUTPUT>", the resultant file duration is correct in VLC, I can
> seek with the keyboard and mouse and editing is perfect with Avidemux. But
> would it be better if the device just cleanly stopped recording instead of
> automatically resuming? Or, continuing with the module parameters idea,
> could we determine whether or not it will automatically restart based off a
> module parameter?
>
> I feel bad for not noticing the VLC issues earlier, but I mostly just use
> VLC to broadcast the recordings through my home network to client instances
> of VLC. This works well, but obviously seeking isn't relevant.
>
> ryley
>
> ...
I doubt that the multiple segment problem can be easily fixed in the 
hdpvr Linux driver.  With the caveat that I'm far away from being an 
expert on MPEG, TS, and the like, I believe that the HD-PVR encoder 
generates the timing data into the stream with its origin being defined 
when the encoder starts the stream.  So, if the capture is restarted, 
the encoder is re-initialized by the HD-PVR firmware and the result is a 
new origin for the following stream segment.

The only real fix would be in the HD-PVR firmware - which we can't get 
and is why we have this problem in the first place.

Regardless of this problem, I think the proposed driver patch is a 
distinct improvement over the current situation.  Without the patch, we 
get truncated recordings.  With the patch, we get nearly complete 
recordings which have skip issues.  As you noted, this problem may be 
fixed with ffmpeg.

Keith


  reply	other threads:[~2014-04-08 20:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07  0:04 [RFC] Fix interrupted recording with Hauppauge HD-PVR Ryley Angus
2014-04-07 14:07 ` Hans Verkuil
2014-04-08  3:32   ` Ryley Angus
2014-04-08 14:28     ` Keith Pyle
2014-04-08 17:07       ` Ryley Angus
2014-04-08 20:11         ` Keith Pyle [this message]
2014-05-09 11:08         ` Hans Verkuil
2014-05-09 19:39           ` Keith Pyle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=534457DD.4000406@austin.rr.com \
    --to=kpyle@austin.rr.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=ryleyjangus@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox