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 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
HI, without the h264parse element, your encoder will deliver byte-stream format. Most players like to play h264 / mp4 files in avc format.
The h264parse will convert from byte-stream to avc. Gruesse Von: gstreamer-devel <[hidden email]>
Im Auftrag von Serhan Gül 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 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |