Page 1 of 2
audio out of sync when transcoding..

Posted:
Fri Jan 11, 2013 3:31 am
by thenamelessthing
Hi all, when transcoding is used. The audio became out of sync after few second. The profile used is the Panasonic Viera E/S/ST/VT (2011).
Here is the command used by ffmpeg:
2013-01-10 22:20:04,413 DEBUG [ProcessExecutor] Starting ffmpeg -threads auto -i /data/Teleseries/Jekyll.S01.FRENCH.PDTV.XViD-NYJ/Jekyll.S01E05.FRENCH.PDTV.XViD-NYJ/Jekyll.S01E05.FRENCH.PDTV.XViD-NYJ.avi -y -copyts -c:v mpeg2video -qscale:v 3 -r 25 -g 15 -c:a ac3 -b:a 128k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-6434-viera2011-ORIGINAL.stf
I also try with Best video quality and downmix to stereo without any success. I also select to use 4 core on the 6 my cpu have. And I have 2.4gb of free ram when transcoding and enough space disk.
Here is the info if the file played:
media@mediastation:/data/Teleseries/Jekyll.S01.FRENCH.PDTV.XViD-NYJ/Jekyll.S01E05.FRENCH.PDTV.XViD-NYJ$ ffmpeg -i Jekyll.S01E05.FRENCH.PDTV.XViD-NYJ.avi
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 27 2012 00:44:49 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-librtmp --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, avi, from 'Jekyll.S01E05.FRENCH.PDTV.XViD-NYJ.avi':
Metadata:
encoder : MediaCoder 0.6
Duration: 00:51:30.08, start: 0.000000, bitrate: 941 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 640x352 [SAR 183:178 DAR 1830:979], SAR 11264:10955 DAR 4096:2191, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 128 kb/s
Thanks for your help!
Re: audio out of sync when transcoding..

Posted:
Sat Jan 12, 2013 5:55 pm
by zip
It you run the ffmpeg command and rename the .stf file to .g, add it to your library, does it play correctly?
Re: audio out of sync when transcoding..

Posted:
Sat Jan 12, 2013 9:50 pm
by thenamelessthing
Sorry for this "noob" question, but how I add it to the library? And what happen by only renaming .stf file to .g ? ( i want understand how serviio works in the background)
Re: audio out of sync when transcoding..

Posted:
Sun Jan 13, 2013 3:56 pm
by zip
sorry, was a typo.. rename it to .mpg and copy to a shared folder, then play (without transcoding)
Re: audio out of sync when transcoding..

