arista icon indicating copy to clipboard operation
arista copied to clipboard

Arista produces High-profile H.264 instead of Baseline

Open ildar opened this issue 13 years ago • 11 comments

hi! I run: $ arista-transcode -p "N900 H.264" -d nokia-nseries *flv looking at the result: $ avconv -i *-nokia-nseries.m4v 1.m4v 2>&1 | grep 264 encoder : x264 Stream #0.1(eng): Video: h264 (High), yuv420p, 848x480 [PAR 1:1 DAR 53:30], 1847 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 1073741824 tbc

The issue may be FIXED if I change qtmux->ffmux_mp4. Then it gets: $ avconv -i *-nokia-nseries.mp4 1.mp4 2>&1 | grep 264 Stream #0.1(und): Video: h264 (Constrained Baseline), yuv420p, 848x480 [PAR 1:1 DAR 53:30], 394 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 1073741824 tbc

The reason might be a new versions of gst or other libs.

ildar avatar May 16 '12 04:05 ildar

GStreamer specifically wants you to use qtmux instead of ffmux_mp4 as it is a proper GStreamer element instead of a wrapper around FFmpeg's libarries (libavformat).

Can someone please confirm if this fixes the issue? If it definitely does then I'll consider changing it.

danielgtaylor avatar May 16 '12 17:05 danielgtaylor

Looks like mp4mux makes the same problem. Need to check if "container": "qtmux" forces the "name": "x264enc" to high-profile. FYI: $ rpm -qf /usr/lib64/gstreamer-0.10/libgstisomp4.so gst-plugins-good-0.10.31-alt1

ildar avatar May 18 '12 22:05 ildar

Can anybody else confirm this issue and fix? I don't have the hardware to do so.

danielgtaylor avatar May 18 '12 22:05 danielgtaylor

BTW, does this matter? $ LANG=C arista-transcode -p "N900 H.264" -d nokia-nseries 1.flv
** Message: pygobject_register_sinkfunc is deprecated (GstObject) Encoding 1.flv for nokia-nseries (N900 H.264) Encoding... 94% (0:00 remaining) $

ildar avatar May 18 '12 22:05 ildar

I don't think that it does.

On Fri, May 18, 2012 at 3:37 PM, ildar [email protected] wrote:

BTW, does this matter? $ LANG=C arista-transcode -p "N900 H.264" -d nokia-nseries 1.flv ** Message: pygobject_register_sinkfunc is deprecated (GstObject) Encoding 1.flv for nokia-nseries (N900 H.264) Encoding... 94% (0:00 remaining) $


Reply to this email directly or view it on GitHub: https://github.com/danielgtaylor/arista/issues/138#issuecomment-5797221

Daniel G. Taylor http://programmer-art.org/

danielgtaylor avatar May 18 '12 23:05 danielgtaylor

Anyway, I applied the workaround in ALTLinux: http://git.altlinux.org/people/ildar/packages/arista.git?p=arista.git;a=shortlog;h=refs/heads/patches/alt/fix-codecs

ildar avatar May 19 '12 07:05 ildar

As I suspected, arista is not guilty for this.

$ gst-launch videotestsrc num-buffers=90 ! x264enc profile=baseline ! mp4mux ! filesink location=test.mp4 produces High-profile mp4, while $ gst-launch-0.10 videotestsrc num-buffers=90 ! x264enc profile=baseline ! ffmux_mp4 ! filesink location=test.mp4 produces Baseline. People, please test this. And I'll try escalating this to upstream.

ildar avatar Jun 03 '12 05:06 ildar

I can confirm both the issue and its fix as proposed by ildar. In my system, changing "mp4mux" for "ffmux_mp4" produces baseline profile as expected. I am using Arista on Ubuntu 12.04.

RROXCAR avatar Jun 16 '12 14:06 RROXCAR

any news on this one?

onip avatar May 31 '13 09:05 onip

No update from my end as it seems to be an upstream issue. Feel free to switch to ffmux_mp4 locally but please have upstream GStreamer fix their qtmux/mp4mux elements as this is not just a problem for Arista.

danielgtaylor avatar Jun 07 '13 16:06 danielgtaylor

I'm a total gstreamer noob but, while searching I found that

  1. no issue is reported about this problem
  2. profile parameter is deprecated and actually removed in gstreamer-1
  3. adding h264parse seems to produce a (constrained-)baseline profile video

$ gst-launch-0.10 videotestsrc num-buffers=90 ! x264enc profile=baseline ! h264parse ! mp4mux ! filesink location=test.mp4

$ avprobe test.mp4 avprobe version 0.8.7, Copyright (c) 2007-2013 the Libav developers built on May 29 2013 16:42:45 with gcc 4.6.3 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42mp41isomiso2 creation_time : 2013-06-14 10:12:25 Duration: 00:00:03.00, start: 0.000000, bitrate: 1604 kb/s Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 320x240 [PAR 1:1 DAR 4:3], 1598 kb/s, 30 fps, 30 tbr, 3k tbn, 1073741824.00 tbc Metadata: creation_time : 2013-06-14 10:12:25

onip avatar Jun 14 '13 10:06 onip