#536 closed enhancement (fixed)
Mux H264 and AAC into WTV
Reported by: | Ian Kennedy | Owned by: | Michael Niedermayer |
---|---|---|---|
Priority: | wish | Component: | avformat |
Version: | git-master | Keywords: | wtv |
Cc: | ramitbhalla@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
H.264 and AAC are supported in WTV. One of the main reasons MSFT moved to WTV was to support these formats (required for ISDB-T).
Change History (12)
comment:1 by , 13 years ago
Component: | FFmpeg → avformat |
---|---|
Keywords: | mux h.264 aac removed |
Priority: | normal → wish |
Reproduced by developer: | set |
Status: | new → open |
Summary: | WTV MUX - Cannot consume AAC audio or H.264 video... → Mux H264 and AAC into WTV |
Version: | unspecified → git-master |
comment:2 by , 12 years ago
Refer to Ticket #1945 for sample files.
Anyone have any thoughts on how this can be fixed. Pending for a long time...so close to getting WTV to work perfectly, yet so far :)
comment:3 by , 12 years ago
Okay here is FUNNY part, I can stream copy a H264 video file into a WTV file and also recode it to H264 (using the libx264 codec - mpeg4 codec doesnt seem to play back in WMP) but only if I specify -f mpegts in the command line.
If I don't specify -f mpegts in the command line it won't work, but if I do it works.
ie:
ffmpeg -i h264.wtv -vcodec copy -acodec copy test.wtv
will fail
but
ffmpeg -i h264.wtv -vcodec copy -acodec copy -f mpegts test.wtv
will work
ffmpeg -i h264.wtv -vcodec libx264 -acodec copy -f mpegts test.wtv
also works
Am I missing something?
comment:4 by , 12 years ago
It also works with a MP4 or any other input file. Though I can't figure out why the mpeg4 codec doesn't play back when libxvid does
This is with build ffmpeg version N-48065-g6375318
comment:5 by , 12 years ago
When you use "-f mpegts" you do not get a valid WTV file. You get a transport stream.
It will not show in Media Center and things like run-time will not show in the windows shell and DShow will choke on it (will not open in graph studio). So the file extension may be .wtv, but that ain't what you get.
You get an MPEG transport stream. If you rename it to a ".ts" file you'll get it to load in graphedt or any other DShow app (as long as you have filters).
comment:6 by , 12 years ago
That's true, but I can see it plays in WMC and WMP. However that leads me to another question, what is the native WTV format?
Also, if I try to stream copy MPEG2 video into the WTV file it doesn't work without the -f mpegts flag. So the question is what parameters should one use to create a WTV file and trying to stream copy a video?
Here's the other thing I noticed:
ffmpeg -i h264.wtv -vcodec libx264 -acodec copy -f mpegts test.wtv - WORKS and plan on WMP/MCE!
ffmpeg -i h264.ts -vcodec libx264 -acodec copy -f mpegts test.wtv - DOES NOT WORK and plan on WMP/MCE!
Any idea why?
comment:7 by , 12 years ago
It plays because you've got the right filters on the machine and the player stack is smart enough to see beyond the file name extension.
WTV is a propriety format. Support in ffmpeg is reverse engineered.
follow-up: 10 comment:8 by , 12 years ago
Yep you're correct sorry about that, it's only working on WMP thanks to the filters, MCE won't play with them
comment:9 by , 12 years ago
Cc: | added |
---|
comment:10 by , 12 years ago
Replying to ramitbhalla:
Yep you're correct sorry about that, it's only working on WMP thanks to the filters, MCE won't play with them
That's because MC thinks it's a WTV file that is corrupted. The playback pipeline for TV is totally different than for other video.
Way OT here but: Media Center uses WMP under the hood to play anything NOT TV. And if you are on 64bit windows it uses 64bit WMP while 32bit WMP is the default player when access from the Windows desktop.
So there are tons of permutations where a file can play in WMP but not in MC, in addition to this scenario where the WTV file is bogus and MC refuses to allow it to be played or even visible from the TV gallery.
Back OT: it sure would be swell if this got fixed. One-stop trans-code to H.264 with preserved metadata would be super cool.
comment:11 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Implemented by Peter Ross in e4be0765
comment:12 by , 11 years ago
Thank you very much PETER ROSS and team.
While this works at the outset (i.e. with a direct encode like -vcodec mpeg4), I noticed that the sample file in ticket #1945 csi.mp4 when copied using -vcodec copy it does not play back in WMP or WMC.
Demuxing works fine.
For future reports:
Please always provide a failing command line including complete, uncut output