Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

[PATCH] generic libavformat seek support (5)

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


mark at dclabs

May 13, 2005, 6:34 AM

Post #1 of 6 (747 views)
Permalink
[PATCH] generic libavformat seek support (5)

with johns file I have found another big bug in libavformat.
the packet structures are not initialised before av_read_packet.
in some instances, this structure is not filled by the underlying format, notably mpegts in this case.
This causes segfaults.
I have found now I that it seems in general more stable and snappy, finding and exiting at the end of file quite nicely. It should cause less packet errors due to this invalid data in previously used AVPacket header data (pts etc).
Ive made the fix generic just in case other formats do some nasty things and have left mpegts.c alone. overhead is minimal.
It now works for johns file, though I cant play the hd properly due to something in my video setup. the savage stuff just doesnt like the higher res and renders badly and slowly. but thats my problem. ;-)
please test with other formats to see what else crops up. but its looking more stable now.
exact seeks is still forced on for the moment. this is in AvformatDecoder::DoFastForward if you want to play.
will next check on mpeg seeking keyframes which doesnt happen at the moment.
avi part seeks keyframes ok for me.
ignore the guff for the moment. Ill remove it as soon as Im happy.
also for transcoding purposes, myths db indexing is also filled in in case a mythcommflag --video is desired. Not sure if this is desirable or not but thought some people might be relying on it.
cheers
mark
Attachments: mythtv_aviseek5.patch (18.9 KB)


tom at redpepperracing

May 13, 2005, 7:40 PM

Post #2 of 6 (735 views)
Permalink
Re: [PATCH] generic libavformat seek support (5) [In reply to]

Mark Spieth wrote:

> cheers
>
> mark
>
Applied, compiled and working on every file I tried it on.

Thanks!

Tom
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mark at dclabs

May 13, 2005, 8:21 PM

Post #3 of 6 (707 views)
Permalink
Re: [PATCH] generic libavformat seek support (5) [In reply to]

> Applied, compiled and working on every file I tried it on.

what type of files? Ive only tried avi(mpeg4), mpegps and mpegts nuv (sort
of)
need someone to test the other types such as .mov etc.
does the duration work on them all? Im still not sure on this.
does this include HD files?

Note this patch also has a fix for the timestamp wraparound problem. to do
so it subtracts the first native timestamp from all others. thus a mpeg2
would need to be >26.5 hours long to see it appen again (not very likely =)

cheers
mark

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tom at redpepperracing

May 13, 2005, 8:59 PM

Post #4 of 6 (700 views)
Permalink
Re: [PATCH] generic libavformat seek support (5) [In reply to]

Mark Spieth wrote:

>>Applied, compiled and working on every file I tried it on.
>>
>>
>
>what type of files? Ive only tried avi(mpeg4), mpegps and mpegts nuv (sort
>of)
>need someone to test the other types such as .mov etc.
>does the duration work on them all? Im still not sure on this.
>does this include HD files?
>
>
AVI's and PS nuv files. I'll try and scare up some other files. Duration
seems correct, skipping forward and back works as does jumping forward
and back. Timestretch works as well. I did get a segfault at the end of
one file, but I tried it again with the same file and it worked
correctly. Bookmarks also work correctly. The movie was widescreen, but
I don't know if that's considered HD? Regular SD TV works fine as well.

Tom
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


jppoet at gmail

May 13, 2005, 9:34 PM

Post #5 of 6 (729 views)
Permalink
Re: [PATCH] generic libavformat seek support (5) [In reply to]

On 5/13/05, Mark Spieth <mark [at] dclabs> wrote:
>
> with johns file I have found another big bug in libavformat.
> the packet structures are not initialised before av_read_packet.
> in some instances, this structure is not filled by the underlying format,
> notably mpegts in this case.
> This causes segfaults.
> I have found now I that it seems in general more stable and snappy, finding
> and exiting at the end of file quite nicely. It should cause less packet
> errors due to this invalid data in previously used AVPacket header data (pts
> etc).
> Ive made the fix generic just in case other formats do some nasty things and
> have left mpegts.c alone. overhead is minimal.
> It now works for johns file, though I cant play the hd properly due to
> something in my video setup. the savage stuff just doesnt like the higher
> res and renders badly and slowly. but thats my problem. ;-)
> please test with other formats to see what else crops up. but its looking
> more stable now.
> exact seeks is still forced on for the moment. this is in
> AvformatDecoder::DoFastForward if you want to play.
> will next check on mpeg seeking keyframes which doesnt happen at the moment.
> avi part seeks keyframes ok for me.
> ignore the guff for the moment. Ill remove it as soon as Im happy.
> also for transcoding purposes, myths db indexing is also filled in in case a
> mythcommflag --video is desired. Not sure if this is desirable or not but
> thought some people might be relying on it.
> cheers
> mark


Still no joy with the mpeg2 files I tried importing from my old
ReplayTV, but everything else I have tried has worked very nicely. I
have not tried any mov files, but I have tried some xvid and some
mpeg4 files.

When I skip forward or backward, the video smears badly for a couple
of seconds, but then settles down and looks fine. I don't skip around
much in these files, so it is no big deal, just wanted to report it
since mplayer does not have that problem.

Don't worry too much about those ReplayTV mpeg2 files, like I said,
they are probably not well formed. I can watch them if I have myth
transcode them into a mpeg4 file.

As it stands right now, it is very usable and useful. I have not been
able to get it to crash. I hope this gets included into the Myth CVS.

Thank you!

John
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mark at dclabs

May 13, 2005, 9:42 PM

Post #6 of 6 (727 views)
Permalink
Re: [PATCH] generic libavformat seek support (5) [In reply to]

> Still no joy with the mpeg2 files I tried importing from my old
> ReplayTV, but everything else I have tried has worked very nicely. I
> have not tried any mov files, but I have tried some xvid and some
> mpeg4 files.
>
> When I skip forward or backward, the video smears badly for a couple
> of seconds, but then settles down and looks fine. I don't skip around
> much in these files, so it is no big deal, just wanted to report it
> since mplayer does not have that problem.

I see this with mpeg2 but not avi.

> Don't worry too much about those ReplayTV mpeg2 files, like I said,
> they are probably not well formed. I can watch them if I have myth
> transcode them into a mpeg4 file.

Id still like to know why. I assume the last file was not one of these. do
you have a short one of these for me to test with?

> As it stands right now, it is very usable and useful. I have not been
> able to get it to crash. I hope this gets included into the Myth CVS.
yes I have the feeling that the crashworthiness is better now. a bit more
prompt at the end of the file exiting too.
still need to clean it up of course.
cheers
mark

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.