Log in

View Full Version : Vigor IP Playout Compatibility x264 / Mainconcept


FranceBB
9th September 2021, 16:36
Hi there,
one of our "clients" is using a Vigor IP Playout system and so far it only accepts files coming from Main Concept.
I've been trying to recreate the settings in x264 but so far I've always failed.

This is the file created with MainConcept:


Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.2
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Format settings, GOP : M=4, N=50
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 10 s 0 ms
Bit rate mode : Constant
Bit rate : 6 000 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.058
Stream size : 7.05 MiB (94%)
Language : English
Encoded date : UTC 2021-09-08 16:45:28
Tagged date : UTC 2021-09-08 16:45:28
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC


This is the file created with x264:


Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.2
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Format settings, GOP : M=4, N=50
Bit rate mode : Constant
Bit rate : 6 000 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.058
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709



So, as you can see, we have to dig in a bit further 'cause I've got the basic stuff right like Profile: Main, Level 4.2, CABAC enabled, Reframe set to 4, the GOP as M=4, N=50, which means 1 keyframe every second in a 50p file, got the bitrate as constant (in fact it immediately raises from 5100 kbit/s to 6000 kbit/s and stays constant), of course the resolution (FULL HD), Framerate (50fps), chroma sampling yv12, bit depth 8bit planar, color range: limited tv range and primaries, transfer and matrix as BT709.

Here's the comparison (Mainconcept Left, x264 Right):

https://i.imgur.com/elVBY1l.png

But of course if we were to stop at MediaInfo we wouldn't be encoders ehehehehe
So, on we go with ffprobe and those are the differences:

Left Mainconcept (working) -----------> Right x264 (not working)

codec_tag_string=avc1 ---------------> non existent
codec_tag=0x31637661 -------------> non existent
has_b_frames=1 -----------------------> has_b_frames=2
field_order=unknown -----------------> field_order=progressive
is_avc=true -----------------------------> is_avc=false
nal_length_size=4 ---------------------> nal_length_size=0


This is the file encoded with MainConcept which I'm trying to mimic: https://www.dropbox.com/s/rpq252giowi029t/Bars_50p_cbr.mp4?dl=0 - https://www.dropbox.com/s/wx2qywykj3zpo6n/Bars_50p_cbr-TS.mpg?dl=0

Forget about the audio and the muxer, focus on the video bitstream.

Oh, one more thing, of course, since color bars are digital and static, both MainConcept and x264 don't need so much bitrate to encode them, but the playout accepts CBR only so both encoders are trying to fill it with bogus values (zero-filling) which results in FF in the bitstream like so:

https://i.imgur.com/P2hP5SG.png

which is alright and this is preserved while muxing.
What I noticed though is that other encoders like Intel Quicksync were zero filling instead, so instead of having a bunch of FF you had a bunch of 00.

So, do you have any insight on what to do other than:

x264.exe "\\mibctvan000\Ingest\MEDIA\temp\AVS Script.avs" --preset medium --profile Main --level 4.2 --ref 4 --bitrate 6000 --vbv-maxrate 6000 --vbv-bufsize 6000 --deblock -1:-1 --overscan show --min-keyint 1 --keyint 50 --range tv --log-level info --thread-input --opencl --colormatrix bt709 --transfer bt709 --colorprim bt709 --videoformat component --nal-hrd cbr --output "\\mibctvan000\Ingest\MEDIA\temp\raw_video.h264"

pause

to get the file working by making it as close as possible to the Mainconcept one?

benwaggoner
9th September 2021, 19:52
So, do you have any insight on what to do other than:
...does that command line make a compatible file, then?

FranceBB
10th September 2021, 06:17
...does that command line make a compatible file, then?

Nope, the file doesn't even start when I send it over and they try to play it, which is why I'm back here...

FranceBB
10th September 2021, 10:09
This is my last attempt: Mainconcept and x264 samples -> https://we.tl/t-zht9J4eX2G


I've got a bit closer, but I still have:

has_b_frames=1 in Mainconcept Left, has_b_frames=2 in x264 Right

and

id=0x100 Mainconcept, Left, id=0x150 x264 right

https://i.imgur.com/kjbJLaD.png
https://i.imgur.com/mW8FyrL.png

