|
|
| Placio74 |
| Posted: Dec 5 2011, 08:52 AM |
 |
|

VideoAudio
  
Group: Members
Posts: 1216
Member No.: 21485
Joined: 24-May 07

|
Uh... XDCAM (MPEG-2 in MP4)... What is interesting, MPEG-2 plugin can import video form this file (but not audio).
-------------------- VideoAudio.pl - Serwis o technologii wideo & audio |
 |
| Jim_pansen |
| Posted: Dec 5 2011, 09:49 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 30
Member No.: 25998
Joined: 12-August 09

|
| QUOTE (Placio74 @ Dec 5 2011, 09:52 AM) | Uh... XDCAM (MPEG-2 in MP4)... What is interesting, MPEG-2 plugin can import video form this file (but not audio). |
ffmpeg input driver supports it: http://forums.virtualdub.org/index.php?act...=ST&f=7&t=20025
Jim |
 |
| ale5000 |
| Posted: Dec 6 2011, 02:19 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
@fccHandler:
Sample files (AMR-NB.zip - 812.83 KB): http://www.multiupload.com/M7LCKVYM5P
AMR-NB is common in 3gp files. After a lot of failed attempts I have successfully remuxed AMR-NB audio from 3GP to AVI, the resulting file play in mplayer. Can you add support for it please?
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |
| ale5000 |
| Posted: Dec 7 2011, 02:24 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
Complete List of all known MP4 / QuickTime 'ftyp' designations: http://www.ftyps.com/
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |
| fccHandler |
| Posted: Dec 10 2011, 05:48 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
I had a chance to look at all of your files...
273G0147_01.MP4 This one has MPEG-4 Part 2 video (like Xvid) but it seems to be missing a "video_object_layer" (VOL). ffdshow requires that we prefix every keyframe with a VOL, and the plugin expects to find it in the 'esds' atom, but it is not there. Since the keyframes themselves do not start with a VOL, and no VOL is present in the 'esds' atom, I don't see any way to make this work.
808HHO03.mp4 The raw audio data is fetched correctly by VirtualDub, so the problem must be during playback. I'm not sure yet whether VirtualDub or AAC-ACM is at fault, but one theory is that AAC-ACM (faad2) may not be primed with enough data to return a complete block of samples in this case. Still investigating...
diapo.f4v I added recognition of ftyp 'flv ' and it magically worked without any other changes. There are dozens of possible ftype brands, but I only support the ones I have seen and tested. Consider this one tested.
AVC+AAC in MPEG-4 (first 10MB).mp4 I have been lazy by not checking the atom version, since it is usually 0x00. This one has an 'mdhd' atom with version 0x01, so I had to explicitly add support for that. It will work in the next release.
AMR-NB.3gp Your .avi version is not playable in VirtualDub, nor will the .3gp audio be playable with the plugin since there is no ACM codec for this audio format. You can 'hack' the audio into an .avi, but I don't see much point in me adding support for it. Please understand that I operate as a VirtualDub plugin, so I expect VFW and ACM support to be available via the host. To me, this means I must stick with ACM compatible codecs. This is not ACM compatible, so my tendency is to say no, I do not want to support this.
By the way, I wish that you would not erase your posts when a problem is fixed. When you do that, I lose the history of what the problem was to begin with. It is often useful to me to refer back to that information when I am making fixes, so I do not break something that was fixed before.
-------------------- May the FOURCC be with you... |
 |
| ale5000 |
| Posted: Dec 10 2011, 01:00 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
| QUOTE (fccHandler @ Dec 10 2011, 06:48 AM) | 273G0147_01.MP4 This one has MPEG-4 Part 2 video (like Xvid) but it seems to be missing a "video_object_layer" (VOL). ffdshow requires that we prefix every keyframe with a VOL, and the plugin expects to find it in the 'esds' atom, but it is not there. Since the keyframes themselves do not start with a VOL, and no VOL is present in the 'esds' atom, I don't see any way to make this work. |
Are you sure? Both MPC-HC (using ffdshow-tryout with MPEG2 decoding enabled) and VLC play it as MPEG2, not as MPEG-4 Part 2.
FIXED (1.8)
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |
| fccHandler |
| Posted: Dec 10 2011, 07:03 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
You're right, it is MPEG-2, and that stinks. So now the 'mp4v' FOURCC can be MPEG-2 or MPEG-4?!?
This is totally going to break my simple 1-to-1 remapping of QuickTime fourccs to VFW fourccs. For now I guess I can make it a special case, but I sure don't like it.
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Dec 11 2011, 02:04 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (fccHandler @ Dec 10 2011, 01:48 AM) | 808HHO03.mp4 The raw audio data is fetched correctly by VirtualDub, so the problem must be during playback. I'm not sure yet whether VirtualDub or AAC-ACM is at fault |
Running AAC-ACM in a debugger, I confirmed that it delivers 4096 uncompressed samples to VirtualDub (slightly less than 0.1 second of audio). So the fact that you don't hear anything must be a playback problem within VirtualDub.
-------------------- May the FOURCC be with you... |
 |
