FAQ  •  Register  •  Login

Bad ffmpeg parameter causes transcode failure

<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Aug 20, 2012 11:24 pm

Bad ffmpeg parameter causes transcode failure

The transcoding of a SOPCAST http H264 stream to play on a Samsung TV fails with an ffmpeg error in both 1.0.1 and 1.0 beta2 per the below.
  Code:
1.0.1 LOG
2012-08-20 20:09:27,699 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: http://127.0.0.1:8902
2012-08-20 20:09:27,700 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -fflags +genpts -i http://127.0.0.1:8902 -y -copyts -c:v copy -vbsf h264_mp4toannexb -c:a ac3 -b:a 96k -ac 1 -map 0:1 -map 0:0 -sn -f mpegts pipe:
2012-08-20 20:09:29,293 WARN  [ProcessExecutor] Process cmd has a return code of 1! This is a possible error.
2012-08-20 20:09:29,293 DEBUG [TranscodingJobListener] Transcoding finished; successful: false
2012-08-20 20:09:30,170 DEBUG [NonClosingPipedInputStream] Closing piped input stream and closing related feeder process
2012-08-20 20:09:30,170 DEBUG [ProcessExecutor] Stopping external process: Thread[Thread-71,5,main]
2012-08-20 20:09:30,170 DEBUG [ProcessUtils] Killing the Windows process: 8256
2012-08-20 20:09:30,197 DEBUG [TranscodingJobListener] Transcoding finished; successful: true
2012-08-20 20:09:31,168 WARN  [PipedOutputBytesReader] Error reading bytes stream from external process: Stream closed
2012-08-20 20:09:54,203 DEBUG [StreamBasedTranscodingDeliveryStrategy] Transcoded stream is empty, connection may have been lost
2012-08-20 20:09:54,203 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file http://127.0.0.1:8902: AVC_TS_MP_SD_AC3_ISO
2012-08-20 20:09:54,203 DEBUG [ResourceDeliveryProcessor] Stream entity has length: 50000000000
2012-08-20 20:09:54,204 DEBUG [ResourceDeliveryProcessor] Sending file back

  Code:
1.0 BETA2 log
2012-08-20 17:47:39,244 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: http://localhost:8902
2012-08-20 17:47:39,244 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i http://localhost:8902 -y -async 1 -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 96k -ac 1 -map 0:1 -map 0:0 -sn -f mpegts pipe:
2012-08-20 17:47:44,747 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file http://localhost:8902: AVC_TS_MP_SD_AC3_ISO
2012-08-20 17:47:44,747 DEBUG [ResourceDeliveryProcessor] Stream entity has length: 50000000000
2012-08-20 17:47:44,747 DEBUG [ResourceDeliveryProcessor] Sending file back
2012-08-20 17:47:44,747 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,Content-Length: 50000000000,Date: Mon, 20 Aug 2012 21:47:44 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/1.0-SNAPSHOT,Cache-control: no-cache,contentFeatures.dlna.org: DLNA.ORG_PN=AVC_TS_MP_SD_AC3_ISO;DLNA.ORG_OP=00;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=8D500000000000000000000000000000,transferMode.dlna.org: Streaming,MediaInfo.sec: SEC_Duration=18000000;]]
2012-08-20 17:47:45,857 WARN  [ProcessExecutor] Process cmd has a return code of 1! This is a possible error.
2012-08-20 17:47:45,857 DEBUG [TranscodingJobListener] Transcoding finished; successful: false
2012-08-20 17:47:48,749 DEBUG [WebServer] I/O error: Pipe broken


If I execute the ffmpeg command standalone I get the FFMPEG error in both 1.0.1 and 1.0 BETA2 as below
  Code:
1.0.1 COMMAND
C:\Users\John>ffmpeg.exe -fflags +genpts -i http://127.0.0.1:8902 -y -copyts -c:
v copy -vbsf h264_mp4toannexb -c:a ac3 -b:a 96k -ac 1 -map 0:1 -map 0:0 -sn -f m
pegts d:\tv1.mpg
ffmpeg version N-41860-g6fd0b55 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 23 2012 19:49:05 with gcc 4.6.2
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --pkg-config=pk
g-config
  libavutil      51. 61.100 / 51. 61.100
  libavcodec     54. 29.100 / 54. 29.100
  libavformat    54. 11.100 / 54. 11.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 82.100 /  2. 82.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
