<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>I haven't managed to get lossless transcoding working for H.264, only MPEG-2. Anyone else had better luck?</div>
</div></blockquote></div><div><br></div><div>Yes, slightly. I've been using the script below in a user job (with cvlc from VLC) to do a stream copy of H.264 video while transcoding the audio from LATM to straight AAC.</div>
<div><br></div><div>I couldn't figure out how to get audio sync perfect, but that's not a big enough problem for me (or WAF). I wonder if ffmpeg has stable mainline LATM support planned for the near future?</div>
<div>
<br></div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">#!/bin/bash</font></div><div><font class="Apple-style-span" face="'courier new', monospace">if echo $1 | egrep -q '^2003'; then</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="'courier new', monospace">        </font></span><font class="Apple-style-span" face="'courier new', monospace">exit 0</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">fi</font></div><div><font class="Apple-style-span" face="'courier new', monospace">FILE=/var/lib/mythtv/recordings/$1</font></div><div><font class="Apple-style-span" face="'courier new', monospace">cvlc $FILE --quiet --sout="#transcode{acodec=mp4a,ab=192,channels=2,samplerate=48000}:standard{mux=ts,dst=$FILE.new,access=file}:sout-transcode-soverlay=0" vlc://quit 2>/dev/null</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">mv $FILE $FILE.old</font></div><div><font class="Apple-style-span" face="'courier new', monospace">mv $FILE.new $FILE</font></div><div><font class="Apple-style-span" face="'courier new', monospace">rm $FILE.old</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">/usr/bin/mythcommflag --rebuild --very-quiet -f $FILE</font></div><div><font class="Apple-style-span" face="'courier new', monospace">chown mythtv:mythtv $FILE</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">chmod 6775 $FILE</font></div><div><br></div></div>