After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764714 - Android: Discrepancy with SPS/PPS syntax of hardware encoder (omxqcomvideoencoderavc)
Android: Discrepancy with SPS/PPS syntax of hardware encoder (omxqcomvideoenc...
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-omx
1.8.0
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-07 10:22 UTC by urchikkamath
Modified: 2018-05-01 06:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Snapshot of isoviewer parse (191.83 KB, image/png)
2016-04-12 11:51 UTC, urchikkamath
Details
Gstreamer log without h264parser after encoder (343.27 KB, text/x-vhdl)
2016-04-12 12:52 UTC, urchikkamath
Details

Description urchikkamath 2016-04-07 10:22:51 UTC
Hi Everyone,
I've found discrepancy between media stream generated with gstreamer release 1.8 and gstreamer release 1.4. Video stream generated with 1.4 (Pls refer media file 20160406_152750_1_4_GST) has single sps/pps in first NALU where as video stream generated with 1.8(Pls refer media file 20160406_152401_1_8_GST) has repeated sps/pps in first NALU unit. Video stream 20160406_152750_1_4_GST playbacks smoothly on all android media players and 20160406_152401_1_8_GST playback only with native player of the device(Samsung S4) also with VLC player and failed to playback with other media players like Google Photos. I've validate the syntax of NALU with iso-viewer. 

Media Files Link:
https://s3-eu-west-1.amazonaws.com/ccstaticfiles/20160406_152401_1_8_GST.mp4
https://s3-eu-west-1.amazonaws.com/ccstaticfiles/20160406_152750_1_4_GST.mp4

Hardware encoder: omxqcomvideoencoderavc 

Pipeline:
sprintf(gst_launch_pipeline, "filesrc location=%s ! qtdemux name=demux demux.audio_0 ! queue  max-size-time=5000000000    ! audio/mpeg,mpegversion=4 ! mp4mux name=mux ! filesink name=sink location=%s demux.video_0 !  h264parse !  amcviddec-omxqcomvideodecoderavc ! queue ! video/x-raw,width=%ld,height=%ld,format=\(string\)NV12 ! amcvidenc-omxqcomvideoencoderavc bitrate=%ld i-frame-interval=2 ! video/x-h264 ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=0 ! h264parse ! mux.video_0", input_file, output_file, (int)data->width, (int)data->height, targetBitrate);

Testing Environment:
Android Versions: 5.0 and 4.3
Device: Samsung Galaxy S4 GT -I9506
SoC: Qualcomm Sanpdragon 800 2.27 GHz
Cores: 4 
Thanks,
-Uma
Comment 1 Sebastian Dröge (slomo) 2016-04-07 17:11:59 UTC
Does it work better without the h264parse after the encoder? With duplicated SPS/PPS, you mean there's SPS/PPS in the beginning and then right after that again SPS/PPS and then the first frame? Or do you mean SPS/PPS is repeated before every keyframe but there's not SPS/PPS followed by SPS/PPS?
Comment 2 urchikkamath 2016-04-12 11:50:21 UTC
Hi Sebastian,
Pipeline not works without h264parse after encoder. Here duplicated SPS/PPS means
there's SPS/PPS in the beginning and then right after that again SPS/PPS and then the first frame. For reference I've attached the snapshot of isoviewer. You can see AvcSample(0) has repeated SPS/PPS
Comment 3 urchikkamath 2016-04-12 11:51:58 UTC
Created attachment 325790 [details]
Snapshot of isoviewer parse

AvcSample(0) has repeated SPS/PPS
Comment 4 Sebastian Dröge (slomo) 2016-04-12 12:08:04 UTC
You mean it *now* works without h264parse? Or it does *not* work?
Comment 5 urchikkamath 2016-04-12 12:50:05 UTC
No confusion. without h264parser pipeline does not works. 

E/GStreamer+GST_PIPELINE(17394): 0:00:01.469155416 0xa03bdd80 ./grammar.y:642:gst_parse_perform_link could not link queue2 to mux
W/art     (17394): Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[12,tid=17446,Native,Thread*=0x9ef44400,peer=0x12f32080,"Thread-8233"]
I/videotranscoder(17394): Transcoding of  /storage/emulated/0/DCIM/Camera/20160406_152401.mp4  not successful.

Please find attached detail log(764714.log)
Comment 6 urchikkamath 2016-04-12 12:52:18 UTC
Created attachment 325796 [details]
Gstreamer log without h264parser after encoder
Comment 7 Edward Hervey 2018-05-01 06:58:22 UTC
No updates in 2 years. Decoders requires parsers to work. Closing.