Mailing List Archive

Playback issue with certain video
Hi all,

I basically think the video that comes from me camera is a bit naff
and upsets mythfrontend, so was wondering if anyone fancied testing it
on their system. 14MB sample below:

http://dl.dropbox.com/u/419095/2012-10-20-mythvideo/2012-09-09_16-32-30.AVI

I get a ton of errors when playing this in mythfrontend, but it does
seem to play OK in VLC and the like. Kdenlive video editor does have
an audio issue with these clips as well, which is why I think it is
the video at fault.

Full log below, but it is essentially full of:

2012-10-20 17:29:52.661934 N Player(0): Waited 102ms for video
buffers Afffffffffffffffffffffffffff

and

2012-10-20 17:29:53.063261 N Player(0): Timed out waiting for frames, and
there are not enough free frames. Discarding buffered frames.

and

2012-10-20 17:29:53.455631 I Player(0): Video is 3.44964 frames ahead of audio,
doubling video frame interval to slow down.


I saw the following also:

2012-10-20 17:29:51.471908 E ALSA: Requested 500000us got 256000 buffer time
2012-10-20 17:29:51.472042 E ALSA: Try to manually increase audio
buffer with: echo 128 | sudo tee
/proc/asound/card0/pcm3p/sub0/prealloc

Tried running that command, but with no luck.

This may also be an issue:

2012-10-20 17:29:51.468870 E AFD: Unknown video codec - defaulting to MPEG2

So if anyone can test on their systems, that would be much
appreciated, just so I know if I have an issue here or not

Thanks

Martin

Full log - http://pastebin.com/mBb8NhGb
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Playback issue with certain video [ In reply to ]
I haven't tried playing it on my myth box, but I can tell you it's MJPEG, not MPEG2, which might be why your myth box is having trouble with it. File seems OK for an MJPEG file though, it's 30fps at 640x480 resolution. The audio is 8-bit PCM, mono, 8KHz, which is unusual and could also be the source of the problem.

HTH

Mark

On 20 Oct 2012, at 18:26, Martin Moores wrote:

> Hi all,
>
> I basically think the video that comes from me camera is a bit naff
> and upsets mythfrontend, so was wondering if anyone fancied testing it
> on their system. 14MB sample below:
>
> http://dl.dropbox.com/u/419095/2012-10-20-mythvideo/2012-09-09_16-32-30.AVI
>
> I get a ton of errors when playing this in mythfrontend, but it does
> seem to play OK in VLC and the like. Kdenlive video editor does have
> an audio issue with these clips as well, which is why I think it is
> the video at fault.
>
> Full log below, but it is essentially full of:
>
> 2012-10-20 17:29:52.661934 N Player(0): Waited 102ms for video
> buffers Afffffffffffffffffffffffffff
>
> and
>
> 2012-10-20 17:29:53.063261 N Player(0): Timed out waiting for frames, and
> there are not enough free frames. Discarding buffered frames.
>
> and
>
> 2012-10-20 17:29:53.455631 I Player(0): Video is 3.44964 frames ahead of audio,
> doubling video frame interval to slow down.
>
>
> I saw the following also:
>
> 2012-10-20 17:29:51.471908 E ALSA: Requested 500000us got 256000 buffer time
> 2012-10-20 17:29:51.472042 E ALSA: Try to manually increase audio
> buffer with: echo 128 | sudo tee
> /proc/asound/card0/pcm3p/sub0/prealloc
>
> Tried running that command, but with no luck.
>
> This may also be an issue:
>
> 2012-10-20 17:29:51.468870 E AFD: Unknown video codec - defaulting to MPEG2
>
> So if anyone can test on their systems, that would be much
> appreciated, just so I know if I have an issue here or not
>
> Thanks
>
> Martin
>
> Full log - http://pastebin.com/mBb8NhGb
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Playback issue with certain video [ In reply to ]
On Sunday, 21 October 2012, Mark Greenwood wrote:

