[FFmpeg-user] Question on Segment TImes

Ted Park kumowoon1025 at gmail.com
Sun Apr 5 06:24:45 EEST 2020


Hi,

> OK: That solved the timestamp problem and created a missing stream.
> 
> Does anyone one know the magic option for getting all three streams into MOV.
> 
> If I use this to create a DV file (from DVR-DV) it works and creates this file:

> Input #0, dv, from ‘output.dv’:
>   Metadata:
>     timecode : 00:00:00:00
>   Duration: 00:00:10.01, start: 0.000000, bitrate: 28771 kb/s
>     Stream #0:0: Video: dvvideo, yuv411p, 720x480 [SAR 8:9 DAR 4:3], 25000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
>     Stream #0:1: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
>     Stream #0:2: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
> 
> Three streams
> 
> If I just change the container to “.mov”

> I get one stream:
> 
> nput #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘output.mov’:
>   Metadata:
>     major_brand : qt
>     minor_version : 512
>     compatible_brands: qt
>     encoder : Lavf58.35.101
>   Duration: 00:00:10.01, start: 0.000000, bitrate: 28773 kb/s
>     Stream #0:0: Video: dvvideo (dvc / 0x20637664), yuv411p, 720x480 [SAR 8:9 DAR 4:3], 28771 kb/s, 29.97 fps, 29.97 tbr, 1000k tbn, 29.97 tbc (default)
>     Metadata:
>       handler_name : VideoHandler
I think this has to do with AVFoundation’s “raw data” option and how audio and video is stored on the actual metallic sublimate tape (iirc, the video/audio/timecode “streams” do not exist as discrete entities, but they are all interleaved into an atomic “DV” tape-format (hence the 1M reported tbn). I’m not sure how AVFoundation splits them up or isolates the detected timecode or decide to join all the streams together, but I presume it’s similar to the audio fixup menu options in FCPX import media window.

I’m curious if this would work, but have you tried artificially increasing the video size (via framerate, frame size, etc) to make it into what would be considered HDV, or even DVCPRO and try adding the audio streams then? Apparently it supports multiple streams (DVCPRO50, that is)


> I have tried every variation of -map.
> If I send the output to pipe and then to a file, all of the streams are their for DV
> 
> If I do the import with Final Cut Pro X then I get this from the file. Also, FCPX seems to be able to find the original timestamp from when the media  was created.

I don't know if -map will work as usual with dv from a tape deck. Also I don't know how AVFoundation actually archives the data, I would really get a build with native IEEE1394 device control/communication library support, since if you use AVFoundation then I doubt the problems in FCPX are going to go away, or at least not all of them.



> On Apr 4, 2020, 2:11 AM -0700, Gyan Doshi <ffmpeg at gyani.pro>, wrote:
>> 
>> 
>> On 04-04-2020 11:59 am, Colin Bitterfield wrote:
>>> I am trying to segment split a stream coming in from AVFOUNDATION
>>> 
>>> ffmpeg -benchmark_all -stats -loglevel debug -copyts \
>>>  -f avfoundation -capture_raw_data true -pix_fmt 0rgb -i DV-VCR -q 0 \
>>>  -map 0 -c:v copy -c:a copy -segment_time 00:00:10 \
>>>  -f segment  374_%03d.dv -y
>>> 
>>> _ I have tried various combinations of “-increment_tc” and "-reset_timestamps 0"
>>> 
>>> The video splits flawless at the time requ
>> 
>> .dv is a bare bones container and does not support timestamps. Try MOV.

I am under the understanding that DV timestamps/timecodes are pretty much the same thing since they use either LTC or VITC on the tape that encodes the date (timestamp) as well as the timecodes, in a “striped” tape anyway. It’s how your deck knows when one shot ends and another begins. So it doesn't support timestamps as metadata but I don't think they are lost, just embedded in the dv stream in a way that’s just a little harder to access.


Regards,
Ted Park



More information about the ffmpeg-user mailing list