<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MP4 Video Encoding in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/MP4-Video-Encoding/m-p/797221#M123365</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please correct me if I am wrong: the mp4 file that I create either with gst-launch command above or the C example code from libimxvpuapi is only the encoded stream without a container. The video stream needs a container in order to be played (by VLC or other players). I can see the file is missing a container:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/62543iB7AB3AD05B6F835A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This ffmpeg command creates an MPEG-4 container for the video stream:&lt;/P&gt;&lt;P&gt;ffmpeg -i video.mp4 -vcodec copy output.mp4&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/62544i7A4000B1DE6A6463/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The gst-launch command that I had above needs to be extended with an mp4mux in order to create the container. The output file then works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Would have been nice to have a function in libimxvpuapi to create a container for the encoded stream.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if I'm wrong about this container thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jun 2018 10:45:12 GMT</pubDate>
    <dc:creator>remusmp</dc:creator>
    <dc:date>2018-06-27T10:45:12Z</dc:date>
    <item>
      <title>MP4 Video Encoding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MP4-Video-Encoding/m-p/797219#M123363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear NXP Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I'm using the following command to encode /dev/video0 straight into mp4 (&lt;A class="link-titled" href="http://trac.gateworks.com/wiki/Yocto/gstreamer/video" title="http://trac.gateworks.com/wiki/Yocto/gstreamer/video"&gt;Yocto/gstreamer/video – Gateworks&lt;/A&gt;):&lt;/P&gt;&lt;P&gt;gst-launch-1.0&amp;nbsp; imxv4l2videosrc device=/dev/video0 ! imxvpuenc_mpeg4 bitrate=10000 ! filesink location=/tmp/file.mp4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that some players (e.g. VLC under Linux/Windows) cannot play the file (they give an error saying they don't understand the file format). If I run ffmpeg:&lt;/P&gt;&lt;P&gt;ffmpeg -i video.mp4 -vcodec copy output.mp4&lt;/P&gt;&lt;P&gt;then all players are able to read the file and it works. I'd like not to depend on ffmpeg - could gst-launch and its plugins create a valid mp4 file? How would you modify the above command to achieve that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I'd like to be able to encode straight into mp4 from C and I'm following the example from libimxvpuapi - encode-example-writecb.c. I have the same problem there - the encoded file cannot be read by players but after running ffmpeg things work. I'd like my app not to depend on ffmpeg.&lt;/P&gt;&lt;P&gt;What's missing from encode-example-writecb.c in order to produce an mp4 file that can be read by all players?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Remus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 11:35:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MP4-Video-Encoding/m-p/797219#M123363</guid>
      <dc:creator>remusmp</dc:creator>
      <dc:date>2018-06-19T11:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: MP4 Video Encoding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MP4-Video-Encoding/m-p/797220#M123364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Remus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the VLC driver has a modification is bitrate, so try removing this part for the launch file,&amp;nbsp; I dont know if there are other possible option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 14:55:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MP4-Video-Encoding/m-p/797220#M123364</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2018-06-25T14:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: MP4 Video Encoding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MP4-Video-Encoding/m-p/797221#M123365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please correct me if I am wrong: the mp4 file that I create either with gst-launch command above or the C example code from libimxvpuapi is only the encoded stream without a container. The video stream needs a container in order to be played (by VLC or other players). I can see the file is missing a container:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/62543iB7AB3AD05B6F835A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This ffmpeg command creates an MPEG-4 container for the video stream:&lt;/P&gt;&lt;P&gt;ffmpeg -i video.mp4 -vcodec copy output.mp4&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/62544i7A4000B1DE6A6463/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The gst-launch command that I had above needs to be extended with an mp4mux in order to create the container. The output file then works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Would have been nice to have a function in libimxvpuapi to create a container for the encoded stream.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if I'm wrong about this container thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 10:45:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MP4-Video-Encoding/m-p/797221#M123365</guid>
      <dc:creator>remusmp</dc:creator>
      <dc:date>2018-06-27T10:45:12Z</dc:date>
    </item>
  </channel>
</rss>