>
> I haven't tried playing it on my myth box, but I can tell you it's MJPEG,
> not MPEG2, which might be why your myth box is having trouble with it. File
> seems OK for an MJPEG file though, it's 30fps at 640x480 resolution. The
> audio is 8-bit PCM, mono, 8KHz, which is unusual and could also be the
> source of the problem.
>
>
> The format of the audio is irrelevant, myth will perform any conversion on
the fly as required and is able to play 8, 16, 24, 32 bits integer and
float audio
Re: Playback issue with certain video [ In reply to ]
On 20 October 2012 22:37, Jean-Yves Avenard <jean-yves@avenard.org> wrote:
>
>
> On Sunday, 21 October 2012, Mark Greenwood wrote:
>>
>>
>> I haven't tried playing it on my myth box, but I can tell you it's MJPEG,
>> not MPEG2, which might be why your myth box is having trouble with it. File
>> seems OK for an MJPEG file though, it's 30fps at 640x480 resolution. The
>> audio is 8-bit PCM, mono, 8KHz, which is unusual and could also be the
>> source of the problem.
>>
>>
> The format of the audio is irrelevant, myth will perform any conversion on
> the fly as required and is able to play 8, 16, 24, 32 bits integer and float
> audio
>

Thanks for the replies both. If Myth doesn't know what it is and
guesses wrong, then I guess that could be the issue. I have no idea
how to tell though.

Hopefully someone will get chance to take a look

Cheers

Martin
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Playback issue with certain video [ In reply to ]
On 21 Oct 2012, at 11:40, Martin Moores wrote:

> On 20 October 2012 22:37, Jean-Yves Avenard <jean-yves@avenard.org> wrote:
>>
>>
>> On Sunday, 21 October 2012, Mark Greenwood wrote:
>>>
>>>
>>> I haven't tried playing it on my myth box, but I can tell you it's MJPEG,
>>> not MPEG2, which might be why your myth box is having trouble with it. File
>>> seems OK for an MJPEG file though, it's 30fps at 640x480 resolution. The
>>> audio is 8-bit PCM, mono, 8KHz, which is unusual and could also be the
>>> source of the problem.
>>>
>>>
>> The format of the audio is irrelevant, myth will perform any conversion on
>> the fly as required and is able to play 8, 16, 24, 32 bits integer and float
>> audio
>>
>
> Thanks for the replies both. If Myth doesn't know what it is and
> guesses wrong, then I guess that could be the issue. I have no idea
> how to tell though.
>
> Hopefully someone will get chance to take a look

OK I've tried it on my myth box (0.25) and I get similar playback errors to you - it plays but it stutters.

Mine does recognise it as MJPG :

2012-10-21 14:26:53.641 AFD: Opened codec 0xa3092d10, id(MJPEG) type(Video)
2012-10-21 14:26:53.641 AFD: codec PCM_U8 has 1 channels
2012-10-21 14:26:53.641 AFD: codec PCM_U8 has 1 channels
2012-10-21 14:26:53.641 AFD: Opened codec 0xa3093580, id(PCM_U8) type(Audio)
2012-10-21 14:26:53.923 AO: Resampling from 8 kHz to 32 kHz with quality medium
2012-10-21 14:26:53.951 AO: Opening audio device 'hdmi:CARD=NVidia,DEV=0' ch 2(1) sr 32000 sf signed 32 bit reenc 0
2012-10-21 14:26:53.962 AudioPlayer: Enabling Audio

After that I get loads of

2012-10-21 14:26:59.551 Player(3): Waited 100ms for video buffers ffffffffffffffffffffffAf
2012-10-21 14:26:59.551 Player(3): Timed out waiting for frames, and
there are not enough free frames. Discarding buffered frames.
2012-10-21 14:26:59.560 Player(3): Waited 100ms for video buffers AAAAAAAAAAAAAAAAAAAAAAAA
2012-10-21 14:27:00.096 ALSA, Error: WriteAudio: buffer underrun
2012-10-21 14:27:00.823 Player(3): Waited 100ms for video buffers fffffffffffffffffffffAff

etc etc.

As an experiment I bunged it into avidemux and tried two variants:

Copy the video stream but convert the audio to MP3 - same playback problem.
Convert the video to x264 but keep the audio stream the same - plays perfectly.

So it's either something dodgy with your file (avidemux thinks it's fine) or myth has issues with MJPG.

Mark

Mark