Posted:
Sun Jan 13, 2013 9:56 pm
by thenamelessthing
I have do what you have asked. When I play the mpg on my computer it work fine. On tv I always have the audio sync problem. ;-(
EDIT: even .mkv have the audio sync problem!!!!!!!!!
Re: audio out of sync when transcoding..

Posted:
Tue Jan 15, 2013 3:48 am
by thenamelessthing
So, I think with this info maybe it's not a transcoding problem...
Re: audio out of sync when transcoding..

Posted:
Tue Jan 15, 2013 4:30 am
by thenamelessthing
Maybe the router is my problem? ( linksys wrt54gl ) But the load seem to be okay..
Re: audio out of sync when transcoding..

Posted:
Tue Jan 15, 2013 5:19 pm
by zip
so the .mpg file, when played on TV has the problem, right?
Try this:
- Code:
ffmpeg -threads auto -i "/data/Teleseries/Jekyll.S01.FRENCH.PDTV.XViD-NYJ/Jekyll.S01E05.FRENCH.PDTV.XViD-NYJ/Jekyll.S01E05.FRENCH.PDTV.XViD-NYJ.avi" -y -copyts -async 1 -c:v mpeg2video -qscale:v 3 -r 25 -g 15 -c:a ac3 -b:a 128k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/test.mpg
Then try to play test.mpg on your TV.
Re: audio out of sync when transcoding..

Posted:
Tue Jan 15, 2013 5:23 pm
by thenamelessthing
Yes the fila has the problem on tv.
Ok I will do it this evening...
Thanks you for your help.
Re: audio out of sync when transcoding..

Posted:
Wed Jan 16, 2013 2:36 am
by thenamelessthing
I have do the test you suggest. The problem is still here! I also tried to put the file on an usb stick and play it directly on the tv. Same problem occur. With these test at least I can say it's not a network problem!
Re: audio out of sync when transcoding..

Posted:
Wed Jan 16, 2013 1:41 pm
by zip
does it play out-of-sync in VLC?
Re: audio out of sync when transcoding..

Posted:
Wed Jan 16, 2013 4:18 pm
by thenamelessthing
I have checked this yesterday with mplayer (ubuntu) and the audio was ok. I can check this evening in vlc if it's really important.
Re: audio out of sync when transcoding..

Posted:
Wed Jan 16, 2013 5:01 pm
by zip
do ll your files have this problem? It looks like a problem of the TV. Do you have the latest firmware?
Re: audio out of sync when transcoding..

Posted:
Wed Jan 16, 2013 6:11 pm
by thenamelessthing
I will check this evening if a new firmware is available I will try to contact Panasonic too . I have updated the firmware in november. It's not ALL files who have the problem but most of all. If I remember correctly (i'm not at home) I have mkv files in 720p who work fine. The problem seem to affect some avi file (HD or not) who are transcoded and some mkv (1080p) who are not transcoded.
To be continued
Re: audio out of sync when transcoding..