[mpegts @ 003ef2e0] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 003ef2e0] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://127.0.0.1:8902':
  Duration: N/A, start: 26926.604178, bitrate: 96 kb/s
  Program 1
    Stream #0:0[0x58](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono,
s16, 96 kb/s
    Stream #0:1[0x59]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001
B), yuv420p, 646x396 [SAR 128:117 DAR 20672:11583], 34.55 fps, 25 tbr, 90k tbn,
50 tbc
[aformat @ 054bef20] auto-inserting filter 'auto-inserted resampler 0' between t
he filter 'Parsed_anull_0' and the filter 'aformat'
[auto-inserted resampler 0 @ 05544260] chl:mono fmt:s16 r:48000Hz -> chl:mono fm
t:flt r:48000Hz
[mpegts @ 05553620] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every
40 pkts
Output #0, mpegts, to 'd:\tv1.mpg':
  Metadata:
    encoder         : Lavf54.11.100
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 646x396 [SAR 128
:117 DAR 20672:11583], q=2-31, 34.55 fps, 90k tbn, 25 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, flt, 96 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (mp2 -> ac3)
Press [q] to stop, [?] for help
[NULL @ 05566d40] Warning: SPS NALU missing or invalid. The resulting stream may
 not play.
[NULL @ 05566d40] Warning: PPS NALU missing or invalid. The resulting stream may
 not play.
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: I
nvalid argument
[mpegts @ 05553620] H.264 bitstream malformed, no startcode found, use the h264_
mp4toannexb bitstream filter (-bsf h264_mp4toannexb)
av_interleaved_write_frame(): Invalid argument

  Code:
1.0 BETA2 COMMAND
C:\Users\John>"C:\Program Files\Serviio\lib\ffmpeg.exe" -i http://localhost:8902
 -y -async 1 -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 96k -ac
 1 -map 0:1 -map 0:0 -sn -f mpegts d:tcode.ts
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 13 2011 20:46:11 with gcc 4.4.2
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-co
nfig
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
[mpegts @ 019cb8c0] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 019cb8c0] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://localhost:8902':
  Duration: N/A, start: 18434.444178, bitrate: 96 kb/s
  Program 1
    Stream #0:0[0x58](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono,
s16, 96 kb/s
    Stream #0:1[0x59]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001
B), yuv420p, 646x396 [SAR 128:117 DAR 20672:11583], 27.70 fps, 25 tbr, 90k tbn,
50 tbc
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 05fb1700] channel_layout not specified
[ac3 @ 05fb1700] No channel layout specified. The encoder will guess the layout,
 but it might be incorrect.
[mpegts @ 05ecc020] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every
40 pkts
Output #0, mpegts, to 'd:tcode.ts':
  Metadata:
    encoder         : Lavf53.24.0
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 646x396 [SAR 128
:117 DAR 20672:11583], q=2-31, 27.70 fps, 90k tbn, 25 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, flt, 96 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (mp2 -> ac3)
Press [q] to stop, [?] for help
[NULL @ 05fb10e0] Warning: SPS NALU missing or invalid. The resulting stream may
 not play.
[NULL @ 05fb10e0] Warning: PPS NALU missing or invalid. The resulting stream may
 not play.
h264_mp4toannexb failed for stream 0, codec copy: Invalid argument
[mpegts @ 05ecc020] h264 bitstream malformated, no startcode found, use -vbsf h2
64_mp4toannexb
av_interleaved_write_frame(): Operation not permitted


However if I remove the -vbsf h264_mp4toannexb parameter from the command line, ffmpeg converts the file correctly.
  Code:
1.0.1 Command with -VBSF H264_MP$toannexb removed
ffmpeg version N-41860-g6fd0b55 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 23 2012 19:49:05 with gcc 4.6.2
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --pkg-config=pkg-config
  libavutil      51. 61.100 / 51. 61.100
  libavcodec     54. 29.100 / 54. 29.100
  libavformat    54. 11.100 / 54. 11.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 82.100 /  2. 82.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
[mpegts @ 003bf260] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 003bf260] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://127.0.0.1:8902':
  Duration: N/A, start: 27452.732178, bitrate: 96 kb/s
  Program 1
    Stream #0:0[0x58](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16, 96 kb/s
    Stream #0:1[0x59]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 646x396 [SAR 128:117 DAR 20672:11583], 53.02 fps, 25 tbr, 90k tbn, 50 tbc
