PDA

View Full Version : importing 3gp video (from a mobile phone) with avisynth ?


derebo
21st March 2007, 15:48
hi all,

i was wondering if there is a workaround to feed e.g. virtualdub with a .3gp video file capture with a mobile phone. maybe there is a way to get avisynth load that file. any suggestions?

greetings,

scharfis_brain
21st March 2007, 16:37
directshowsource("video.3gp")

derebo
21st March 2007, 22:24
wow!!! gotta try that! ;) thanks for your early reply. this forum is just GREAT! An awesome place to share and learn.

greetings!

derebo
22nd March 2007, 09:18
hello there,

i have created test.avs containing this single line:

DirectShowSource("test.3gp")

when i try to open it in virtualdub i get the following message:

#avisynth open failure:
#directshowsource: could no open as video or audio
#video returned: directshowsource couldn't open file test.3gp: file cannot be played. format is not compatible
#audio returned: directshowsource couldn't open file test.3gp: file cannot be played. format is not compatible

the file plays without any problems in nokia multimedia player so i understand the right codecs are installed (at least to decode the video/audio)

MediaInfo reports the following data:

General #0
Complete name : C:\test.3gp
Format : 3GPP
Format/Family : MPEG-4
File size : 355 KiB
PlayTime : 44s 800ms
Bit rate : 65 Kbps
StreamSize : 6.07 KiB
Encoded date : UTC 2005-12-07 02:17:54
Tagged date : UTC 2005-12-06 17:17:54

Video #0
Codec : H.263
Codec/Info : H.263 (3GPP)
PlayTime : 43s 865ms
Bit rate : 59 Kbps
Width : 176 pixels
Height : 144 pixels
Aspect ratio : 1.222
Frame rate : 5.471 fps
Minimum frame rate : 2.143 fps
Maximum frame rate : 15.002 fps
StreamSize : 318 KiB
Encoded date : UTC 2005-12-06 17:17:54
Tagged date : UTC 2005-12-06 17:17:54

Audio #0
Codec : AMR-NB
Codec/Info : AMR narrow band (3GPP)
PlayTime : 44s 800ms
Bit rate : 5600 bps
Channel(s) : 2 channels
Sampling rate : 8000 Hz
Resolution : 16 bits
StreamSize : 30.6 KiB
Encoded date : UTC 2005-12-06 17:17:54
Tagged date : UTC 2005-12-06 17:17:54


does anyone if there is more code i should add to the .avs file in order to open the .3gp file? any feedback is appreciated!

greetings,

foxyshadis
22nd March 2007, 10:52
Change the extension to .mp4 and try again. You'll need an mp4 splitter on your system, of course. You'll never get that audio into avisynth without extracting it, though - there are no directshow filters for AMR that I know of.

Leak
22nd March 2007, 11:27
Change the extension to .mp4 and try again. You'll need an mp4 splitter on your system, of course. You'll never get that audio into avisynth without extracting it, though - there are no directshow filters for AMR that I know of.
*cough*ffdshow*cough* :D

(at least it's on the codecs config page - haven't ever tested it...)

derebo
22nd March 2007, 15:40
hi,

i've used YAMB (GUI for MP4BOX) to demux test.3gp (354 kb) into:
test_track1.263 (317 kb)
test_track2.amr (30.6 kb)

test.avs :
DirectShowSource("test_track1.263")

cannot be opened by virtualdub, same error. so i have installed ddshow allowing h263 and raw video to be decoded by ddshow. and i keep on getting the same error. so, could you please give any more tips?

edit: now this works! virtualdub shows video and plays audio!
test.avs :
DirectShowSource("test.3gp")

so if .3gp can be opened successfully now that must be fddshow, mustn't it?

greetings!

scharfis_brain
22nd March 2007, 16:34
if any media player like WMplayer or media player classic can play back your 3gp video, then directshowsource also will be able to.

the nokia software surely comes along with inbuilt decoders so it is independant from the installed codecs on your windoze.

Leak
22nd March 2007, 17:13
so if .3gp can be opened successfully now that must be fddshow, mustn't it?
Go into ffdshow's video/audio decoder settings and check "Show tray icon" under "Tray, dialog and paths" - if you get two additional tray icons while the file is open in VirtualDub I'd chalk that up as "yes"... :)

np: The Remote Viewer - Last Night You Said Goodbye, Now It Seems Years (Let Your Heart Draw A Line)

derebo
22nd March 2007, 18:31
leak, i'll try that out later in the evening ;) thanks everyone for nice feedback. it's been really useful.

here comes MediaInfo report for brand new xvid conversion! ;)


