<div><div>
            <div>
                <span>
                    <div><b>Hello, Community. </b><b>Please help. Have no result for about a month of experimenting.</b></div><div><br></div><div><b>Short:</b></div><div>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.</div><div><br></div><div><b>Long:</b></div><div>I am trying to transmit video from Compro tv tuner with hardware mpeg2 encoding.</div><div>It is transmitted by vlc without transcoding normally, but when transcoding to flv1 or h264 video - audio becomes out of sync with video.</div><div><br></div><div>I tried </div><div><ul><li>flv+mp3</li><li>h264+mp3</li><li>h264+aac </li></ul><div>With:</div><div><ul><li>mux=ts</li><li>mux=ffmpeg{mux=flv}</li></ul></div></div><div>The effect is the same with all variants. Audio-sync option have no effect also.</div><div><br></div><div><div>I was using vlc for encoding video stream from dazzle dvc100 usb video capture card before.</div><div>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.</div><div>I changed server and I am using current git version of vlc.</div><div>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.</div><div><br></div><div>IPTV box and vlc on client computer plays MPEG-TS stream well with audio-in-sync. </div><div><br></div><div>--------</div><div><br></div><div>FFMpeg out for MPEG-TS stream</div><div><div>Input #0, mpegts, from 'http://127.0.0.1:1234':</div><div>  Duration: N/A, start: 21104.119178, bitrate: 6192 kb/s</div><div>  Program 1 </div><div>    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</div><div>    Stream #0.1[0x45]: Audio: mp2, 48000 Hz, 2 channels, s16, 192 kb/s</div></div><div><br></div><div><br></div><div>TV Tuner</div></div><div><br></div><div>08:00.0 Multimedia video controller: Conexant Systems, Inc. CX23418 Single-Chip MPEG-2 Encoder with Integrated Analog Video/Broadcast Audio Decoder</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Subsystem: Compro Technology, Inc. Device e100</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>Flags: bus master, medium devsel, latency 64, IRQ 16</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Memory at f4000000 (32-bit, non-prefetchable) [size=64M]</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>Capabilities: <access denied></div><div><span class="Apple-tab-span" style="white-space:pre">  </span>Kernel driver in use: cx18</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>Kernel modules: cx18</div>
                </span>
                <span><div><span><br></span></div><div><span>Video4Linux2 options</span></div><div>v4l2-ctl --set-input 1</div><div>v4l2-ctl -c video_bitrate=6000000</div><div>v4l2-ctl -c video_peak_bitrate=6000000</div><div>v4l2-ctl -c video_bitrate_mode=1</div><div>v4l2-ctl -c audio_layer_ii_bitrate=9</div><div>v4l2-ctl -c brightness=50</div><div>v4l2-ctl -c volume=50000</div><div><br></div><div>vlc is running as VLM with "vlc -I telnet"</div><div><br></div><div>sending commands to VLM:</div><div><br></div><div><div>send "new tvdom broadcast enabled \r"</div><div>expect "new"</div><div>expect ">"</div></div><div><br></div><div><div>send "setup tvdom input pvr:// \r"</div><div>expect "setup"</div><div>expect ">"</div></div><div><br></div><div><div>send "setup tvdom output "</div><div>send "#duplicate{"</div><div>send "dst=\"std{access=http, mux=ts, dst=:1234}\","</div><div>send "dst=\"std{access=udp,  mux=ts, dst=10.11.12.158:5432}\","</div><div>send "dst=\"std{access=udp,  mux=ts, dst=255.0.0.211:1234}\","</div><div>send "dst=\"transcode{"</div><div>send            "deinterlace{mode=X},"</div><div>send            "vcodec=h264,"</div><div>send            "venc=x264{profile=baseline,level=3.1,keyint=100},"</div><div>send            "fps=25,"</div><div>send            "vb=2000,"</div><div>send            "acodec=aac,"</div><div>send            "ab=128,"</div><div>send            "samplerate=44100,"</div><div>send            "channels=2,"</div><div>send            "audio-sync"</div><div>send        "}:duplicate{"</div><div>send            "dst='std{"</div><div>send                "access=http{mime=video/x-flv},"</div><div>send                "mux=ffmpeg{mux=flv},"</div><div>send                "dst=0.0.0.0:8081/stream.flv"</div><div>send            "}',"</div><div>send            "dst='std{"</div><div>send                "access=http, mux=ts, dst=:1235"</div><div>send            "}'"</div><div>send        "}\","</div><div>send "dst=\"transcode{"</div><div>send            "deinterlace{mode=X},"</div><div>send            "vcodec=h264,"</div><div>send            "venc=x264{profile=baseline,level=3.1,keyint=100},"</div><div>send            "fps=25,"</div><div>send            "vb=1000,"</div><div>send            "scale=0.5,"</div><div>send            "acodec=aac,"</div><div>send            "ab=64,"</div><div>send            "samplerate=44100,"</div><div>send            "channels=1,"</div><div>send            "audio-sync"</div><div>send        "}:std{"</div><div>send            "access=http{mime=video/x-flv},"</div><div>send            "mux=ffmpeg{mux=flv},"</div><div>send            "dst=0.0.0.0:8082/stream.flv"</div><div>send        "}\""</div><div>send "}"</div><div><br></div><div>Visual representation: <a href="http://imageshack.us/f/146/12133015.png/">http://imageshack.us/f/146/12133015.png/</a></div><div><br></div></div>-- <br>Metasov Arthur<br>Отправлено с помощью <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a><br></span>
            </div>
        </div></div>