[aformat @ 05544d80] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'aformat'
[auto-inserted resampler 0 @ 02e82940] chl:mono fmt:s16 r:48000Hz -> chl:mono fmt:flt r:48000Hz
[mpegts @ 02f1b740] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'd:\tv2.mpg':
  Metadata:
    encoder         : Lavf54.11.100
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 646x396 [SAR 128:117 DAR 20672:11583], q=2-31, 53.02 fps, 90k tbn, 25 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, flt, 96 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (mp2 -> ac3)
Press [q] to stop, [?] for help
frame=  865 fps=0.0 q=-1.0 size=    3072kB time=00:00:38.24 bitrate= 658.1kbits/
frame= 1276 fps=1001 q=-1.0 size=    4333kB time=00:00:54.68 bitrate= 649.2kbits
frame= 1297 fps=465 q=-1.0 size=    4400kB time=00:00:55.52 bitrate= 649.2kbits/
frame= 1326 fps=360 q=-1.0 size=    4499kB time=00:00:56.68 bitrate= 650.2kbits/
frame= 1353 fps=280 q=-1.0 size=    4572kB time=00:00:57.76 bitrate= 648.5kbits/
frame= 1374 fps=231 q=-1.0 size=    4632kB time=00:00:58.60 bitrate= 647.6kbits/
frame= 1402 fps=188 q=-1.0 size=    4706kB time=00:00:59.72 bitrate= 645.5kbits/
frame= 1430 fps=175 q=-1.0 size=    4774kB time=00:01:00.84 bitrate= 642.8kbits/
frame= 1479 fps=150 q=-1.0 size=    4934kB time=00:01:02.80 bitrate= 643.6kbits/
frame= 1520 fps=144 q=-1.0 size=    5039kB time=00:01:04.44 bitrate= 640.6kbits/
frame= 1528 fps=128 q=-1.0 size=    5055kB time=00:01:04.76 bitrate= 639.5kbits/
frame= 1570 fps=124 q=-1.0 size=    5187kB time=00:01:06.44 bitrate= 639.5kbits/
frame= 1594 fps=120 q=-1.0 Lsize=    5237kB time=00:01:07.40 bitrate= 636.5kbits
/s
video:3877kB audio:791kB subtitle:0 global headers:0kB muxing overhead 12.190212
%

  Code:
1.0 Beta 2 Command with -VBSF H264_MP$toannexb removed

C:\Users\John>"C:\Program Files\Serviio\lib\ffmpeg.exe" -i http://localhost:8902
 -y -async 1 -vcodec copy -copyts -acodec ac3 -ab 96k -ac 1 -map 0:1 -map 0:0 -s
n -f mpegts d:\tcode.mpg
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 13 2011 20:46:11 with gcc 4.4.2
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-co
nfig
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
[mpegts @ 016bb860] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 016bb860] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://localhost:8902':
  Duration: N/A, start: 18761.108178, bitrate: 96 kb/s
  Program 1
    Stream #0:0[0x58](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono,
s16, 96 kb/s
    Stream #0:1[0x59]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001
B), yuv420p, 646x396 [SAR 128:117 DAR 20672:11583], 26.74 fps, 25 tbr, 90k tbn,
50 tbc
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 015cfe00] channel_layout not specified
[ac3 @ 015cfe00] No channel layout specified. The encoder will guess the layout,
 but it might be incorrect.