FranceBB
10th September 2021, 12:51
Final BAT, sent to the client again who's gonna play it in his playout system...


x264.exe "\\mibctvan000\Ingest\MEDIA\temp\AVS Script.avs" --preset medium --profile Main --level 4.2 --ref 4 --bitrate 6000 --vbv-maxrate 6000 --vbv-bufsize 6000 --deblock -4:-4 --min-keyint 1 --keyint 50 --range tv --log-level info --thread-input --opencl --colormatrix bt709 --transfer bt709 --colorprim bt709 --videoformat component --nal-hrd cbr --output "\\mibctvan000\Ingest\MEDIA\temp\raw_video.h264"

ffmpeg.exe -i "\\mibctvan000\Ingest\MEDIA\temp\AVS Script.avs" -c:a pcm_s24le -ar 48000 -af loudnorm=I=-24:LRA=12:tp=-2 -f wav -y "\\mibctvan000\Ingest\MEDIA\temp\audio.wav"

ffmpeg.exe -i "\\mibctvan000\Ingest\MEDIA\temp\audio.wav" -filter_complex "channelsplit=channel_layout=4.0[CH1][CH2][CH3][CH4]" -map "[CH1]" -c:a pcm_s24le -ar 48000 "\\mibctvan000\Ingest\MEDIA\temp\ch1.wav" -map "[CH2]" -c:a pcm_s24le -ar 48000 "\\mibctvan000\Ingest\MEDIA\temp\ch2.wav" -map "[CH3]" -c:a pcm_s24le -ar 48000 "\\mibctvan000\Ingest\MEDIA\temp\ch3.wav" -map "[CH4]" -c:a pcm_s24le -ar 48000 "\\mibctvan000\Ingest\MEDIA\temp\ch4.wav"

ffmpeg.exe -i "\\mibctvan000\Ingest\MEDIA\temp\ch1.wav" -i "\\mibctvan000\Ingest\MEDIA\temp\ch2.wav" -filter_complex "[0:a][1:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" -c:a libtwolame -b:a 384k -ar 48000 -f mp2 "\\mibctvan000\Ingest\MEDIA\temp\ch12.mp2"

ffmpeg.exe -i "\\mibctvan000\Ingest\MEDIA\temp\ch3.wav" -i "\\mibctvan000\Ingest\MEDIA\temp\ch4.wav" -filter_complex "[0:a][1:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" -c:a libtwolame -b:a 384k -ar 48000 -f mp2 "\\mibctvan000\Ingest\MEDIA\temp\ch34.mp2"

ffmpeg.exe -use_wallclock_as_timestamps 1 -i "\\mibctvan000\Ingest\MEDIA\temp\raw_video.h264" -i "\\mibctvan000\Ingest\MEDIA\temp\ch12.mp2" -i "\\mibctvan000\Ingest\MEDIA\temp\ch34.mp2" -map 0:0 -map 1:0 -map 2:0 -c:v copy -c:a copy -f mpegts -muxrate 20000000 -metadata provider_name="Avisynth" -metadata service_provider="Avisynth" -metadata service_name="Avisynth" -mpegts_original_network_id 0x1122 -mpegts_transport_stream_id 0x3344 -mpegts_service_id 0x5566 -mpegts_pmt_start_pid 0x1500 -mpegts_start_pid 0x150 -mpegts_service_type "digital_tv" -mpegts_flags "resend_headers" -y "\\mibctvan000\Ingest\MEDIA\temp\output1.ts"

pause


Low expectation, but fingers crossed...

Blue_MiSfit
10th September 2021, 22:13
This is when a stream analyzer is quite helpful :D

I wonder if there's something like a CQM or some special SPS/PPS involved? Hard to tell using just ffmpeg.

Blue_MiSfit
10th September 2021, 22:13
This is when a stream analyzer is quite helpful :D

I wonder if there's something like a CQM or some special SPS/PPS involved? Hard to tell using just ffmpeg.

FranceBB
11th September 2021, 10:34
Yeah I know...

Still my last attempt failed as the file I sent got rejected (again) as it doesn't play in their Playout...

kolak
12th September 2021, 12:02
Try bframes=1,b-adapt=optimal,no-weightb=1. Just to make sure there is 1 B frame.

It also may be down to ffmpeg ts muxer which is faaaar from been perfect. You are saying this should be ignored- your sample file is mp4, not ts.
You also want to use detailed mediainfo parsing to show you all headers in h264.

https://i.postimg.cc/J4K97szy/Screenshot-2021-09-12-at-13-56-54.png

FranceBB
12th September 2021, 13:23
Thanks for the tip, I'll try to send another file after encoding with the above options. About the FFMpeg muxer, that was my first thought so I was like: "should I try with TS Muxer instead?" But then I had a better idea: get an MP4 from MainConcept and remux it myself with FFMpeg and then send it to them for their Playout. I thought: "if it works, it's not the FFMpeg muxer" and indeed it worked, so remuxing the MainConcept H.264 file to ts with FFMpeg works.
I also tried to encode audio to MP2 with the FFMpeg encoder and mux the MainConcept H.264 video and the two newly created with FFMpeg MP2 audio track and mux everything in TS and send it to them for their Playout and it also worked.

Therefore, I've pinned down the problem to the H.264 stream itself. I'll try to re-encode with the settings above and send it to them on Monday and I'll keep you posted. Thanks.

Emulgator
12th September 2021, 13:51
codec_tag_string=avc1 ---------------> non existent
codec_tag=0x31637661 -------------> non existent
has_b_frames=1 -----------------------> has_b_frames=2
field_order=unknown -----------------> field_order=progressive
is_avc=true -----------------------------> is_avc=false
nal_length_size=4 ---------------------> nal_length_size=0

Could be worth a report to videolan

kolak
12th September 2021, 17:37
Most of it is just missing x264 setting (or just difference between mp4 and ts muxing).

excellentswordfight
13th September 2021, 09:05
My guess would be that the application does a codec check, and is using one of the missing tags. Maybe you can use an bitstream editor to add those?

Cant they see it in the Vigor log why its being rejected? Have you contacted Vigor? An simple email seems a lot easier then spending all this time with different settings?

FranceBB
13th September 2021, 09:26
Ok, so, I included the changes you mentioned above:

x264.exe "\\mibctvan000\Ingest\MEDIA\temp\AVS Script.avs" --preset medium --profile Main --level 4.2 --ref 4 --bitrate 6000 --vbv-maxrate 6000 --vbv-bufsize 6000 --deblock -1:-1 --min-keyint 1 --keyint 50 --bframes 1 --b-adapt 2 --no-weightb 1 --range tv --log-level info --thread-input --opencl --colormatrix bt709 --transfer bt709 --colorprim bt709 --videoformat component --nal-hrd cbr --output "\\mibctvan000\Ingest\MEDIA\temp\raw_video.h264"

but this is not good as now the GOP has changed from M=4 N=50 to M=2 N=50, however with --bframes 3 I get back M=4, N=50.

Here are my latest test: https://we.tl/t-UVn7lCjs0D - https://we.tl/t-IE5CvaWNCe

Test 1: x264 --bframes 1 + MP2 audio with the wrong GOP + FFMpeg TS Muxer
Test 2: x264 --bframes 3 + MP2 audio with FFMpeg TS Muxer
Test 3: x264 --bframes 3 + MP2 audio with TSMuxer
Test 4: x264 --bframes 3 with TSMuxer
Test 5: x264 without component flag with FFMpeg TS Muxer
Test 6: x264 without component flag with TSMuxer

I'm sending them over now, fingers crossed

https://i.imgur.com/U9UUqwt.png

My guess would be that the application does a codec check, and is using one of the missing tags. Maybe you can use an bitstream editor to add those?

Cant they see it in the Vigor log why its being rejected? Have you contacted Vigor? An simple email seems a lot easier then spending all this time with different settings?

Well I haven't contacted them 'cause I'm sending files to another studio which uses Vigor, so I can't contact them myself, but I'll ask them to do so.

kolak
13th September 2021, 11:45
My guess would be that the application does a codec check, and is using one of the missing tags. Maybe you can use an bitstream editor to add those?

Cant they see it in the Vigor log why its being rejected? Have you contacted Vigor? An simple email seems a lot easier then spending all this time with different settings?

This is the problem.
What does it mean 'file doesn't play'?
Doesn't load at all, artefacts etc.
If doesn't load at all then problem is not in GOP structure etc. but with some specific header info which is most likely missing.
I had similar problem with h265 playback and wasted soooo much time as all what I had from other side was meaningless error code, which no one knew what it means. Those cases are so annoying.

