h264parse element needed to play video in VLC after encoding with nvh264enc

Serhan Gül serhan at fastmail.com
Mon Sep 30 09:16:08 UTC 2019


Hi,
I'm encoding a YUV video to H.264 using nvh264enc. When I use the first pipeline blow, the encoding works but I cannot play the MP4 file in VLC 3.0.8 (Ubuntu 18.04) but only using the Videos application of Ubuntu. However, when I add a h264parse element between nvh264enc and filesink, as in the second pipeline, I can play the video without a problem in VLC. Any ideas why this is happening? I don't really understand why I need the parser element h264parse after the encoder

> gst-launch-1.0 -v filesrc location=BQTerrace_1920x1080_60.yuv ! rawvideoparse format=i420 width=1920 height=1080 ! nvh264enc ! filesink location=BQTerrace_1920x1080_60.mp4

> gst-launch-1.0 -v filesrc location=BQTerrace_1920x1080_60.yuv ! rawvideoparse format=i420 width=1920 height=1080 ! nvh264enc ! *h264parse* ! filesink location=BQTerrace_1920x1080_60.mp4

Actually I was expecting to put a mp4mux element between nvh264enc and filesrc but if I do that, I get the error: "WARNING: erroneous pipeline: could not link nvh264enc0 to mp4mux0". If I use x264enc, the pipeline works though.

Thanks,
Serhan

-- 
 Serhan Gül
 serhan at fastmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190930/1a776706/attachment.html>


More information about the gstreamer-devel mailing list