[vlc] Audio not in sync when transcoding mp2 stream

Metasov Arthur metasov at gmail.com
Tue Jul 12 16:23:55 CEST 2011


Hello, Community. Please help. Have no result for about a month of experimenting.

Short:
Transcoding video from hardware mpeg2-encoding tuner to flv1 or h264 becomes out-of-sync with audio stream. Audio-sync option has no effect. Streaming with MPEG-TS without transcoding works well.

Long:
I am trying to transmit video from Compro tv tuner with hardware mpeg2 encoding.
It is transmitted by vlc without transcoding normally, but when transcoding to flv1 or h264 video - audio becomes out of sync with video.

I tried 
flv+mp3
h264+mp3
h264+aac 

With:
mux=ts
mux=ffmpeg{mux=flv}



The effect is the same with all variants. Audio-sync option have no effect also.

I was using vlc for encoding video stream from dazzle dvc100 usb video capture card before.
This card have no hardware video encoding. Stream was encoded to mp2 video mpeg-ts stream and then to flv stream for website flash player without any audio-sync issues.
I changed server and I am using current git version of vlc.
When trying to transcode mpeg-ts stream from new server with an old server with old vlc (which worked well with Dazzle dvc100) I have same audio-out-of-sync issue, so this is unrelated of vlc version.

IPTV box and vlc on client computer plays MPEG-TS stream well with audio-in-sync. 

--------

FFMpeg out for MPEG-TS stream
Input #0, mpegts, from 'http://127.0.0.1:1234':
Duration: N/A, start: 21104.119178, bitrate: 6192 kb/s
Program 1 
Stream #0.0[0x44]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 6000 kb/s, 26.96 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x45]: Audio: mp2, 48000 Hz, 2 channels, s16, 192 kb/s



TV Tuner

08:00.0 Multimedia video controller: Conexant Systems, Inc. CX23418 Single-Chip MPEG-2 Encoder with Integrated Analog Video/Broadcast Audio Decoder
Subsystem: Compro Technology, Inc. Device e100
Flags: bus master, medium devsel, latency 64, IRQ 16
Memory at f4000000 (32-bit, non-prefetchable) [size=64M]
Capabilities: <access denied>
Kernel driver in use: cx18
Kernel modules: cx18

Video4Linux2 options
v4l2-ctl --set-input 1
v4l2-ctl -c video_bitrate=6000000
v4l2-ctl -c video_peak_bitrate=6000000
v4l2-ctl -c video_bitrate_mode=1
v4l2-ctl -c audio_layer_ii_bitrate=9
v4l2-ctl -c brightness=50
v4l2-ctl -c volume=50000

vlc is running as VLM with "vlc -I telnet"

sending commands to VLM:

send "new tvdom broadcast enabled \r"
expect "new"
expect ">"


send "setup tvdom input pvr:// \r"
expect "setup"
expect ">"


send "setup tvdom output "
send "#duplicate{"
send "dst=\"std{access=http, mux=ts, dst=:1234}\","
send "dst=\"std{access=udp, mux=ts, dst=10.11.12.158:5432}\","
send "dst=\"std{access=udp, mux=ts, dst=255.0.0.211:1234}\","
send "dst=\"transcode{"
send "deinterlace{mode=X},"
send "vcodec=h264,"
send "venc=x264{profile=baseline,level=3.1,keyint=100},"
send "fps=25,"
send "vb=2000,"
send "acodec=aac,"
send "ab=128,"
send "samplerate=44100,"
send "channels=2,"
send "audio-sync"
send "}:duplicate{"
send "dst='std{"
send "access=http{mime=video/x-flv},"
send "mux=ffmpeg{mux=flv},"
send "dst=0.0.0.0:8081/stream.flv"
send "}',"
send "dst='std{"
send "access=http, mux=ts, dst=:1235"
send "}'"
send "}\","
send "dst=\"transcode{"
send "deinterlace{mode=X},"
send "vcodec=h264,"
send "venc=x264{profile=baseline,level=3.1,keyint=100},"
send "fps=25,"
send "vb=1000,"
send "scale=0.5,"
send "acodec=aac,"
send "ab=64,"
send "samplerate=44100,"
send "channels=1,"
send "audio-sync"
send "}:std{"
send "access=http{mime=video/x-flv},"
send "mux=ffmpeg{mux=flv},"
send "dst=0.0.0.0:8082/stream.flv"
send "}\""
send "}"

Visual representation: http://imageshack.us/f/146/12133015.png/

-- 
Metasov Arthur
Отправлено с помощью Sparrow (http://www.sparrowmailapp.com/?sig)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20110712/8c24cbdc/attachment.html>


More information about the vlc mailing list