[mpegts @ 01679660] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every
40 pkts
Output #0, mpegts, to 'd:\tcode.mpg':
  Metadata:
    encoder         : Lavf53.24.0
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 646x396 [SAR 128
:117 DAR 20672:11583], q=2-31, 26.74 fps, 90k tbn, 25 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, flt, 96 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (mp2 -> ac3)
Press [q] to stop, [?] for help
frame=  962 fps=188 q=-1.0 size=    3827kB time=00:00:38.86 bitrate= 806.7kbits/
frame= 1087 fps=153 q=-1.0 size=    4586kB time=00:00:43.86 bitrate= 856.5kbits/
frame= 1150 fps=134 q=-1.0 size=    4928kB time=00:00:46.38 bitrate= 870.3kbits/
frame= 1228 fps=111 q=-1.0 size=    5280kB time=00:00:49.50 bitrate= 873.6kbits/
frame= 1242 fps=102 q=-1.0 size=    5344kB time=00:00:50.06 bitrate= 874.3kbits/
frame= 1458 fps=107 q=-1.0 size=    6445kB time=00:00:58.70 bitrate= 899.3kbits/
frame= 1486 fps=100 q=-1.0 size=    6582kB time=00:00:59.82 bitrate= 901.3kbits/
frame= 1585 fps= 90 q=-1.0 size=    7029kB time=00:01:03.78 bitrate= 902.7kbits/
frame= 1626 fps= 84 q=-1.0 size=    7219kB time=00:01:05.42 bitrate= 903.9kbits/
frame= 1661 fps= 55 q=-1.0 size=    7380kB time=00:01:06.82 bitrate= 904.7kbits/
frame= 1704 fps= 48 q=-1.0 size=    7576kB time=00:01:08.54 bitrate= 905.4kbits/
frame= 1805 fps= 50 q=-1.0 size=    8124kB time=00:01:12.58 bitrate= 916.8kbits/
frame= 1816 fps= 48 q=-1.0 size=    8188kB time=00:01:13.02 bitrate= 918.4kbits/
frame= 1983 fps= 50 q=-1.0 size=    8939kB time=00:01:19.70 bitrate= 918.7kbits/
frame= 2123 fps= 47 q=-1.0 size=    9656kB time=00:01:25.30 bitrate= 927.3kbits/
frame= 2333 fps= 47 q=-1.0 size=   10517kB time=00:01:33.70 bitrate= 919.4kbits/
frame= 2368 fps= 46 q=-1.0 size=   10733kB time=00:01:35.10 bitrate= 924.4kbits/
frame= 2459 fps= 46 q=-1.0 size=   11230kB time=00:01:38.74 bitrate= 931.6kbits/


This demonstrates that this is a legacy error undetected until now.
The Samsung C/D profile simply transcodes the mp2 audio in an mpegts file to ac3 so i do not understand why such a compex ffmpeg command is being applied which causes this error.
Last edited by jhb50 on Tue Aug 21, 2012 7:36 pm, edited 2 times in total.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Aug 21, 2012 6:35 pm

Re: Bad ffmpeg parameter causes transcode failure

jhb50 wrote:This demonstrates that this is a legacy error undetected until now.
The Samsung C/D profile simply transcodes the mp2 audio in an mpegts file to ac3 so i do not understand why such a compex ffmpeg command is being applied which causes this error.

its not a complex command line.
ffmpeg.exe -i http://localhost:8902 -y -async 1 -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 96k -ac 1 -map 0:1 -map 0:0 -sn -f mpegts pipe:

audio codec is transcode to ac3;
h264 video codec is copied but usually h264_mp4toannexb video filter is needed, to you try to play the file without this video filter on your Samsung device ?

What is your OS? Did you use the ffmpeg version from serviio install package ?
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Aug 21, 2012 6:52 pm

Re: Bad ffmpeg parameter causes transcode failure

I also had problem with this video filter, don't know if the source code was changed, I will try with previous ffmpeg version.
viewtopic.php?f=20&t=4709&start=10#p50856
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Aug 21, 2012 7:06 pm

Re: Bad ffmpeg parameter causes transcode failure

I found this about the ffmpeg video filter:
http://ffmpeg.org/pipermail/ffmpeg-user ... 05664.html
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Tue Aug 21, 2012 11:34 pm

[Workaround found] Bad ffmpeg parameter causes transcode fai

Hi Illico:
Thanks for the reply. I assume it is an ffmpeg bug and I have used your tip to transcode any online mpegts AVC streams to mpeg2video. I don't think there are many online streams like that but that fixes it.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Aug 22, 2012 6:25 pm

Re: [Workaround found] Bad ffmpeg parameter causes transcode

jhb50 wrote:Hi Illico:
Thanks for the reply. I assume it is an ffmpeg bug and I have used your tip to transcode any online mpegts AVC streams to mpeg2video. I don't think there are many online streams like that but that fixes it.

OK.
we have to wait for a ffmpeg bug correction.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Aug 27, 2012 10:13 pm

Re: Bad ffmpeg parameter causes transcode failure

HI, this looks like a Serviio bug. The filter is only needed when remuxing h264 from mp4 to mpegts, becaouse mpegts stores the frames differently (annexb) than mp4. Your input container is already mpegts though, so this filtewr is not needed and should not be used.

https://bitbucket.org/xnejp03/serviio/i ... -if-source
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Aug 28, 2012 1:12 pm

Re: Bad ffmpeg parameter causes transcode failure

zip wrote:HI, this looks like a Serviio bug. The filter is only needed when remuxing h264 from mp4 to mpegts, becaouse mpegts stores the frames differently (annexb) than mp4. Your input container is already mpegts though, so this filtewr is not needed and should not be used.
https://bitbucket.org/xnejp03/serviio/i ... -if-source