General #0
Complete name : C:\test.avi
Format : AVI
Format/Info : Audio Video Interleave
Format/Family : RIFF
File size : 4.21 MiB
PlayTime : 44s 800ms
Bit rate : 783 Kbps
StreamSize : 42.8 KiB
Writing library : VirtualDub build 24469/release

Video #0
Codec : XviD
Codec/Family : MPEG-4
Codec/Info : XviD project
Codec settings/Packe : Yes
Codec settings/BVOP : Yes
Codec settings/QPel : No
Codec settings/GMC : 0
Codec settings/Matri : Default
PlayTime : 44s 800ms
Bit rate : 780 Kbps
Width : 176 pixels
Height : 144 pixels
Aspect ratio : 1.222
Frame rate : 25.000 fps
Resolution : 8 bits
Chroma : 4:2:0
Interlacement : Progressive
Bits/(Pixel*Frame) : 1.228
StreamSize : 4.16 MiB
Writing library : XviD0046



greetings!

Leak
22nd March 2007, 18:40
here comes MediaInfo report for brand new xvid conversion! ;)
Is it just me, or did the audio go out the window here? ;)

np: B.Fleischmann - Melancholie (Melancholie/Sendestraße (Disc 1))

derebo
22nd March 2007, 19:06
Is it just me, or did the audio go out the window here? ;)

:mad: sure, you're right. but that's strage then. playing in virtualdub is ok (video and audio), compressing audio seemingly is ok too, but MediaInfo reports no audio some something is to be done about it...

Change the extension to .mp4 and try again. You'll need an mp4 splitter on your system, of course. You'll never get that audio into avisynth without extracting it, though - there are no directshow filters for AMR that I know of.

so how can i get that test_track2.amr into avisynth then? any tips? i'll do some research on my side too, of course.

greetings,

scharfis_brain
22nd March 2007, 19:16
the ffdshow audio decoder is able to decode AMR!
you just need to enable it!

Leak
22nd March 2007, 19:20
the ffdshow audio decoder is able to decode AMR!
If you're hearing sound in VirtualDub, ffdshow's AMR decoder is already at work.

I guess something went wrong in VirtualDub then...

derebo
23rd March 2007, 14:31
hi,

yes, AMR decoder is fully at work... media-concert allows conversion from .amr to .wav and then .mp3 compressing is no problem at all.

Brand new MediaInfo report show this time there's video+audio, and i have played the file just to check the audio is there ;)

now, one more problem: while audio is played back at the right rate, video is is played as in fast-forward mode! as the 44s video is played so fast, there's a loop and video is played back once and again everytime until the end of 44s. i think this might be due to the fact that original test.3gp has a variable framerate as MediaInfo reports:


Frame rate : 5.471 fps
Minimum frame rate : 2.143 fps
Maximum frame rate : 15.002 fps


i have left virtualdub video > frame rate > no change and output file is:


Frame rate : 25.000 fps


i have done the same again video > frame rate > change so video and audio durations match, but the end result is the same. so has anyone faced a situation like this before? dealing with variable framerate?


General #0
Complete name : C:\test.avi
Format : AVI
Format/Info : Audio Video Interleave
Format/Family : RIFF
File size : 5.26 MiB
PlayTime : 44s 800ms
Bit rate : 976 Kbps
StreamSize : 79.5 KiB
Writing library : VirtualDub build 24469/release

Video #0
Codec : XviD
Codec/Family : MPEG-4
Codec/Info : XviD project
Codec settings/Packe : Yes
Codec settings/BVOP : Yes
Codec settings/QPel : No
Codec settings/GMC : 0
Codec settings/Matri : Default
PlayTime : 44s 800ms
Bit rate : 780 Kbps
Width : 176 pixels
Height : 144 pixels
Aspect ratio : 1.222
Frame rate : 25.000 fps
Resolution : 8 bits
Chroma : 4:2:0
Interlacement : Progressive
Bits/(Pixel*Frame) : 1.217
StreamSize : 4.16 MiB
Writing library : XviD0046

Audio #0
Codec : MPEG-1 Audio layer 3
Codec profile : Joint stereo
PlayTime : 44s 754ms
Bit rate : 190 Kbps
Bit rate mode : CBR
Channel(s) : 2 channels
Sampling rate : 44 KHz
Resolution : 16 bits
StreamSize : 1.02 MiB


greetings!

foxyshadis
23rd March 2007, 15:49
Use DirectShowSource("file",fps=15,convertfps=true), which will undo the VFR, then re-encode with that. There are other methods, but they're all more complex and some you can't use with AVI.