Page 1 of 1

Format m4v: Could not find codec parameters (Video: mpeg4)

PostPosted: Tue Dec 04, 2012 7:19 pm
by miksa
Hi, any idea why cannot this online file be transcoded?

http://trailers.apple.com/movies/independent/thedetails/details-tlr1_a720p.m4v

ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 10 2012 03:40:45 with gcc 4.6.3
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. 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
[m4v @ 0182CD60] Format m4v detected only with low score of 1, misdetection possible!
[mpeg4 @ 0182F4A0] header damaged
[m4v @ 0182CD60] decoding for stream 0 failed
[m4v @ 0182CD60] Could not find codec parameters (Video: mpeg4, yuv420p)
[m4v @ 0182CD60] Estimating duration from bitrate, this may be inaccurate

http://trailers.apple.com/movies/independent/thedetails/details-tlr1_a720p.m4v:could not find codec parameters

Re: Format m4v: Could not find codec parameters (Video: mpeg

PostPosted: Wed Dec 05, 2012 12:17 am
by miksa
interesting, that Universal Media Server transcodes and plays such files Ok.

Serviio log:
2012-12-04 19:11:23,968 DEBUG [org.serviio.external.FFMPEGWrapper] Invoking FFMPEG to retrieve media information for file: http://trailers.apple.com/movies/indepe ... _a720p.m4v
2012-12-04 19:11:23,968 DEBUG [org.serviio.external.ProcessExecutor] Starting C:\apps\Serviio\lib/ffmpeg.exe -i http://trailers.apple.com/movies/indepe ... _a720p.m4v
2012-12-04 19:11:24,125 WARN [org.serviio.library.online.metadata.FeedUpdaterThread] Failed to retrieve online item information for http://trailers.apple.com/movies/indepe ... _a720p.m4v. It might not play.
java.io.IOException: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video file type.
at org.serviio.library.online.metadata.FeedUpdaterThread.retrieveMetadata(FeedUpdaterThread.java:291)


UMS log:
INFO 2012-12-04 19:13:27.593 [New I/O server worker #10-1] Starting transcode/remux of Wreck-It Ralph
DEBUG 2012-12-04 19:13:27.593 [New I/O server worker #10-1] Creating pipe \\.\pipe\pmsencoder_transcoder_out_1354666407593_663
DEBUG 2012-12-04 19:13:27.593 [Thread-71] Waiting for pipe connection \\.\pipe\pmsencoder_transcoder_out_1354666407593_663
DEBUG 2012-12-04 19:13:27.828 [win32\mencoder.exe] Starting C:\apps\UniversalMediaServer\win32\mencoder.exe -msglevel all=2 -quiet -prefer-ipv4 -oac lavc -of lavf -lavfopts format=dvd -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=4096:threads=2:acodec=ac3:abitrate=128 -ofps 25 -cache 16384 -vf harddup -user-agent QuickTime/7.6.2 -o \\.\pipe\pmsencoder_transcoder_out_1354666407593_663 "http://trailers.apple.com/movies/disney/wreckitralph/wreckitralph-tlr2_a720p.m4v"
DEBUG 2012-12-04 19:13:27.828 [win32\mencoder.exe] Reading pipe: \\.\pipe\pmsencoder_transcoder_out_1354666407593_663
DEBUG 2012-12-04 19:13:28.046 [win32\mencoder.exe] Attaching thread: win32\mencoder.exe
DEBUG 2012-12-04 19:13:28.562 [Thread-71] Result of \\.\pipe\pmsencoder_transcoder_out_1354666407593_663 : true
INFO 2012-12-04 19:13:34.046 [StartPlaying Event] Started playing Wreck-It Ralph on your XBMC
DEBUG 2012-12-04 19:13:34.046 [StartPlaying Event] The full filename of which is: http://trailers.apple.com/movies/disney ... _a720p.m4v and the address of the renderer is: 192.168.1.2
DEBUG 2012-12-04 19:13:40.953 [Buffered IO End Checker] Stopping process: win32\mencoder.exe
INFO 2012-12-04 19:13:42.437 [StopPlaying Event] Stopped playing Wreck-It Ralph on your XBMC

Re: Format m4v: Could not find codec parameters (Video: mpeg

PostPosted: Wed Dec 05, 2012 7:48 am
by Illico
miksa wrote:interesting, that Universal Media Server transcodes and plays such files Ok.

Because serviio use ffmpeg and PMS use mencoder.
You can post on ffmpeg support forum.

Re: Format m4v: Could not find codec parameters (Video: mpeg

PostPosted: Fri Dec 07, 2012 12:14 pm
by zip
I requires UserAgent HTTP header (to mock QuickTime player). You can play this via the trailers plugin.

Re: Format m4v: Could not find codec parameters (Video: mpeg

PostPosted: Fri Dec 07, 2012 4:37 pm
by miksa
zip wrote:I requires UserAgent HTTP header (to mock QuickTime player). You can play this via the trailers plugin.
zip - thanks for the response. I am not sure how RSS plugin in serviio can help if ffmpeg cannot send UserAgent and the site requires it. because plugin can only add UserAgent header while parsing the source, but not when stream is requested by ffmpeg.

Re: Format m4v: Could not find codec parameters (Video: mpeg

PostPosted: Fri Dec 07, 2012 4:47 pm
by zip
FFmpeg supports sending user agent. But Serviio only passes it from a plugin.

Try this plugin, it should support Apple Trailers: viewtopic.php?f=20&t=6617&p=49358&hilit=+apple+trailers#p47856

Re: Format m4v: Could not find codec parameters (Video: mpeg

PostPosted: Sat Dec 08, 2012 3:53 am
by jhb50
Its not a transcoding problem. Apple has made it so that only Quicktime is allowed to download their trailers so the quicktime user agent must be set to spoof that. Serviio 1.0 added the ability to spoof the useragent from a plugin and hdtrailers expoits that.