Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playback without audio #121

Open
447377 opened this issue Jun 23, 2018 · 6 comments
Open

Playback without audio #121

447377 opened this issue Jun 23, 2018 · 6 comments

Comments

@447377
Copy link

447377 commented Jun 23, 2018

Audio is ok for live TV, but a recording in the same resolution like live TV is without audio. You have to press exit and immediately press ok. Now the audio is ok. The same when you change the audio track or jumping forward or backward for a minute.
The reason is the commit 9b2c17f from Mar4, 2018, "Move VA-API HW device context initialization to video module". I did not manage the change back of this commit - the osd was gone. Please help me...

Thanks a lot
Stefan

VAAPIDEVICE SYSTEM INFORMATION REPORT

inxi
System:    Kernel: 4.12.14-lp150.12.4-default x86_64 bits: 64 gcc: 7.3.1 Console: tty 0
           Distro: openSUSE Leap 15.0                                                                                              
Machine:   Device: desktop System: Intel product: NUC7i3BNH v: J31191-312 serial: <filter>                                         
           Mobo: Intel model: NUC7i3BNB v: J22859-312 serial: <filter>                                                             
           UEFI: Intel v: BNKBL357.86A.0062.2018.0222.1644 date: 02/22/2018                                                        
CPU:       Dual core Intel Core i3-7100U (-HT-MCP-) arch: Kaby Lake rev.9 cache: 3072 KB                                           
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9600                                                        
           clock speeds: max: 2400 MHz 1: 2400 MHz 2: 2400 MHz 3: 2400 MHz 4: 2400 MHz                                             
Graphics:  Card: Intel HD Graphics 620 bus-ID: 00:02.0                                                                             
           Display Server: X.org 1.20.0 driver: intel tty size: 131x34 Advanced Data: N/A for root out of X                        
Audio:     Card Intel Sunrise Point-LP HD Audio driver: snd_hda_intel bus-ID: 00:1f.3                                              
           Sound: Advanced Linux Sound Architecture v: k4.12.14-lp150.12.4-default                                                 
vainfo
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.1.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSlice
      VAProfileVP9Profile2            : VAEntrypointVLD
ffmpeg
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (SUSE Linux)
libavutil      55. 78.100 / 55. 78.100
libavcodec     57.107.100 / 57.107.100
libavformat    57. 83.100 / 57. 83.100
libavdevice    57. 10.100 / 57. 10.100
libavfilter     6.107.100 /  6.107.100
libavresample   3.  7.  0 /  3.  7.  0
libswscale      4.  8.100 /  4.  8.100
libswresample   2.  9.100 /  2.  9.100
libpostproc    54.  7.100 / 54.  7.100
gcc
7
/usr/local/bin/svdrpsend
220 <filter> SVDRP VideoDiskRecorder 2.4.0; Sat Jun 23 12:35:42 2018; UTF-8
900- Frames: missed(0) duped(312) dropped(26) total(32554) PTS(22:34:34.538) drift(10) audio(348) video(0)
900- Video: mpeg2video/vaapi_vld 720x576i 16:9 @ 1920x1080 - Intel i965 driver for Intel(R) Kaby Lake - 2.1.0
900- Audio: mp2 48000Hz 2 channels
900 Command: vaapidevice -a hw:0,3 -d :0.0 -f -v va-api -w alsa-driver-broken
221 <filter> closing connection
@Quantomax
Copy link

The problem with playback - or in general - any change in the TS-Stream is, that there is only a sort of exit cleanup, but not any within init any more.

To get audio with playback start, you'll need to Re-Sync the decoder, by starting from a different format, e.g. if video is 720p, everything than that works, or reintroduce decoder cleanup:

`
--- a/vaapidev.c
+++ b/vaapidev.c
@@ -2198,10 +2198,10 @@
// tell video parser we get new stream
if (MyVideoStream->Decoder && !MyVideoStream->SkipStream) {
// clear buffers on close configured always or replay only

  •           if (MyVideoStream->ClearClose) {
    

+// if (MyVideoStream->ClearClose) {
Clear(); // flush all buffers
MyVideoStream->ClearClose = 0;

  •           }
    

+// }
if (MyVideoStream->CodecID != AV_CODEC_ID_NONE) {
MyVideoStream->NewStream = 1;
MyVideoStream->InvalidPesCounter = 0;
`

However, the hole playback is sort of broken with current git master. To get it right, you may apply this patch and (re-)enable SoftStart-Sync in Plugin-Settings.
https://www.vdr-portal.de/index.php?attachment/41989-speedupdown-patch-gz/

Regards,
42 :)

@447377
Copy link
Author

447377 commented Jun 29, 2018

Hello Quantomax,

thanks for the solution. The patch not only provides audio during playback, the "duped frames" are now also past.

Hopefully your patch will be included in the master soon.

Thanks a lot especially the guys for the care of the Vaapidevice-Plugin
Stefan

rofafor added a commit to rofafor/vdr-plugin-vaapidevice that referenced this issue Jun 30, 2018
@rofafor
Copy link
Contributor

rofafor commented Jun 30, 2018

The development has happened lately on ffmpeg demuxer branches and I integrated your patch into my branch. You can take a look at it here:
#122
https://github.com/rofafor/vdr-plugin-vaapidevice/tree/ffpesdemux

rofafor added a commit to rofafor/vdr-plugin-vaapidevice that referenced this issue Jun 30, 2018
rofafor added a commit to rofafor/vdr-plugin-vaapidevice that referenced this issue Jun 30, 2018
@447377
Copy link
Author

447377 commented Jul 1, 2018

Thanks for the udate of your branch. But now I have "dropped frames" on live tv and playback is with audio from the current live channel.
Stefan

@447377
Copy link
Author

447377 commented Jul 6, 2018

...and the audio and video is asynchronous - wether live tv or playback or the resolution.
Stefan

rofafor added a commit to rofafor/vdr-plugin-vaapidevice that referenced this issue Jul 20, 2018
rofafor added a commit to rofafor/vdr-plugin-vaapidevice that referenced this issue Jul 20, 2018
rofafor added a commit to rofafor/vdr-plugin-vaapidevice that referenced this issue Jul 21, 2018
rofafor added a commit to rofafor/vdr-plugin-vaapidevice that referenced this issue Jul 21, 2018
@447377
Copy link
Author

447377 commented Jul 22, 2018

Thanks for working on my problem.
Every few seconds a new picture is displayed, so it is not possible to play. The CPU load is very low. The OSD appears after a few seconds. Operation of the OSD is not possible

In the Log I notice:
[17662] VAAPI-ERROR: codec: can't find best stream: Stream not found
[17662] VAAPI-ERROR: codec: can't find stream info: End of file
[17659] ERROR: driver buffer overflow on device 1

Do you need more informations?
Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants