Playing video shows Black screen, but I can hear the audio

*nix specific usage questions
ardeshirizadinl
New Cone
New Cone
Posts: 8
Joined: 12 Aug 2024 21:47

Playing video shows Black screen, but I can hear the audio

Postby ardeshirizadinl » 12 Aug 2024 22:07

UPDATE: This example here may be a wrong example, for a more valid example of the problem see this reply: https://forum.videolan.org/viewtopic.ph ... 90#p545990

- - - - - - - - - - -

Hi. I did a couple of searches and could not find my exact issue.

I am on Linux Fedora (40) and I have up-to-date version of VLC. I record my screen with OBS, and I upload them on YouTube. On YouTube everything works well, I can see my video no problem, but locally I can't play my videos. I hear them, but I don't see the picture.
I don't know how to begin troubleshooting my problem.

Here is one of the videos I recorded: https://drive.google.com/file/d/19RQQjL ... sp=sharing

And here is the information that my File Explorer gives about the file: https://ibb.co/Bt0jx16

Code: Select all

Container: Quicktime Video Codec: H.264 (High Profile) Video Bit Rate: 2500 kbps Frame Rate: 60.00 frames per second Audio Codec: MPEG-4 AAC Sample Rate: 48.00 kHz
This is what I see: https://ibb.co/sVDTBRn (but I hear the video perfectly)

This is Media information that VLC shows: https://ibb.co/8KcsFZf

Code: Select all

Encoded By: Lavf60.16.100
And this is codec info that VLC shows: https://ibb.co/HF83sJg

Code: Select all

Codec: H264 - MPEG-4 AVC (part 10) (avc1) Type: Video Video resolution: 1728x1080 Buffer dimensions: 1728x1080 Orientation: Top left Color primaries: ITU-R BT.709 Color transfer function: ITU-R BT.709 Color space: ITU-R BT.709 Range

And I do have a bunch of GStreamer installed on my system in addition to openh264: https://ibb.co/cDGjj2Z

How can I start troubleshooting?
Any help would be appreciated ❤️❤️❤️
Last edited by ardeshirizadinl on 13 Aug 2024 17:57, edited 1 time in total.

Lotesdelere
Cone Master
Cone Master
Posts: 9963
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Playing video shows Black screen, but I can hear the audio

Postby Lotesdelere » 13 Aug 2024 10:30

The video is black. Any player I've tried is playing a black video.
So I've extracted the video stream only out of your sample file and remuxed it to MP4 and we can see it has a very low bitrate, way too low for this resolution:

Code: Select all

Format : AVC Format profile : High@L4.2 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 4 frames Duration : 8 min 37 s Source duration : 8 min 37 s Bit rate mode : Variable Bit rate : 158 kb/s Width : 1 728 pixels Height : 1 080 pixels Display aspect ratio : 16:10 Frame rate mode : Constant Frame rate : 60.000 FPS

And when opening the remuxed file with an hex editor we can see there is really not much info in the video stream:

Image

This video is almost empty, hence black.

ardeshirizadinl
New Cone
New Cone
Posts: 8
Joined: 12 Aug 2024 21:47

Re: Playing video shows Black screen, but I can hear the audio

Postby ardeshirizadinl » 13 Aug 2024 17:56

Thank you very much for your reply @Lotesdelere. Unfortunately I chose wrong video for demonstration, because I don't have the proof that there is something in that video and recorded in for the sake of this forum. (Maybe even I forgot to share correct screen? I'm not sure)

Here is another video which I have proof for it not being empty: https://drive.google.com/file/d/1qv76T2 ... sp=sharing (Sorry its a bit large)

By saying "I have proof", I mean this is the uploaded version of this same video: https://www.youtube.com/watch?v=CdGU1AcnXu4 as you see YouTube managed to decode and process the video pretty well.

I double-checked every information I shared about the previous video, and they are exactly the same. (File Explorer info and VLC media information info) and I get exactly the same behavior: I hear it but its all black.

Lotesdelere
Cone Master
Cone Master
Posts: 9963
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Playing video shows Black screen, but I can hear the audio

Postby Lotesdelere » 14 Aug 2024 12:30

OK, this time your sample file has images in the video stream which can be played by other players and by VLC on Windows. But since I'm not using any Linux distro on a daily basis, I let it to the Linux specialists of this forum.

We need the full log, from the very beginning to the very end. Please open Tools -> Messages (set Verbosity to 2) before you start the playback, keep the messages window open during the whole process and then paste the full resulting log here or on Pastebin.com or on Justpaste.it if it's too long.

ardeshirizadinl
New Cone
New Cone
Posts: 8
Joined: 12 Aug 2024 21:47

Re: Playing video shows Black screen, but I can hear the audio

Postby ardeshirizadinl » 14 Aug 2024 18:14

UPDATE: This is incomplete. See this other post for a more verbose log: https://forum.videolan.org/viewtopic.ph ... 07#p546007

- - - - - - - - - - - - - - - - - - - -

Thanks again Lotesdelere.

This is the full log:

Code: Select all

main debug: toggling pause main debug: toggling pause pipewire debug: stream streaming pipewire warning: starting late main debug: resampling stopped (drift: 11324 us) main debug: EOF reached main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty pipewire debug: stream drained main debug: killing decoder fourcc `h264' main debug: removing module "avcodec" main debug: killing decoder fourcc `mp4a' main debug: removing module "avcodec" pipewire debug: stream paused main debug: removing module "ugly" main debug: removing module "audio_format" main debug: removing module "scaletempo" main debug: removing module "audio_format" pipewire debug: stream unconnected main debug: removing module "integer_mixer" main debug: keeping audio output main debug: removing module "mp4" mp4 debug: freeing all memory main debug: Program doesn't contain anymore ES main debug: removing module "record" main debug: removing module "cache_read" main debug: removing module "filesystem" main debug: dead input main debug: changing item without a request (current 0/1) main debug: nothing to play qt debug: IM: Deleting the input
The 4 first lines appeared instantly when I hit play, after a few second it printed the fifth line. Then it did NOT print anything until the very end of the video (>18 minutes). As soon as the video ended, it printed the rest of the log.
Last edited by ardeshirizadinl on 14 Aug 2024 19:40, edited 1 time in total.

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

Re: Playing video shows Black screen, but I can hear the audio

Postby Rémi Denis-Courmont » 14 Aug 2024 18:33

That file looks like it has been encoded with two left hands, causing glitches on seek. But other than that, it works fine here on Linux (Debian VLC 3.0.21). If it also plays fine in gstreamer, then I can only guess that your VLC package is broken.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ardeshirizadinl
New Cone
New Cone
Posts: 8
Joined: 12 Aug 2024 21:47

Re: Playing video shows Black screen, but I can hear the audio

Postby ardeshirizadinl » 14 Aug 2024 18:48

Thanks Remi Denis-Courmont. I do not know if it plays in gstreamer or not. How can I try and confirm it?

I tried doing

Code: Select all

ffmpeg -i Playing\ Brawlhalla\ for\ the\ first\ time.mp4 ffmpeg-output.mp4
and ffmpeg also failed. I could not upload the full log, because it was 9 MegaBytes of text, but I omitted the repetitive parts. Here is a pstebin. https://pastebin.com/GkVCH9xj

So, if ffmpeg is also failing should I assume there is no problem with the VLC?
Should the problem be my machine/OS?

ardeshirizadinl
New Cone
New Cone
Posts: 8
Joined: 12 Aug 2024 21:47

Re: Playing video shows Black screen, but I can hear the audio

Postby ardeshirizadinl » 14 Aug 2024 19:16

Okay very interestingly, Google Chrome plays the file (video and audio) perfectly.

Image

But FireFox fails to play the file.

Image



[both using file:// protocol. dragged dropped the .mp4 file into them]

ardeshirizadinl
New Cone
New Cone
Posts: 8
Joined: 12 Aug 2024 21:47

Re: Playing video shows Black screen, but I can hear the audio

Postby ardeshirizadinl » 14 Aug 2024 19:39

Well, I learned how to run VLC with more logs, I did it wrong the previous time. This pastebin: https://pastebin.com/4f6aYKaQ is the output of

Code: Select all

vlc --verbose=2 Playing\ Brawlhalla\ for\ the\ first\ time.mp4 &> vlc-out.log
I did not play the video for the full 18 minutes, just 1 or 2 minutes, as it was producing so many logs.

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

Re: Playing video shows Black screen, but I can hear the audio

Postby Rémi Denis-Courmont » 14 Aug 2024 19:40

Sorry, I am not an expert on gstreamer.

You can try to turn hardware decoding acceleration off and different video output modules, to work around buggy display drivers. If that also does not work, then what I said - most likely a packaging problem with your VLC RPM or whatever you installed VLC as.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ardeshirizadinl
New Cone
New Cone
Posts: 8
Joined: 12 Aug 2024 21:47

Re: Playing video shows Black screen, but I can hear the audio

Postby ardeshirizadinl » 14 Aug 2024 19:47

Thank you any way Remi and Lotesdelere for your times.

I tried Disabling the hardware accleration, also tried all 15 different output modules. Still no luck.

I'll play around with it, and may try some of ffmpeg communities as well. If I could get it right in anyway, either with ffmpeg or VLC, I'll share it here.

ardeshirizadinl
New Cone
New Cone
Posts: 8
Joined: 12 Aug 2024 21:47

Re: Playing video shows Black screen, but I can hear the audio

Postby ardeshirizadinl » 14 Aug 2024 19:55

SOLVED. SOLUTION:

I did some ChatGPTing and got it fixed. Indeed it looked like some packaging problems.

I had so many different tryouts with ChatGPT, but this is what in the end got it fixed:

Image

After enabling both free and non-free RPM Fusion repositories, running `sudo dnf install ffmpeg ffmpeg-devel` made these changes:

Image

And then both ffplay and VLC were able to run the video file.

Image


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 23 guests