kolak
13th September 2021, 11:54
Ok, so, I included the changes you mentioned above:
but this is not good as now the GOP has changed from M=4 N=50 to M=2 N=50, however with --bframes 3 I get back M=4, N=50.



GOP structure itself is not going to be a problem. Number of B frames, ref frames, GOP size can easily be.

I typically add all those extra headers flagging in case of problem with hardware playback: aud, pic-struct, etc.

FranceBB
13th September 2021, 15:35
This is the problem.
What does it mean 'file doesn't play'?
Doesn't load at all, artefacts etc.
If doesn't load at all then problem is not in GOP structure etc. but with some specific header info which is most likely missing.
I had similar problem with h265 playback and wasted soooo much time as all what I had from other side was meaningless error code, which no one knew what it means. Those cases are so annoying.

Well, when I sent the other files over all they were saying was that their server was saying that the codec was not recognized and therefore it wasn't displaying anything.
I don't have any other info from the other side but I've asked them to be more specific.
About --aud, I've included it now and I've sent over 2 more files.

*fingers crossed*

kolak
13th September 2021, 18:39
It rather means it will be some simple header tag, not any of very detailed settings (that would show up as broken playback etc).

In this case you should mux good file and then keep trying x264 until you get all key headers exactly the same. I don't think you are far off.

FranceBB
14th September 2021, 09:12
Well, I asked for the logs and they sent them back.
All the former tests I sent, including the last ones, didn't play.

Here are the logs of a file that plays fine in their playout:


600079 9 2021-09-14 09:13:10.353 Normal ADSVR 14 PlayerInstance[P001]: Prepare - accepted; reset=0
600104 9 2021-09-14 09:13:10.353 Normal ADSVR 14 PlayerInstance[P001]: HW Layer Thread - MSI enter; playlist-items=1
600098 9 2021-09-14 09:13:10.353 Normal ADSVR 14 PlayerInstance[P001]: FetchNext; Media=/vigor_media/files/ads/ICPREMIERE-TS.mpg
600080 9 2021-09-14 09:13:10.403 Normal ADSVR 14 PlayerInstance[P001]: Prepare; status=1
600082 9 2021-09-14 09:13:10.403 Normal ADSVR 14 PlayerInstance[P001]: Add; Media=/vigor_media/files/ads/ICPREMIERE-TS.mpg; Status=OK; time=50.781
600083 9 2021-09-14 09:13:10.403 Normal ADSVR 14 PlayerInstance[P001]: CueMedia; Media=/vigor_media/files/ads/ICPREMIERE-TS.mpg; status=OK
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: Program=83, ProgramSync/ShiftReset=0, DiscardPlayerStreams=1, Shift=20.000ms
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 506, EFP: 2965.695ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 507, EFP: 2965.702ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 508, EFP: 2965.709ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 510, EFP: 2836.014ms/69, F:3R/20E/69T (A) [video:AVC/H.264]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2301, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2302, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2303, EFP: 1062.179ms/2, F:2R/2E/2T (A) [data:subtitling]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2304, EFP: 1061.113ms/1, F:1R/1E/1T (A) [data:subtitling]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: Program=83, ProgramSync/ShiftReset=0, DiscardPlayerStreams=1, Shift=20.000ms
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 506, EFP: 2965.695ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 507, EFP: 2965.702ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 508, EFP: 2965.709ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 510, EFP: 2836.014ms/69, F:3R/20E/69T (A) [video:AVC/H.264]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2301, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2302, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2303, EFP: 1062.179ms/2, F:2R/2E/2T (A) [data:subtitling]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2304, EFP: 1061.113ms/1, F:1R/1E/1T (A) [data:subtitling]
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; INFO: Program feed state changed; Program=83, finished(7)-->startup(1)
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; INFO: Program feed state changed; Program=83, startup(1)-->suspended(2)
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; Stream: Program=83, SH=108, Name=/vigor_media/files/ads/ICPREMIERE-TS.mpg (created)
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; Stream: Program=83, SH=108, Name=/vigor_media/files/ads/ICPREMIERE-TS.mpg (detected)
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; *: PCR= 256, Base: PCR=0.700007, PTS=1.440000 (PCPID=256)
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; 1: PID= 256, RefClock= 0.000376, PTS=1.440000 (video:AVC/H.264)
600438 9 2021-09-14 09:13:10.510 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; 2: PID= 257, RefClock= 0.269717, PTS=1.440000 (audio:MPEG2a)