Yes, looks like a serviio bug for jhb50 files, but for some particular streams (here), filter could also failed
http://ffmpeg.org/pipermail/ffmpeg-user ... 05664.html
there is a bug in libavcodec/h264_mp4toannexb_bsf.c when the ctx->length_size == 3 , the filter will report the error "Invalid argument"
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

ottomatic

DLNA master

Posts: 224

Joined: Fri Nov 09, 2012 10:15 am

Post Mon Feb 11, 2013 4:46 pm

Re: Bad ffmpeg parameter causes transcode failure

According to the bitbucket ticket mentioned earlier in this thread, the issue is resolved.

But I am still getting similar errors when remuxing a live HLS stream.

(Due to the short lifespan of a live stream it may be hard for you to reproduce.)

My SvtPlay Plugin delivers a ContentURLContainer item including the stream url "http://svt13hls-lh.akamaihd.net/i/svt13hls_0@78145/index_6_av-p.m3u8?sd=10&rebase=on&e=9e71786c28188672". The live-flag is set to true.

Serviio then attempts to play the live stream with the following command:

  Code:
C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -analyzeduration 10000000 -fflags +genpts -threads 0 -i http://svt13hls-lh.akamaihd.net/i/svt13hls_0@78145/index_6_av-p.m3u8?sd=10&rebase=on&e=9e71786c28188672 -y -copyts -c:v copy -bsf:v h264_mp4toannexb -c:a copy -map 0:0 -map 0:1 -sn -f mpegts pipe:


Here is the output from ffmpeg (when attempting to redirect the stream to disk rather than to pipe it):

  Code:
ffmpeg version N-49757-g969039e Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  9 2013 20:33:22 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.101 / 52. 17.101
  libavcodec     54. 91.102 / 54. 91.102
  libavformat    54. 62.100 / 54. 62.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 37.101 /  3. 37.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[h264 @ 0000000002419520] non-existing PPS referenced
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] non-existing PPS 0 referenced
[h264 @ 0000000002419520] decode_slice_header error
[h264 @ 0000000002419520] no frame!
[mpegts @ 00000000002f7fe0] Estimating duration from bitrate, this may be inaccurate
[h264 @ 0000000000336ee0] Missing reference picture, default is 0
[h264 @ 0000000000336ee0] decode_slice_header error
[h264 @ 0000000000336ee0] Missing reference picture, default is 0
[h264 @ 0000000000336ee0] decode_slice_header error
[h264 @ 0000000000336ee0] Missing reference picture, default is 0
[h264 @ 0000000000336ee0] decode_slice_header error
[h264 @ 0000000000336ee0] Missing reference picture, default is 0
[h264 @ 0000000000336ee0] decode_slice_header error
[hls,applehttp @ 000000000241fa20] Estimating duration from bitrate, this may be inaccurate
Input #0, hls,applehttp, from 'http://svt13hls-lh.akamaihd.net/i/svt13hls_0@78145/index_6_av-p.m3u8?sd=10&rebase=on&e=9e71786c28188672':
  Duration: 00:00:00.11, start: 50534.456222, bitrate: 34 kb/s
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
Output #0, mpegts, to 'c:\Otto filer\Temp\barnkanalen_4.ts':
  Metadata:
    encoder         : Lavf54.62.100
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: Invalid argument
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: Invalid argument

[Many lines identical to the above]



This is using the latest zeranoe ffmpeg static 64 bit.

In the bitbucket ticket you mention that the h264_mp4toannexb filter is only needed when remuxing from mp4 to mpegts. I am not sure what container the original stream is. But if I remove the h264_mp4toannexb filter from the ffmpeg command the resulting .ts-file is playable in VLC.

Any thoughts?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Feb 11, 2013 6:29 pm

Re: Bad ffmpeg parameter causes transcode failure

Yes it looks like the bug is not fixed. Another user in the SOPCAST thread also questioned it and said it would only work with my workaround for this 1.0.1 bug.

I'll reopen the ticket with a pointer here. ..looks like you did that already.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Feb 12, 2013 9:11 am

Re: Bad ffmpeg parameter causes transcode failure

I also have problem with pluzz plugin, Apple HTTP m3u8 stream. h264 annex filter does not work...I have to transcode to mpeg2video

viewtopic.php?f=20&t=4365&start=20#p62820
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

ottomatic

DLNA master

Posts: 224

Joined: Fri Nov 09, 2012 10:15 am

Post Tue Feb 12, 2013 9:18 am

Re: Bad ffmpeg parameter causes transcode failure

