gstreamer audio /video sync while encoding raw files(.yuv & .wav)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

gstreamer audio /video sync while encoding raw files(.yuv & .wav)

devil coder
Hi experts,

I am trying to encode raw inputs (.yuv 420 and .wav ) using gstreamer
command line tool, but i am getting audio very late when compare to video.

Here is my command line




same command line (in single line)


               

Kindly guide my in right direction.

 
Notes:-
a) I have video input file "Transformers1080p.yuv" &
audio input file "Transformers1080p.wav"
b) codecs h264, aac
c) output is .ts file.






-----
adi
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
adi
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer audio /video sync while encoding raw files(.yuv & .wav)

Nicolas Dufresne-5
I know this is confusing, but this is a mailing list not a forum, as a side effect, we are missing a lot of information here, try to use text instead of images or some html/markdown nabble features.

Le lun. 21 mai 2018 09:22, new baby <[hidden email]> a écrit :
Hi experts,

I am trying to encode raw inputs (.yuv 420 and .wav ) using gstreamer
command line tool, but i am getting audio very late when compare to video.

Here is my command line




same command line (in single line)




Kindly guide my in right direction.


Notes:-
a) I have video input file "Transformers1080p.yuv" &
audio input file "Transformers1080p.wav"
b) codecs h264, aac
c) output is .ts file.






-----
adi
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer audio /video sync while encoding raw files(.yuv & .wav)

devil coder
yeah Nicolas, thanks for suggestion..i added command line  as raw text option
but interview it was their but now its gone..

*this is my command line .. *
gst-launch-1.0.exe  -v filesrc location=Transformers1080p.wav
do-timestamp=true !  wavparse ! queue max-size-buffers=0 max-size-time=0
max-size-bytes=0 min-threshold-time=0000000000 !  audioconvert   !
audio/x-raw, format=S16LE, rate=44100, channels=2 !  voaacenc  ! mux.
filesrc location=Transformers1080p.yuv  !  videoparse  width=1920
height=1080 framerate=30/1 ! do-timestamp=true queue max-size-buffers = 0
max-size-time = 0 max-size-bytes = 0 min-threshold-time = 0 !  x264enc
bitrate=8000 !  queue  !  mpegtsmux name = mux ! filesink location=final.ts
               






-----
adi
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
adi
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer audio /video sync while encoding raw files(.yuv & .wav)

devil coder
***preview** not interview..

Can you suggest any changes in the command line , its giving audio video
sync issues , i mean audio is played very late .





-----
adi
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
adi
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer audio /video sync while encoding raw files(.yuv & .wav)

Nicolas Dufresne-5
In reply to this post by devil coder
Le lundi 21 mai 2018 à 21:33 -0700, new baby a écrit :
> yeah Nicolas, thanks for suggestion..i added command line  as raw text option
> but interview it was their but now its gone..
>
> *this is my command line .. *
> gst-launch-1.0.exe  -v filesrc location=Transformers1080p.wav
> do-timestamp=true !  wavparse ! queue max-size-buffers=0 max-size-time=0

do-timestamp makes no sense here, it's bytes at this stage. wavparse
should be taking care.

> max-size-bytes=0 min-threshold-time=0000000000 !  audioconvert   !
> audio/x-raw, format=S16LE, rate=44100, channels=2 !  voaacenc  ! mux.
> filesrc location=Transformers1080p.yuv  !  videoparse  width=1920
> height=1080 framerate=30/1 ! do-timestamp=true queue max-size-buffers = 0
> max-size-time = 0 max-size-bytes = 0 min-threshold-time = 0 !  x264enc
> bitrate=8000 !  queue  !  mpegtsmux name = mux ! filesink location=final.ts
>

Assuming you got the framerate and audio rate right, the only reason
you would get things out of sync, is because these were not captures
from the same point in time. To introduce a timeshift on one of the
branch, you have to control the pad-offset on one of the pads (at a
point in the pipeline were the data in in TIME format). This can only
be done grammatically atm (unless I'm forgetting about something).

>
>
>
>
>
> -----
> adi
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer audio /video sync while encoding raw files(.yuv & .wav)

Baby Octopus
Administrator
> To introduce a timeshift on one of the
> branch, you have to control the pad-offset on one of the pads (at a
> point in the pipeline were the data in in TIME format). This can only
> be done grammatically atm (unless I'm forgetting about something).

May be its a good idea to add this to identity element's property

~BO



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer audio /video sync while encoding raw files(.yuv & .wav)

devil coder
In reply to this post by Nicolas Dufresne-5
thanks for replies..
yeah sure i will remove do-timestamp=true.. thanks for pointing out

I analyze the video codec properties .. it state its fps was 24 fps but i
was giving 30 fps , so its was not in sync .

just got it right ..


// gst - launch - 1.0.exe - v filesrc location = Race3SalmanKhan720p.wav
// do-timestamp=true ! wavparse ! queue max-size-buffers=0 max-size-time=0
// max-size-bytes=0 min-threshold-time=0000000000 !audioconvert  
// !audio/x-raw, format=S16LE, rate=44100, channels=2 ! voaacenc
// !mux.filesrc location = Race3SalmanKhan720p.yuv  !videoparse  
// width=1280 height=720 framerate=24/1   !x264enc bitrate=1000
// ! queue   ! h264parse ! mpegtsmux name = mux ! filesink location =
final.ts



-----
adi
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
adi