And here are the logs of Test3.ts which is one of the files I sent him which doesn't play:


600079 9 2021-09-14 09:45:53.573 Normal ADSVR 14 PlayerInstance[P001]: Prepare - accepted; reset=0
600104 9 2021-09-14 09:45:53.573 Normal ADSVR 14 PlayerInstance[P001]: HW Layer Thread - MSI enter; playlist-items=1
600098 9 2021-09-14 09:45:53.573 Normal ADSVR 14 PlayerInstance[P001]: FetchNext; Media=/vigor_media/files/ads/Test3.ts
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: Program=83, ProgramSync/ShiftReset=0, DiscardPlayerStreams=1, Shift=60.000ms
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 506, EFP: 2965.267ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 507, EFP: 2965.263ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 508, EFP: 2965.260ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 510, EFP: 2923.697ms/78, F:3R/20E/78T (A) [video:AVC/H.264]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2301, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2302, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2303, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2304, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: Program=83, ProgramSync/ShiftReset=0, DiscardPlayerStreams=1, Shift=60.000ms
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 506, EFP: 2965.267ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 507, EFP: 2965.263ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 508, EFP: 2965.260ms/123, F:123R/123E/123T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 510, EFP: 2923.697ms/78, F:3R/20E/78T (A) [video:AVC/H.264]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2301, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2302, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2303, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2304, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; INFO: Program feed state changed; Program=83, finished(7)-->startup(1)
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; INFO: Program feed state changed; Program=83, startup(1)-->suspended(2)
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; Stream: Program=83, SH=110, Name=/vigor_media/files/ads/Test3.ts (created)
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ERROR: Player source detection failed (PID content), Program=83, SH=110, Name=/vigor_media/files/ads/Test3.ts
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; INFO: Program feed state changed; Program=83, suspended(2)-->terminate(5)
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: Program=83, ProgramSync/ShiftReset=0, DiscardPlayerStreams=0, Shift=60.000ms
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 506, EFP: 3157.595ms/131, F:131R/131E/131T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 507, EFP: 3157.595ms/131, F:131R/131E/131T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 508, EFP: 3157.595ms/131, F:131R/131E/131T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID= 510, EFP: 3078.248ms/83, F:3R/21E/83T (A) [video:AVC/H.264]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2301, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2302, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2303, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset_Before: --> PID=2304, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: Program=83, ProgramSync/ShiftReset=0, DiscardPlayerStreams=0, Shift=60.000ms
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 506, EFP: 3157.595ms/131, F:131R/131E/131T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 507, EFP: 3157.595ms/131, F:131R/131E/131T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 508, EFP: 3157.595ms/131, F:131R/131E/131T (A) [audio:MPEG2a]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID= 510, EFP: 3078.248ms/83, F:3R/21E/83T (A) [video:AVC/H.264]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2301, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2302, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2303, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ChannelReset__After: --> PID=2304, EFP: 0.000ms/0, F:0R/0E/0T (U) [data:subtitling]
600438 9 2021-09-14 09:45:53.732 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; INFO: Program feed state changed; Program=83, terminate(5)-->terminating(6)
600438 9 2021-09-14 09:45:53.732 Error ADSVR 14 SpliceProcessor[TEST-IPCH]: ERROR; Player source detection failed (PID content), Program=83, SH=110, Name=/vigor_media/files/ads/Test3.ts
600522 8 2021-09-14 09:45:53.741 Activity ADSVR 14 LVS300[P001]: AsRun; BlockNumber=n/a; MediaName=Test3.ts; StartedPlaying=n/a; FinishedPlaying=n/a; Cancelled=True; DurationIntended=0; DurationActual=0; External=; fs=1
600097 9 2021-09-14 09:45:53.741 Normal ADSVR 14 PlayerInstance[P001]: Release; Media=/vigor_media/files/ads/Test3.ts; Block=n/a; fs=1
600438 9 2021-09-14 09:45:53.932 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; ERROR: Player stream errors; Program=83, Name=/vigor_media/files/ads/Test3.ts, FatalError=1, PID=4113[R=0:%=0.00:D=0:E=0:T=0], PID=4352[R=0:%=0.00:D=0:E=0:T=0], PID=4353[R=0:%=0.00:D=0:E=0:T=0]
600438 9 2021-09-14 09:45:53.932 Debug ADSVR 14 SpliceProcessor[TEST-IPCH]: Trace; INFO: Program feed state changed; Program=83, terminating(6)-->finished(7)
600438 9 2021-09-14 09:45:53.932 Error ADSVR 14 SpliceProcessor[TEST-IPCH]: ERROR; Player stream errors; Program=83, Name=/vigor_media/files/ads/Test3.ts, FatalError=1, PID=4113[R=0:%=0.00:D=0:E=0:T=0], PID=4352[R=0:%=0.00:D=0:E=0:T=0], PID=4353[R=0:%=0.00:D=0:E=0:T=0]
600107 9 2021-09-14 09:45:53.932 Normal ADSVR 14 PlayerInstance[P001]: HW Layer Thread - MSI leave; time=0.358878; iterations=1
600080 9 2021-09-14 09:45:53.932 Normal ADSVR 14 PlayerInstance[P001]: Prepare; status=0
600082 9 2021-09-14 09:45:53.932 Normal ADSVR 14 PlayerInstance[P001]: Add; Media=/vigor_media/files/ads/Test3.ts; Status=Failed; Reason_code=10; Reason_text=failed to prepare; time=359.887
600083 9 2021-09-14 09:45:53.932 Normal ADSVR 14 PlayerInstance[P001]: CueMedia; Media=/vigor_media/files/ads/Test3.ts; status=Failed
600084 9 2021-09-14 09:45:53.932 Normal ADSVR 14 PlayerInstance[P001]: CueMedia - not-found; Media=Test3.ts