Illico wrote:I also have problem with pluzz plugin, Apple HTTP m3u8 stream. h264 annex filter does not work...I have to transcode to mpeg2video

viewtopic.php?f=20&t=4365&start=20#p62820


Illico,

It seems you won't have to transcode the HLS stream in version 1.2 of Serviio.

Until then, if you want to remux rather than transcode, you will need to use a ffmpeg wrapper which removes the faulty option before calling the proper ffmpeg binary. Of course, using such a wrapper will mean that your will not be able to serve up proper .MP4-files.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Feb 12, 2013 9:22 am

Re: Bad ffmpeg parameter causes transcode failure

ottomatic wrote:Illico,
It seems you won't have to transcode the HLS stream in version 1.2 of Serviio.

I have not had time yet to test the 1.2 beta version...I will check soon. Thanks.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

ottomatic

DLNA master

Posts: 224

Joined: Fri Nov 09, 2012 10:15 am

Post Tue Feb 12, 2013 9:38 am

Re: Bad ffmpeg parameter causes transcode failure

Illico wrote:
ottomatic wrote:Illico,
It seems you won't have to transcode the HLS stream in version 1.2 of Serviio.

I have not had time yet to test the 1.2 beta version...I will check soon. Thanks.


I'm still waiting for instructions on where to get the beta version :-)

At the moment, I'm only drawing conclusions from this bitbucket ticket:
https://bitbucket.org/xnejp03/serviio/i ... -if-source
<<

ottomatic

DLNA master

Posts: 224

Joined: Fri Nov 09, 2012 10:15 am

Post Tue Feb 12, 2013 9:40 am

Re: Bad ffmpeg parameter causes transcode failure

ottomatic wrote:I'm still waiting for instructions on where to get the beta version :-)


Nevermind, I figured it out...
<<

meensu

Serviio newbie

Posts: 7

Joined: Sat May 04, 2013 9:29 pm

Post Sat May 04, 2013 9:59 pm

Re: Bad ffmpeg parameter causes transcode failure

Hi, Am still getting a similar error (Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: Invalid argument).
Please help!

I am using serviio-1.2.1 with ffmpeg 1.2 on Linux and my TV is a samsung D series.

  Code:
Cmdline used by serviio:
ffmpeg -analyzeduration 10000000 -fflags +genpts -threads 1 -i 'rtmp://cdn.rtmp1.yupptv.tv/pnwk playpath=suntvus pageUrl=http://www.yupptv.com/account/FlashPlayerFrame.aspx swfUrl=http://www.yupptv.com/yupptvhdflvplayer/hdplayer.swf' -y -c:v copy -bsf:v h264_mp4toannexb -c:a ac3 -b:a 384k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts pipe:

ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 17 2013 03:15:01 with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
  configuration: --enable-librtmp --enable-libmp3lame --enable-libx264 --enable-gpl --enable-nonfree --enable-libx264
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Metadata:
  audiochannels         2.00
  audiocodecid          10.00
  audiosamplerate       44100.00
  height                288.00
  videocodecid          7.00
  width                 512.00
[flv @ 0x9a46660] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'rtmp://cdn.rtmp1.yupptv.tv/pnwk playpath=suntvus pageUrl=http://www.yupptv.com/account/FlashPlayerFrame.aspx swfUrl=http://www.yupptv.com/yupptvhdflvplayer/hdplayer.swf':
  Metadata:
    audiochannels   : 2
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuv420p, 512x288 [SAR 1:1 DAR 16:9], 25 tbr, 1k tbn, 50 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp
Output #0, mpegts, to 'pipe:':
  Metadata:
    audiochannels   : 2
    encoder         : Lavf54.63.104
    Stream #0:0: Video: h264, yuv420p, 512x288 [SAR 1:1 DAR 16:9], q=2-31, 90k tbn, 25 tbc
    Stream #0:1: Audio: ac3, 44100 Hz, stereo, fltp, 384 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (aac -> ac3)
Press [q] to stop, [?] for help
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: Invalid argument
[mpegts @ 0x9ba4ca0] st:0 PTS: 420480 DTS: 416880 < 416881 invalid, clipping
[mpegts @ 0x9ba4ca0] H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)
av_interleaved_write_frame(): Invalid argument
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed May 08, 2013 10:44 pm

Re: Bad ffmpeg parameter causes transcode failure

I tried the exact command in the Windows FFmpeg and it runs. try to run this and post the output here

  Code:
ffmpeg -bsfs

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 39 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.