Posted:
Thu Jan 17, 2013 2:44 am
by thenamelessthing
Shit happen! It really look a tv problem!
I have some file who play correctly like:
media@mediastation:/data/Dessins_Animes/Young.Justice.Saison.01.FRENCH.HDTV.XViD-KENT/Young.Justice.S01E01.FRENCH.DVDRIP.XviD-KENT$ ffmpeg -i Young.Justice.S01E01.FRENCH.DVDRIP.XviD-KENT.avi
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 27 2012 00:44:49 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-librtmp --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[avi @ 0x1fbb160] non-interleaved AVI
[mpeg4 @ 0x1fc15c0] Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from 'Young.Justice.S01E01.FRENCH.DVDRIP.XviD-KENT.avi':
Metadata:
encoder : FairUse Wizard -
http://fairusewizard.com Duration: 00:22:40.44, start: 0.000000, bitrate: 1077 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 128 kb/s
and :
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 27 2012 00:44:49 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-librtmp --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, matroska,webm, from 'Transformers.Prime.S01E01.Darkness.Rising.Part.1.FR.LD.720p.WEB.DL.AC3.H264.REPACK.splanck-BaLLanTeAm.mkv':
Metadata:
title : Transformers.Prime.S01E01.Darkness.Rising.Part.1.720p.WEB.DL.DD5.1.AAC2.0.H264.BluZilla.mkv 6089
creation_time : 2011-11-20 19:37:32
Duration: 00:21:06.56, start: 0.000000, bitrate: 4801 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 2k tbc (default)
Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), s16, 448 kb/s (default)
Versus these files who have the out of sync audio problem:
media@mediastation:/data/Films/HD$ ffmpeg -i The.Expendables.2.2012.FRENCH.1080p.BluRay.x264.AC3.DECISION.mkv
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 27 2012 00:44:49 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-librtmp --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, matroska,webm, from 'The.Expendables.2.2012.FRENCH.1080p.BluRay.x264.AC3.DECISION.mkv':
Metadata:
creation_time : 2012-11-17 18:49:58
Duration: 01:42:18.30, start: 0.000000, bitrate: 11397 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
title : The Expendables 2 2012 FRENCH 1080p BluRay x264 AC3-DECISION
Stream #0:1(fre): Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s (default) (forced)
Stream #0:2(fre): Subtitle: text (default) (forced)
Metadata:
title : force
and
media@mediastation:/data/Films/HD/Looper.2012.FRENCH.1080p.BluRay.x264-AUTOPSiEHD$ ffmpeg -i Looper.2012.FRENCH.1080p.BluRay.x264-AUTOPSiEHD.mkv
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 27 2012 00:44:49 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-librtmp --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[matroska,webm @ 0x2694160] max_analyze_duration 5000000 reached at 5005000
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, matroska,webm, from 'Looper.2012.FRENCH.1080p.BluRay.x264-AUTOPSiEHD.mkv':
Metadata:
creation_time : 2012-12-22 19:13:44
Duration: 01:58:53.12, start: 0.000000, bitrate: 13044 kb/s
Stream #0:0: Video: h264 (High), yuv420p, 1920x816, SAR 1:1 DAR 40:17, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1: Audio: ac3, 48000 Hz, 5.1, s16 (default)
Metadata:
title : FRENCH AC3 5.1 @ 448 Kbps
and
media@mediastation:/data/Teleseries/Jekyll.S01.FRENCH.PDTV.XViD-NYJ/Jekyll.S01E01.FRENCH.PDTV.XViD-NYJ$ ffmpeg -i Jekyll.S01E01.FRENCH.PDTV.XViD-NYJ.avi
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 27 2012 00:44:49 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-librtmp --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, avi, from 'Jekyll.S01E01.FRENCH.PDTV.XViD-NYJ.avi':
Metadata:
encoder : Lavf52.18.0
Duration: 00:51:51.88, start: 0.000000, bitrate: 1479 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 640x352 [SAR 11:15 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 194 kb/s
I have contacted Panasonic, the first thing they suggest is the Factory reset the TV. Done without any good result.
I can confirm i'm at the latest firmware version.
Any other advices? (transcoding into a file format who play fine like file at the top of this post??)
Re: audio out of sync when transcoding..

Posted:
Thu Jan 17, 2013 9:46 am
by zip
Did you try disabling transcoding?
Re: audio out of sync when transcoding..

Posted:
Thu Jan 17, 2013 1:35 pm
by thenamelessthing
I will try this this evening.. (disabling transcoding)
I have obtained the supported file format supported by the tv:
Media Player Supported Formats AVCHD 3D / Progressive, SD-VIDEO / MotionJPEG (Lumix) / MKV / MP4 / MOV / M4v / FLV / 3GPP / VRO / VOB / TS / PS, MP3 / AAC / FLAC, JPEG / MPO
Do you know if AC3 and AAC is the same thing?
Re: audio out of sync when transcoding..

Posted:
Thu Jan 17, 2013 2:01 pm
by zip
they are not
Re: audio out of sync when transcoding..

Posted:
Fri Jan 18, 2013 1:29 am
by thenamelessthing
With transcoding disable same problem. I have open a ticket on panasonic. 2-4 working day before having news from technical support (level 2). I think it's a bug in her firmware. on my 2 tv I have the same problem and they are from the same series... I will poste the panasonic answer/solution when I obtain it.
Thanks you zip for helping me to debug this weird case!
Re: audio out of sync when transcoding..

Posted:
Wed Jan 23, 2013 2:24 am
by thenamelessthing
Hi, I think I have found something!
I have used handbreak to convert one of my file we have use on our test (. And I have re-encoded the audio in the same format but with a little change. The original audio used was AAC (faac) and I changed it for: AAC (ffmpeg) and the mpeg to mkv and the audio are now sync!! maybe this info can us to solve the problem?
Here is the result of the file who play fine now...
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec 27 2012 00:44:49 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-librtmp --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, matroska,webm, from 'test2.mkv':
Duration: 00:51:30.00, start: 0.000000, bitrate: 766 kb/s
Stream #0:0(eng): Video: h264 (Main), yuv420p, 640x352 [SAR 1:1 DAR 20:11], 25 fps, 25 tbr, 1k tbn, 180k tbc (default)
Stream #0:1: Audio: aac, 48000 Hz, stereo, s16 (default)
At least one output file must be specified