>
> Cheers
>
> Martin
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Playback issue with certain video [ In reply to ]
On 21 October 2012 14:41, Mark Greenwood <fatgerman@gmail.com> wrote:
>
> On 21 Oct 2012, at 11:40, Martin Moores wrote:
>
>> On 20 October 2012 22:37, Jean-Yves Avenard <jean-yves@avenard.org> wrote:
>>>
>>>
>>> On Sunday, 21 October 2012, Mark Greenwood wrote:
>>>>
>>>>
>>>> I haven't tried playing it on my myth box, but I can tell you it's MJPEG,
>>>> not MPEG2, which might be why your myth box is having trouble with it. File
>>>> seems OK for an MJPEG file though, it's 30fps at 640x480 resolution. The
>>>> audio is 8-bit PCM, mono, 8KHz, which is unusual and could also be the
>>>> source of the problem.
>>>>
>>>>
>>> The format of the audio is irrelevant, myth will perform any conversion on
>>> the fly as required and is able to play 8, 16, 24, 32 bits integer and float
>>> audio
>>>
>>
>> Thanks for the replies both. If Myth doesn't know what it is and
>> guesses wrong, then I guess that could be the issue. I have no idea
>> how to tell though.
>>
>> Hopefully someone will get chance to take a look
>
> OK I've tried it on my myth box (0.25) and I get similar playback errors to you - it plays but it stutters.
>
> Mine does recognise it as MJPG :
>
> 2012-10-21 14:26:53.641 AFD: Opened codec 0xa3092d10, id(MJPEG) type(Video)
> 2012-10-21 14:26:53.641 AFD: codec PCM_U8 has 1 channels
> 2012-10-21 14:26:53.641 AFD: codec PCM_U8 has 1 channels
> 2012-10-21 14:26:53.641 AFD: Opened codec 0xa3093580, id(PCM_U8) type(Audio)
> 2012-10-21 14:26:53.923 AO: Resampling from 8 kHz to 32 kHz with quality medium
> 2012-10-21 14:26:53.951 AO: Opening audio device 'hdmi:CARD=NVidia,DEV=0' ch 2(1) sr 32000 sf signed 32 bit reenc 0
> 2012-10-21 14:26:53.962 AudioPlayer: Enabling Audio
>
> After that I get loads of
>
> 2012-10-21 14:26:59.551 Player(3): Waited 100ms for video buffers ffffffffffffffffffffffAf
> 2012-10-21 14:26:59.551 Player(3): Timed out waiting for frames, and
> there are not enough free frames. Discarding buffered frames.
> 2012-10-21 14:26:59.560 Player(3): Waited 100ms for video buffers AAAAAAAAAAAAAAAAAAAAAAAA
> 2012-10-21 14:27:00.096 ALSA, Error: WriteAudio: buffer underrun
> 2012-10-21 14:27:00.823 Player(3): Waited 100ms for video buffers fffffffffffffffffffffAff
>
> etc etc.
>
> As an experiment I bunged it into avidemux and tried two variants:
>
> Copy the video stream but convert the audio to MP3 - same playback problem.
> Convert the video to x264 but keep the audio stream the same - plays perfectly.
>
> So it's either something dodgy with your file (avidemux thinks it's fine) or myth has issues with MJPG.
>
> Mark
>
> Mark

Mark,

Much appreciated you giving it a go, thanks, now I know it is not my
system as such, but a possibly bad video file.

Devs, what's the best thing to do about this? If it is the video that
is bad, then no further action of course, as it is not a myth issue.
But I guess it is possible it's a myth/linux issue? Is it the ffmpeg
guys that need to look at this, wasn't sure if it needed reporting
there.

Cheers