Any clues?

FranceBB
14th September 2021, 09:22
This was the last BAT I used...


x264.exe "\\mibctvan000\Ingest\MEDIA\temp\AVS Script.avs" --preset medium --profile Main --level 4.2 --ref 4 --bitrate 6000 --vbv-maxrate 6000 --vbv-bufsize 6000 --deblock -4:-4 --min-keyint 1 --keyint 50 --bframes 3 --b-adapt 2 --no-weightb 1 --aud --range tv --log-level info --thread-input --opencl --colormatrix bt709 --transfer bt709 --colorprim bt709 --nal-hrd cbr --output "\\mibctvan000\Ingest\MEDIA\temp\raw_video.h264"

ffmpeg.exe -i "\\mibctvan000\Ingest\MEDIA\temp\AVS Script.avs" -c:a pcm_s24le -ar 48000 -af loudnorm=I=-24:LRA=12:tp=-2 -f wav -y "\\mibctvan000\Ingest\MEDIA\temp\audio.wav"

ffmpeg.exe -i "\\mibctvan000\Ingest\MEDIA\temp\audio.wav" -filter_complex "channelsplit=channel_layout=4.0[CH1][CH2][CH3][CH4]" -map "[CH1]" -c:a pcm_s24le -ar 48000 "\\mibctvan000\Ingest\MEDIA\temp\ch1.wav" -map "[CH2]" -c:a pcm_s24le -ar 48000 "\\mibctvan000\Ingest\MEDIA\temp\ch2.wav" -map "[CH3]" -c:a pcm_s24le -ar 48000 "\\mibctvan000\Ingest\MEDIA\temp\ch3.wav" -map "[CH4]" -c:a pcm_s24le -ar 48000 "\\mibctvan000\Ingest\MEDIA\temp\ch4.wav"

ffmpeg.exe -i "\\mibctvan000\Ingest\MEDIA\temp\ch1.wav" -i "\\mibctvan000\Ingest\MEDIA\temp\ch2.wav" -filter_complex "[0:a][1:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" -c:a libtwolame -b:a 384k -ar 48000 -f mp2 "\\mibctvan000\Ingest\MEDIA\temp\ch12.mp2"

