Project

General

Profile

Testers needed

Added by Ukn Unknown over 1 year ago

I am trying to update TVH in order to transition from ffmpeg4 to ffmpeg5. One of the steps is: migrate is from 'codec' to 'codecpar'.
I modified the code in sections that I know how to test (transcoding), but I found that we need to change the code in a section that I am not familiar with (and I don't know how to exercise that section).
Based on location my guess is: Source IPTV with containers MPEGTS.
The branch that needs testing is:
https://github.com/uknunknown/tvheadend/tree/test_iptv_libav
I added a log in order to know when that section of code was executed:
"libav: * this is not an error: only to show that code was exercised *"
Please report if you see this log (in the log section of the browser) with results (working or not working).
If you want to move back and forth you can comment:

#define USE_CODECPAR

from:
/src/input/mpegts/iptv/iptv_libav.c
line: 29
and recompile.

for details check the thread:
https://github.com/tvheadend/tvheadend/pull/1460


Replies (10)

RE: Testers needed - Added by Kiril St. over 1 year ago

Ukn Unknown wrote:

I am trying to update TVH in order to transition from ffmpeg4 to ffmpeg5. One of the steps is: migrate is from 'codec' to 'codecpar'.
I modified the code in sections that I know how to test (transcoding), but I found that we need to change the code in a section that I am not familiar with (and I don't know how to exercise that section).
Based on location my guess is: Source IPTV with containers MPEGTS.

I think this realated part is for:

In muxes section-

Use A/V library (The input stream is remuxed with A/V library (libav or ffmpeg) to the mpeg-ts format which is accepted by TVheadend

I will test your PR and report if I found any issues!

RE: Testers needed - Added by Ukn Unknown over 1 year ago

Thank you; I saved with DVR a file using 'pass' and made a new network 'iptv' + muxer 'iptv' that was pointing towards the file. I selected A/V library as you highlighted. It seems to be working. I also clean up the code for exit with failure. Please let me know if your test results are also positive (or negative :( ).

RE: Testers needed - Added by Kiril St. over 1 year ago

Quick test results:

-update code to latest changes that you made in github (include your both PRs)
-update makefile.ffmpeg to 5.1.2 (also tested with 6.0)
-remove deprecated avresample from makefile
-make distclean and run ./Autobuild.sh

compile process failed with error:

CC src/muxer.o
src/muxer.c: In function 'muxer_create':
src/muxer.c:337:9: error: implicit declaration of function 'lav_muxer_create'; did you mean 'mkv_muxer_create'? [-Werror=implicit-function-declaration]
m = lav_muxer_create(m_cfg, hints);
^~~~~~~~~~~~~~
mkv_muxer_create
src/muxer.c:337:7: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
m = lav_muxer_create(m_cfg, hints);
^

Like I said before, codecpar is the easy part of migration. More trouble is avresample. FFMPEG entirely remove this library: https://github.com/FFmpeg/FFmpeg/commit/420cedd49745b284c35d97b936b71ff79b43bdf7

RE: Testers needed - Added by Ukn Unknown over 1 year ago

wait a minute ... the goal was for you to test if Input mpegts muxer works (we are not at 'ffmpeg5' stage).
Can you confirm the changes made in that branch are not breaking any functionality?
In the log section you will see some text that will confirm if you exercised that code changed by me.
I will let you know when TVH works with ffmpeg 5.1.2 .

BTW: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=971331

RE: Testers needed - Added by Kiril St. over 1 year ago

Ok, tested with only 3 PRs in github.
Everything compiles fine.
H.264 transcoding with VAAPI and AMD works and dont see any problems so far!

Only when enable "Use A/V library:" in muxes, I have this error:

2023-03-22 11:53:39.317 libav: AVCodecContext: non-existing PPS 0 referenced

2023-03-22 11:53:39.317 libav: AVCodecContext: decode_slice_header error

2023-03-22 11:53:39.317 libav: AVCodecContext: no frame!

2023-03-22 11:53:45.432 libav: AVFormatContext: Could not find codec parameters for stream 2 (Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

2023-03-22 11:53:45.434 libav: AVFormatContext: sample rate not set

2023-03-22 11:53:45.434 iptv: libav: Unable to write header

2023-03-22 11:53:45.435 tvhpoll: epoll del failed

with different source:

2023-03-22 12:05:31.200 subscription: 0014: "scan" unsubscribing

libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 12:05:31.268 libav: AVFormatContext: Could not find codec parameters for stream 2 (Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

2023-03-22 12:05:31.269 libav: AVFormatContext: Could not find codec parameters for stream 3 (Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

2023-03-22 12:05:31.269 libav: AVFormatContext: Could not find codec parameters for stream 4 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

2023-03-22 12:05:31.271 libav: AVFormatContext: sample rate not set

2023-03-22 12:05:31.271 iptv: libav: Unable to write header

2023-03-22 12:05:31.273 tvhpoll: epoll del failed

I dont know... maybe AMD VAAPI drivers problem again...

RE: Testers needed - Added by Ukn Unknown over 1 year ago

Please comment:
#define USE_CODECPAR
from:
C:\Users\alin_\Documents\GitHub\tvheadend\src\input\mpegts\iptv\iptv_libav.c
and check again (the failure case).
That will revert back to 'original' code.

RE: Testers needed - Added by Kiril St. over 1 year ago

Done, but same errors, and stream does not start! If disable this option everything runs fine...

2023-03-22 18:59:41.639 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.640 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.640 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.640 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.641 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.643 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.644 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.645 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.647 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.648 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:41.649 libav: AVCodecContext: Invalid frame dimensions 0x0.

2023-03-22 18:59:47.890 libav: AVFormatContext: Could not find codec parameters for stream 2 (Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels): unspecified frame size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

2023-03-22 18:59:47.890 libav: AVFormatContext: Could not find codec parameters for stream 3 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

2023-03-22 18:59:47.891 libav: AVFormatContext: sample rate not set

2023-03-22 18:59:47.891 iptv: libav: Unable to write header

2023-03-22 18:59:47.893 tvhpoll: epoll del failed

RE: Testers needed - Added by Ukn Unknown over 1 year ago

Thank you; I hope you don't mind if I will post here more requests to test other submission (towards ffmpeg5 target).

RE: Testers needed - Added by Ukn Unknown over 1 year ago

@kiril, I managed to update to ffmpeg5 ... but I strongly recommend you to wait until some programmer will implement it the right way. If you want to perform some preliminary tests probably is good enough.
for me is ok ... https://github.com/uknunknown/tvheadend/tree/test_ffmpeg5

    (1-10/10)