Martin
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Playback issue with certain video [ In reply to ]
On 10/22/2012 03:56 AM, Martin Moores wrote:
> On 21 October 2012 14:41, Mark Greenwood <fatgerman@gmail.com> wrote:
>> On 21 Oct 2012, at 11:40, Martin Moores wrote:
>>
>>> On 20 October 2012 22:37, Jean-Yves Avenard <jean-yves@avenard.org> wrote:
>>>>
>>>> On Sunday, 21 October 2012, Mark Greenwood wrote:
>>>>>
>>>>> I haven't tried playing it on my myth box, but I can tell you it's MJPEG,
>>>>> not MPEG2, which might be why your myth box is having trouble with it. File
>>>>> seems OK for an MJPEG file though, it's 30fps at 640x480 resolution. The
>>>>> audio is 8-bit PCM, mono, 8KHz, which is unusual and could also be the
>>>>> source of the problem.
>>>>>
>>>>>
>>>> The format of the audio is irrelevant, myth will perform any conversion on
>>>> the fly as required and is able to play 8, 16, 24, 32 bits integer and float
>>>> audio
>>>>
>>> Thanks for the replies both. If Myth doesn't know what it is and
>>> guesses wrong, then I guess that could be the issue. I have no idea
>>> how to tell though.
>>>
>>> Hopefully someone will get chance to take a look
>> OK I've tried it on my myth box (0.25) and I get similar playback errors to you - it plays but it stutters.
>>
>> Mine does recognise it as MJPG :
>>
>> 2012-10-21 14:26:53.641 AFD: Opened codec 0xa3092d10, id(MJPEG) type(Video)
>> 2012-10-21 14:26:53.641 AFD: codec PCM_U8 has 1 channels
>> 2012-10-21 14:26:53.641 AFD: codec PCM_U8 has 1 channels
>> 2012-10-21 14:26:53.641 AFD: Opened codec 0xa3093580, id(PCM_U8) type(Audio)
>> 2012-10-21 14:26:53.923 AO: Resampling from 8 kHz to 32 kHz with quality medium
>> 2012-10-21 14:26:53.951 AO: Opening audio device 'hdmi:CARD=NVidia,DEV=0' ch 2(1) sr 32000 sf signed 32 bit reenc 0
>> 2012-10-21 14:26:53.962 AudioPlayer: Enabling Audio
>>
>> After that I get loads of
>>
>> 2012-10-21 14:26:59.551 Player(3): Waited 100ms for video buffers ffffffffffffffffffffffAf
>> 2012-10-21 14:26:59.551 Player(3): Timed out waiting for frames, and
>> there are not enough free frames. Discarding buffered frames.
>> 2012-10-21 14:26:59.560 Player(3): Waited 100ms for video buffers AAAAAAAAAAAAAAAAAAAAAAAA
>> 2012-10-21 14:27:00.096 ALSA, Error: WriteAudio: buffer underrun
>> 2012-10-21 14:27:00.823 Player(3): Waited 100ms for video buffers fffffffffffffffffffffAff
>>
>> etc etc.
>>
>> As an experiment I bunged it into avidemux and tried two variants:
>>
>> Copy the video stream but convert the audio to MP3 - same playback problem.
>> Convert the video to x264 but keep the audio stream the same - plays perfectly.
>>
>> So it's either something dodgy with your file (avidemux thinks it's fine) or myth has issues with MJPG.
>>
>> Mark
>>
>> Mark
> Mark,
>
> Much appreciated you giving it a go, thanks, now I know it is not my
> system as such, but a possibly bad video file.
>
> Devs, what's the best thing to do about this? If it is the video that
> is bad, then no further action of course, as it is not a myth issue.
> But I guess it is possible it's a myth/linux issue? Is it the ffmpeg
> guys that need to look at this, wasn't sure if it needed reporting
> there.
>
> Cheers
>
> Martin
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
i think this is also related to tickets #10706
<http://code.mythtv.org/trac/ticket/10706> and #10942
<http://code.mythtv.org/trac/ticket/10942> all 3 samples use
FF_BUFFER_TYPE_INTERNAL buffers. commenting out the if
(!decode.contains(*it)) in the function
VideoBuffers::DoneDisplayingFrame(VideoFrame *frame) makes the videos
for ticket #10706 and this video to play correctly. all 3 videos show
that there's mostly finished(displayed but still in decode queue) frames
so i think the issue is mythtv isnt removing these frames from the
decode list and after a while it just runs out of frames and has to drop
all frames to continue playback.
Re: Playback issue with certain video [ In reply to ]
On 22 October 2012 01:54, Shawn King <slackerlinux85@gmail.com> wrote:
>
> i think this is also related to tickets #10706<http://code.mythtv.org/trac/ticket/10706>and
> #10942 <http://code.mythtv.org/trac/ticket/10942> all 3 samples use
> FF_BUFFER_TYPE_INTERNAL buffers. commenting out the if
> (!decode.contains(*it)) in the function
> VideoBuffers::DoneDisplayingFrame(VideoFrame *frame) makes the videos for
> ticket #10706 and this video to play correctly. all 3 videos show that
> there's mostly finished(displayed but still in decode queue) frames so i
> think the issue is mythtv isnt removing these frames from the decode list
> and after a while it just runs out of frames and has to drop all frames to
> continue playback.
>
> Shawn,

Great, thanks for the further detail and links. I will post a comment with
my sample on the ticket(s) and leave it at that, if it is already in the
system so to speak, then that is fine.

Thanks all!

Martin