Can play H.264 file, but cannot play same file over TCP or UDP network stream

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
HugoZink
New Cone
New Cone
Posts: 3
Joined: 26 Nov 2019 14:06

Can play H.264 file, but cannot play same file over TCP or UDP network stream

Postby HugoZink » 26 Nov 2019 14:31

I have recently been working on a project to write a H.264 video encoder in C++, using the NVIDIA Video Codec SDK.

If I write the data to a file and try to play the file in VLC, the video successfully plays. But if I open a TCP or UDP server in C# and send the data to VLC over the network instead, VLC does not play the video. For what it's worth, I'm testing this on a Windows 10 machine.

The URL I'm trying to open is "tcp://127.0.0.1:22398".

This is the log for a successful session by opening the file: https://pastebin.com/bccg3unc

And here is the log output for an unsuccessful play over a TCP stream: https://pastebin.com/24WnC4KK

This is with the H.264 demuxer selected in the VLC GUI options. If I leave the demuxer set to "automatic", the file still doesn't play and it appears to try another one for MPEG-TS.

I am using VLC Player 3.0.6. Any ideas?
Last edited by HugoZink on 26 Nov 2019 16:10, edited 2 times in total.

HugoZink
New Cone
New Cone
Posts: 3
Joined: 26 Nov 2019 14:06

Re: Can play H.264 file, but cannot play same file over TCP or UDP network stream

Postby HugoZink » 26 Nov 2019 15:36

I changed the MRL to "tcp/h264://127.0.0.1:22398", but that didn't help. The logs at least now indicate that it tries to use the h264 packetizer, but it still fails to play.

Log: https://pastebin.com/BBJUGACk

Rémi Denis-Courmont
Developer
Developer
Posts: 15312
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Can play H.264 file, but cannot play same file over TCP or UDP network stream

Postby Rémi Denis-Courmont » 26 Nov 2019 18:34

"this doesn't look like a h264 ES stream" kinda tells it...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

HugoZink
New Cone
New Cone
Posts: 3
Joined: 26 Nov 2019 14:06

Re: Can play H.264 file, but cannot play same file over TCP or UDP network stream

Postby HugoZink » 27 Nov 2019 10:23

My mistake, it works now! I copied the output buffer from the C++ encoder the wrong way. My debugger showed zeroed bytes as empty spaces so it took me a while to notice the issue...


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 48 guests