ffmpeg.exe -i "\\mibctvan000\Ingest\MEDIA\temp\ch3.wav" -i "\\mibctvan000\Ingest\MEDIA\temp\ch4.wav" -filter_complex "[0:a][1:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" -c:a libtwolame -b:a 384k -ar 48000 -f mp2 "\\mibctvan000\Ingest\MEDIA\temp\ch34.mp2"

ffmpeg.exe -use_wallclock_as_timestamps 1 -i "\\mibctvan000\Ingest\MEDIA\temp\raw_video.h264" -i "\\mibctvan000\Ingest\MEDIA\temp\ch12.mp2" -i "\\mibctvan000\Ingest\MEDIA\temp\ch34.mp2" -map 0:0 -map 1:0 -map 2:0 -c:v copy -c:a copy -f mpegts -muxrate 20000000 -metadata provider_name="Avisynth" -metadata service_provider="Avisynth" -metadata service_name="Avisynth" -mpegts_original_network_id 0x1122 -mpegts_transport_stream_id 0x3344 -mpegts_service_id 0x5566 -mpegts_pmt_start_pid 0x1500 -mpegts_start_pid 0x150 -mpegts_service_type "digital_tv" -mpegts_flags "resend_headers" -y "\\mibctvan000\Ingest\MEDIA\temp\output1.ts"

pause


I feel demoralized now... :(

kolak
14th September 2021, 10:07
So you said that original mp4 remuxed in ffmpeg to ts did play fine?

I would ask them for that .mpg from their log ( looks like ts file from Vantage with .mpg extension) file and then start matching it.
You can also try using any other hh264 encoder and create test file with it.
Somehow I have hard time to believe it’s elementary x264 which is the problem.

Server seems to not queuing your file. It's like it doesn't see it.
Have they tried changing extension to .mpg ? Sound silly, but you never know.
Try also making PIDs correct (256 for video and you use 150).

FranceBB
14th September 2021, 12:59
Ok, so, we have an unexpected turnaround.

The guy didn't see Test7 and Test8.
He tried them and Test7 loads but stops immediately.
Test8 plays fine and the only difference is... remuxing with TSMuxer.
So after all I can conclude that the last command line was correct, but the FFMpeg muxer somehow screwed up and TSMuxer nailed it!

Thanks, guys!! ;)

https://media0.giphy.com/media/lMameLIF8voLu8HxWV/giphy.gif

kolak
14th September 2021, 13:11
TS muxer in ffmpeg is faaaaar from been reliable.
Now when Manzanita is gone there is a bit of lack of good TS muxing engine.

Also your TSMuxer file is muxed for Blu-ray, not a 'generic' TS stream.

Balling
14th September 2021, 13:25
TS muxer in ffmpeg is faaaaar from been reliable.
Now when Manzanita is gone there is a bit of lack of good TS muxing engine.

Also your TSMuxer file is muxed for Blu-ray, not a 'generic' TS stream.
https://github.com/justdan96/tsMuxer/issues/108

Neither ffmpeg, nor Tsmuxer can correctly create TS that have perfect buffers. https://patchwork.ffmpeg.org/project/ffmpeg/patch/BVbVGqjNLz7nhZD_VPMQRfuJ2EcACFthBGsvAY_2P1fuEx4y1y02BEr3ODpdAix2nX-dAM1sR7ePn_4xZpy5PCz_kkFmPmMeO70lACS-CoI=@protonmail.com/

That is not a problem in practice.

kolak
14th September 2021, 13:46
Yep. This is so obvious if you put ffmpeg streams over precise verifier (eg. Tektronix). It will show 1000s of buffer issues.
Best TS muxer I know (discontinued now) is Manzanita.

It can be a problem in a way of clients rejecting your files (as some will use verifier and unless you pass it files will be always rejected).

kolak
14th September 2021, 14:16
Ok, so, we have an unexpected turnaround.

The guy didn't see Test7 and Test8.
He tried them and Test7 loads but stops immediately.



Possible reason for this:

[mpegts @ 0000024b91f4ec40] stream 0 : no PTS found at end of file, duration not set

Your ffmpeg files have no duration set in ts headers.
It's probably because you are muxing elementary files which may have unknown duration for ffmpeg.
If you do x264 encoding in ffmpeg (from the source with known duration) then file should be fine.

Just put your ffmpeg ts files through this:

ffmpeg -i ffmpeg.ts -f null -
and you will see they are problematic.