| ale5000 |
| Posted: Dec 11 2011, 02:58 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
| QUOTE (fccHandler @ Dec 10 2011, 08:03 PM) | You're right, it is MPEG-2, and that stinks. So now the 'mp4v' FOURCC can be MPEG-2 or MPEG-4?!?
This is totally going to break my simple 1-to-1 remapping of QuickTime fourccs to VFW fourccs. For now I guess I can make it a special case, but I sure don't like it. | I don't know, it is a sample that I found over the internet. I have opened in a hex editor and I have found this (maybe it is used to detect the format):
<VideoFormat> <VideoRecPort port="DIRECT"/> <VideoFrame videoCodec="MPEG2HD35_1920_1080_MP@HL" captureFps="50.00i" recFps="50.00" formatFps="50i"/> <VideoLayout pixel="1920" numOfVerticalLine="1080" aspectRatio="16:9"/> </VideoFormat>
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |
| fccHandler |
| Posted: Dec 11 2011, 04:38 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (ale5000 @ Dec 10 2011, 10:58 PM) | | (maybe it is used to detect the format) |
Doubtful. However, I am discovering that the 'esds' atom may hold the answer. There is an optional field which specifies the format, based on a chart I found on the internet. In your case it specifies ISO/IEC 13818-2 Main Profile (i.e., MPEG-2). There are many other formats it can specify as well. I don't know yet how reliable it is but I will do some checking with other files since this seems to be the good way to go.
I have decided to go ahead and deliver AMR-NB. Might as well, since it may be useful for someone, and the only other alternative is to discard it. I am basing this solely on the one sample from you, so I can't guarantee that it will be correct in all cases. For one thing, your .3gp specifies that the audio is stereo but it is clearly not. I am therefore forcing it to mono (I don't even know if AMR-NB supports stereo). I am also assuming (sample_rate / 5) compressed samples per block, assuming each .3gp chunk is one block. I don't know whether those assumptions will hold true of AMR-NB in general.
Expect a new build soon, hopefully tonight.
-------------------- May the FOURCC be with you... |
 |
| ale5000 |
| Posted: Dec 11 2011, 05:17 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
To remux 3GP files with AMR-NB audio you can use this:| CODE | | ffmpeg.exe -i input.3gp -vcodec copy -acodec copy -atag 87 output.avi | (so you can create any sample that you need)
Your input plugin detect Stereo in almost all my 3gp files with AMR-NB audio (instead MediaInfo detect Mono), it is strange.
Edit => Now it is more clear:| QUOTE | Q.002 I am using the 3gp Nokia/NEC/Siemens format with the AMR-NarrowBand. Can you force the AMR-NarrowBand to play in stereo?
A. Adaptive Multi-Rate NarrowBand (AMR-NB) and Adaptive Multi-Rate Wideband (AMR-WB) are by design monophonic speech codecs. They are designed for speech not for music, same like the GSM used for speech process. They are not and will not play in stereo! |
FIXED
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |
| fccHandler |
| Posted: Dec 11 2011, 05:44 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (ale5000 @ Dec 11 2011, 01:17 AM) | To remux 3GP files with AMR-NB audio you can use this:| CODE | | ffmpeg.exe -i input.3gp -vcodec copy -acodec copy -atag 87 output.avi | (so you can create any sample that you need) |
Good to know, but I don't have any .3gp files! I will have to rely on you to do the testing. If it is true that AMR-NB is always mono then my forced hack was actually correct.
The new build is up: http://fcchandler.home.comcast.net/Plugins/QuickTime
Edit: By the way, I decided NOT to uppercase the FOURCCs at this time because it breaks Cinepak. At least with ffdshow-tryouts beta 7, 'cvid' works but 'CVID' does not. Personally I think this is wrong. It was always my understanding that FOURCCs were not case-sensitive, in theory anyway. Apparently not in practice.
This post has been edited by fccHandler on Dec 11 2011, 05:55 AM
-------------------- May the FOURCC be with you... |
 |
| rjisinspired |
| Posted: Dec 11 2011, 07:36 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 1256
Member No.: 20008
Joined: 12-October 06

|
I just started using this and I am noticing that so far I have not received any audio stuttering whatsoever with AAC converted audio to any other format!
Update: This is a miracle! |
 |
| ale5000 |
| Posted: Dec 11 2011, 10:03 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
Can you add an option for AMR similar to the option "Add an ADTS header to each AAC frame" please?
It is really simple, you just need to add: #!AMR (0x23 0x21 0x41 0x4D 0x52 0x0A) at the start of the audio and the extracted raw audio is playable in DirectShow players (on my pc it use Nokia codecs).
FIXED (1.9)
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |
| ale5000 |
| Posted: Dec 12 2011, 12:21 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
Very great work. I have done some tests and the AMR-NB audio seems to be remuxed correctly. I will do other tests later.
1) Can you show the ftyp in File => File information please?
2) Can you add the display aspect ratio (with 3 decimals) in File => File information please (when there is)?
3) Can you show the data rate with 1 decimal in File => File information please?
FIXED
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |